Figure out scale and rotation of template image based on matched keypoints
I was able to use ORB matching to match my template image in my camera feed. Then I was able to extract the matching keypoints in both the feed and the template. Now I really want to find what would be the center of my template image but in my camera feed. I was thinking if I could figure out how to rotate, then scale the template image to fit the matched keypoints then I would know where the center was.
Does anyone have any advice on how to do something like that?
Thank you.
you're probably already very close.
can you look at the homography tutorial ?
(it sounds like you already have the 1st half going, and all you need is the part from "//-- Localize the object" down)
Yes :) I have been pouring over that for the last two hours. I'm curious if this section in the tutorial has the queryIdx and trainIdx swapped? When I try this way I always get an array out of bounds error, but swapping them is fine.
Finally got it to work thanks for the tips.