-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direction of warping #1
Comments
I have the same question. Here is what I am thinking: Say we use PWC-Net to estimate optical flow, input is img1 and img2, then let the output flow as u_{1->2}, the subscript denotes the flow is from img1 to img2. then we calculate warp(img1, u_{1->2}) then we get warped img2. Since estimation is not 100% accurate, so there should be some artifact in warped img2. ( like what we see in the example) So back to your question, I think if one would like to warp img2 back to img1, then we need use the optical flow from img2 to img1. |
Hi, have you solved the direction problem? |
I think it should be warp(img2, u_{1->2}). Because I think the algorithm is designed to warp the img2 back to img1 according to the optical flow from img1 to img2. |
I think if one would like to warp img2 to img1, it is supposed to be warp(img2, -u(1->2)). For example, say now we have img1, we do not know how pixels move since we only have this single image. If the optical flow is ideal, then img1 + flow = img2 (I am sorry it is not a rigorous notation, it only helps on understanding). Here we can see the flow is from img1-->img2. Recall the definition of optical flow, it is the pixels' tiny displacement along the x and y axis. So if we set u_{1->2} as the flow from img1 to img2, then u_{2->1} = -u_{1->2}. ( such like \delta x is displacement along x axis while negative \delta x is displacement along the oppsite direction) As a conclusion, given img1 as the first frame and img2 as the second frame, then we can estimate the optical flow u_{1->2} (flow from img1 to img2); if one would like to warp img2 to img1, then calculate warp(img2, -u_{1->2}). |
I have a question about the warping direction. If I have the optical flow from img1 to img2 and I want to warp img2 back to img1, should I use img2 as the input image? Do I need to use the optical flow from img2 to img1 as the input optical flow?
The text was updated successfully, but these errors were encountered: