Hi all, I've got this error in the function: "calcOpticalFlowPyrLK". Basically I have to track a book from a video given, do I used SIFT features to detect the book in the video and surrounding it with a square obtaining the following result: Then I have to track (and show) the features of the book using the pyramid Lukas-Kanade tracker, and I'm using the following code: for (;;) { //tracking
vector<uchar> status;
vector<float> err;
vector<KeyPoint> next_keypoints;
Mat result;
if (prev_gray.empty())
{
gray.copyTo(prev_gray);
}
cap >> frame;
cvtColor(frame, gray, COLOR_BGR2GRAY);
calcOpticalFlowPyrLK(prev_gray, gray, keypoints_2, next_keypoints, status, err);
drawKeypoints(prev_gray, keypoints_2, result);
imshow("res", result);
gray.copyTo(prev_gray);
keypoints_2 = next_keypoints;
}
Where "prev_gray" is an empty Mat defined at the beginning of the code (before of the SIFT obj detection), "gray" is the first frame of the video converted in gray scale and keypoints_2 is the vector<keypoint> of the first frame of the video.
At the execution of the method "calcOpticalFlowPyrLK(prev_gray, gray, keypoints_2, next_keypoints, status, err);", I'm getting the error "type: udeclared identifier (at traits.hpp)" and "type is not a member of 'cv::DataType<t>'"
What could be the problem? Thank y'all!