Surf feature Run-time error
I am doing code for feature extraction using SURF , but it give me run-time error in it , i don't think so it's error in program but here it is
#pragma comment (lib , "opencv_core244d.lib")
#pragma comment (lib ,"opencv_highgui244d.lib")
#pragma comment(lib , "opencv_imgproc244d.lib")
#pragma comment(lib ,"opencv_video244d.lib")
#pragma comment(lib ,"opencv_features2d244d.lib")
#pragma comment(lib ,"opencv_nonfree244d.lib")
using namespace cv ;
int main(int argc, char *argv[])
{
initModule_nonfree();
Mat image1, outImg1, image2, outImg2;
vector<KeyPoint> keypoints1, keypoints2;
image1 = imread("1.jpg",0);
image2 = imread("2.jpg",0);
SurfFeatureDetector surf(2500);
surf.detect(image1, keypoints1);
surf.detect(image2, keypoints2);
drawKeypoints(image1, keypoints1, outImg1, Scalar(255,255,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
drawKeypoints(image2, keypoints2, outImg2, Scalar(255,255,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
namedWindow("SURF detector img1");
imshow("SURF detector img1", outImg1);
namedWindow("SURF detector img2");
imshow("SURF detector img2", outImg2);
SurfDescriptorExtractor surfDesc;
Mat descriptors1, descriptors2;
surfDesc.compute(image1, keypoints1, descriptors1);
surfDesc.compute(image2, keypoints2, descriptors2);
cv::waitKey();
return 0;
}
Error: It give me the option of Continue or Break and also the following Dos screen appears