Ask Your Question

Revision history [back]

SurfFeatureDetector crash

I am using SurfFeatureDetector to detect the features on image, but it always crashes. It will be very appreciated if any body can give your comments. The followings are my codes:

Mat img = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE);
Ptr<FeatureDetector> detector = new SurfFeatureDetector(400);
std::vector<KeyPoint> keypoints;
detector->detect(img, keypoints); //------ system crashes at this line.

By the way, I am using OpenCV version 2.4.6, and the development platform is Visual Studio 2010. I have included #include "opencv2/nonfree/nonfree.hpp" and link library opencv_nonfree246.lib. Thank you so much in advance!