Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

SurfFeatureDetector core dumped

$
0
0
I am trying to reproduce the code displayed [here](http://docs.opencv.org/2.4/doc/tutorials/features2d/feature_homography/feature_homography.html) (it was an absolute pain to debug). The actual code is: int main(int argc, char* argv[]) { initModule_nonfree(); Mat img_object = imread("/home/razakhel/Downloads/base.png" CV_IMREAD_GRAYSCALE); Mat img_scene = imread("/home/razakhel/Downloads/pattern.png" CV_IMREAD_GRAYSCALE); if (!img_object.data || !img_scene.data) { std::cout<< " --(!) Error reading images " << std::endl; return -1; } //-- Step 1: Detect the keypoints using SURF Detector int minHessian = 400; SurfFeatureDetector detector(minHessian); std::vector keypoints_object, keypoints_scene; detector.detect(img_object, keypoints_object); // <= Core dumped detector.detect(img_scene, keypoints_scene); [...] return 0; } The error appears on the line commented as such. The `base.png` is a 1366x768 picture (I tried with it rescaled to 640x380, same thing). The `pattern.png` is scaled at 205x180, but the code isn't reaching its import anyway. I assume it is unrelated to the size, but we never know. I've been searching for answers for a while, but all I've been able to find was a problem related to the missing `initModule_nonfree()`. If anyone has an idea, I'd gladly try it.

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>