2014-11-21 05:18:44 -0600 | asked a question | SIFT debug mode error I don't understand why this code works with mode Release (VS2010 c++) and send error message on mode debug---> refer to crtexe.c file include <stdio.h>include <stdlib.h>include "opencv2/core/core.hpp"include "opencv2/nonfree/features2d.hpp"include "opencv2/highgui/highgui.hpp"include "opencv2/nonfree/nonfree.hpp"include<iostream>using namespace cv; using namespace std; int main() { initModule_nonfree(); Mat img1 = cvLoadImage("C:/358.jpg", CV_LOAD_IMAGE_GRAYSCALE );// I used unchanged too if(img1.empty()) { printf("Can't read one of the images\n"); return -1; } SiftFeatureDetector detector(400); vector<keypoint> keypoints1; detector.detect(img1, keypoints1); Mat img_keypoints1; drawKeypoints( img1, keypoints1, img_keypoints1, Scalar::all(-1), DrawMatchesFlags::DEFAULT ); imshow("Keypoints 1", img_keypoints1 ); waitKey(0); return 0; } |