RAFT
RAFT copied to clipboard
predicting next frame
Hello and thanks for sharing your great work! Is there an easy way to predict the next frame using the flow? [ function(frame0, flow) ==> predicted_frame1 ]
use cv2.remap
how should I use cv2.remap? predicted_frame_by_img1 = cv2.remap( img1, flo_2chan[:, :, 1], flo_2chan[:, :, 0], interpolation=? ) is this the correct way? And what is the appropriate interpolation?
I simply warp img2 back to img1 using the code below, cracks may appear due to missing information
h = flow.shape[0]
w = flow.shape[1]
flow[:,:,0] += np.arange(w)
flow[:,:,1] += np.arange(h)[:,np.newaxis]
warped_img2 = cv2.remap(img2, flow, None, cv2.INTER_LINEAR)
If I just use the code above, I get this error.
Traceback (most recent call last):
File "j_warp_default.py", line 79, in
I’ve been trying different things, but they are not working. Could anyone share how to warp images using the flow(flow_up)?