Skip to content
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

Question on keypoint computation #6

Closed
jamt9000 opened this issue Jan 6, 2020 · 3 comments
Closed

Question on keypoint computation #6

jamt9000 opened this issue Jan 6, 2020 · 3 comments

Comments

@jamt9000
Copy link
Owner

jamt9000 commented Jan 6, 2020

Sharing a question received by email:

Thanks for sharing your DVE codes. I found the new keypoints computed in your code is somehow counter-intuitive. Could you kindly explain: Why you construct a KD tree with the warped grid instead of the regular one?

This is a link to the questioned line in your code

def warp_keypoints(self, keypoints, grid_unnormalized):

@jamt9000
Copy link
Owner Author

jamt9000 commented Jan 6, 2020

And my answer

The warp grid defines an inverse image warp - ie, each element in the grid is an index into the original image (the alternative would be to use a forward warp, where we give the index of where each pixel should end up in the new image, but that can give an image with holes). Because the keypoints are in original image coordinates, to find where it has moved to we need to locate the nearest neighbour in the warp grid.

@jamt9000
Copy link
Owner Author

jamt9000 commented Jan 6, 2020

Whether it makes sense to use a KD-tree to do this is another matter. It was ported from the use of knnsearch in matlab as a simple way to find the transformed keypoints when we don't have the warp in that direction. One limitation is that the transformed keypoints will be integer locations.

@flowtcw
Copy link

flowtcw commented Jan 17, 2020

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants