goodfeaturestoTrack with Mask
How do i use the mask parameter for the GoodFeatureToTrack function?..
right now i give it this
goodFeaturesToTrack(grayframe, points, 500, 0.01, 10, Mat(frame,faces.back()), 3, 0, 0.04);
Which give me this error which i seem to be stuck with.
OpenCV Error: Assertion failed (mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size())) in goodFeaturesToTrack...
what is
Mat(frame,faces.back())
? looks like some kind of ROI. ?try this:
I tried what you suggested, but it gives out a error message saying.
Frame is a Mat, and faces.back() is a rect from a vector.
sorry, probably grayframe, not frame
The size of both frame is the same. Grayframe is just a copy of frame, converted to grayscale.
please check if faces actually contains something before.
ok.. I tried put something together but it seem not to work as expected.. For some reason it will not apply the Lukas kanade using the points.. I am bit confused on why this problem is occurring at all... http://pastebin.com/CtrTfFeA