Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

goodfeaturestotrack corner vector size

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;

    cout << corners.size() << endl;


    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?