Hi, I'm having trouble with goodFeatureToTrack using OpenCV 3.0 in C++ with Qt and MSVC2010.
When I run the following code, the size of corners
is 4,289,272,441 (image is ok and displays).
#include <iostream>
#include "opencv.hpp"
#include "world.hpp"
#include <vector>
using namespace cv;
using namespace std;
int main()
{
Mat frame = imread("lena_color.tif");
std::vector<cv::Point2f> corners;
//Mat corners;
cvtColor(frame,frame,COLOR_RGB2GRAY);
goodFeaturesToTrack(frame,corners,10,0.001,10);
cout << corners.size() << endl;
imshow("Img",frame);
waitKey();
return 0;
}
I know corners
is not a Mat
but when I use it as such I get a size of [1x10], which makes sense.
Has anyone run into this behavior and knows how to explain and fix it?