I am trying to detect a planar object from a video stream. Keypoint detection and feature extraction work both fairly well, as well as matching. findHomography
however takes very long (up to 1,6 sec on my mobile). I tried several combinations of detector/extractor/matcher to change the number and quality of keypoints. My current setup is ORB
and BFMatcher<Hamming>
. My question is: How can I speed up the homography calculation? I'm using ransac, but changing the threshold seems to have little to no effect (neither in quality nor performance). Should I use some other methods like getPerspectiveTransform
, or estimateAffine3D
or solvePnp
?
On a side note: I also had a hard time to get a useful matrix out of findHomography
in the first place, although I sticked pretty close to opencv's samples.