Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

feature detector crash

Hi,

feature detector fails when used in simple program in visual studio 2010. I am using opencv 2.4.2 and also checked on 2.4.1. Only thing that is being done is to create a feature detector and use that to detect keypoints in an image. I get unhandled exception crash pointing to a function named "detecImpl()" inside detectors.cpp (i.e. features2d\detectors.cpp line:65). This error is really stuck and has taken enormous amount of time so any help is really appreciated.

include <iostream>

include <opencv2 core="" core.hpp="">

include "opencv2/highgui/highgui.hpp"

include <opencv2 imgproc="" imgproc.hpp="">

include <opencv2 features2d="" features2d.hpp="">

using namespace std; using namespace cv;

int main(int argc, char* argv[]) { cv::Ptr<cv::featuredetector> featureDetector; cv::Ptr<cv::descriptorextractor> descriptorExtractor; featureDetector = cv::FeatureDetector::create("SURF"); descriptorExtractor = cv::DescriptorExtractor::create("SURF"); cv::Mat imageColor; cv::Mat image = cv::imread("car1.jpg", 0); cv::cvtColor(image, imageColor, CV_GRAY2BGR); try{ imshow("Test Image",imageColor); cv::waitKey(3000); } catch(cv::Exception exc) { cout << "CV error occured : " + exc.msg; } std::vector<cv::keypoint> currentKeypoints;

try{ featureDetector->detect(image,currentKeypoints); } catch(cv::Exception exc) { cout << "CV error occured : " + exc.msg; return -1; } }

feature detector crash

Hi,

feature detector fails when used in simple program in visual studio 2010. I am using opencv 2.4.2 and also checked on 2.4.1. Only thing that is being done is to create a feature detector and use that to detect keypoints in an image. I get unhandled exception crash pointing to a function named "detecImpl()" inside detectors.cpp (i.e. features2d\detectors.cpp line:65). This error is really stuck and has taken enormous amount of time so any help is really appreciated.

include <iostream>

include <opencv2 core="" core.hpp="">

include "opencv2/highgui/highgui.hpp"

include <opencv2 imgproc="" imgproc.hpp="">

include <opencv2 features2d="" features2d.hpp="">

#include <iostream>
#include <opencv2/core/core.hpp>
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>

using namespace std;
using namespace cv;

cv; int main(int argc, char* argv[]) { cv::Ptr<cv::featuredetector> cv::Ptr<cv::FeatureDetector> featureDetector; cv::Ptr<cv::descriptorextractor> cv::Ptr<cv::DescriptorExtractor> descriptorExtractor; featureDetector = cv::FeatureDetector::create("SURF"); descriptorExtractor = cv::DescriptorExtractor::create("SURF"); cv::Mat imageColor; cv::Mat image = cv::imread("car1.jpg", 0); cv::cvtColor(image, imageColor, CV_GRAY2BGR); try{ imshow("Test Image",imageColor); cv::waitKey(3000); } catch(cv::Exception exc) { cout << "CV error occured : " + exc.msg; } std::vector<cv::keypoint> currentKeypoints;

std::vector<cv::KeyPoint> currentKeypoints; try{ featureDetector->detect(image,currentKeypoints); featureDetector->detect(image,currentKeypoints); //This line generates the error but no exception is caught .... } catch(cv::Exception exc) { cout << "CV error occured : " + exc.msg; return -1; } }

}