void myFeatureExtractor::extractSIFT(){
//clone image to be safe
cv::Ptr<cv::SIFT> myDetector{NULL};
if (input_image.empty()) {
std::cout << "Picture couldn't be loaded correctly." << std::endl;
return;
}
cv::Mat myInput = input_image.clone();
//cv::imshow("Input Image", myInput);
//cv::waitKey(0);
myDetector = cv::SIFT::create(); //0,3,0.04,10,1.6
std::vector<cv::KeyPoint> keypoints;
cv::Mat SIFT_output_image;
myDetector->detect(myInput,keypoints);
// Add results to image and save.
cv::drawKeypoints(myInput, keypoints, SIFT_output_image);
result_image = SIFT_output_image;
};
Error:
Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)