GFTTDetector and calcOpticalFlowPyrLK
Hi,
Previously I was using good featuresToTrack and calcOpticalFlowPyrLK to match features.
Now I want to use new interface GFTT. In BFMatcher I cannot find an algorithm like calcOpticalFlowPyrLK. So (I think) I need to use previous function calcOpticalFlowPyrLK. But function argument is InputArray prevPts for Point (and not keyPoints).
Must I convert keyPoint in cv::Point2f to use this function?
Thanks for your help
an example for using optical flow with matching would be nice.
I'm not sure to understand. there is already an example
i meant in connection with the BFMatcher, but yes.
I'm not sure to understand so I give you my understanding of GFTT and Orb (for example)
With GFTT keyPoint are calculated by thresholding cornerMinEigenVal. After there is no descriptors.
With Orb pointare calculated using FastFeatureDetector and descriptor using compute (computeOrbDescriptors).
BFMatcher need descriptor. As there is no descriptor with GFTT I understand that I must provided some descriptors. I can imagine now that I use
I don't like 2 so Do you need an example with 1?Result would be like github.com/Itseez/opencv/blob/master/samples/tapi/pyrlk_optical_flow.cpp
@berak what's new about my comment?
sorry, i was busy battling the buildbot ;)
maybe i do not understand your workflow here.
so, you are collecting "points of interest" , then use optical flow (which will give you the offset for those points from one image to another), and then ? (what is the result used for ?)
what are your "features" ? if you want to use feature2d classes to get features for matching, you might need a more suitable Keypoint extractor, GFFT is lacking things like scale, octave and such.
if so, also you should rather use detectAndCompute() (not seperate) for most feature2d classes, else you throw away already extracted features
I wanted to use GFFT only to have a universal (ORB KAZE...GFTT)code for matching. Now I know it's not possible.