reconstruct second image with flow
rgp90 opened this issue · 3 comments
Hi
I tried to reconstruct the second image by computed flow through the spynet, but the reconstructed image was similar to first image rather than second image and it couldn't reconstruct motions.
spynet = require('spynet')
easyComputeFlow = spynet.easy_setup()
im1 = image.load('samples/00001_img1.ppm' )
im2 = image.load('samples/00001_img2.ppm' )
flow = easyComputeFlow(im1, im2)
im3=image.warp(im1, flow)
Your answer is appreciated in advance.
The image.warp is defined as a warping from im2 to im1. So,
im3=image.warp(im2,flow)
will essentially reconstruct the first image (im1).
Thanks for your time and help @anuragranj.
How can I reconstruct the second image(im2)?
Thanks in advance for your help.
You should use image.warp(im1, -flow)
, but there will be some artifacts due to many-to-one mapping.