error: detector.detect, image size too large [closed]

asked 2015-01-27 04:04:03 -0600

Fiong gravatar image

I met errors when I extract SIFT for a large image. It is ok for smaller image.

Does anyone know how to solve it? Does the size of the image matter?

The size of the image is 2816 * 2122. The code I used is:

SiftFeatureDetector detector;    
std::vector<KeyPoint> keypoints_object;      
detector.detect(img, keypoints_object);  // Here I met errors.

The error I met:

image description

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-26 13:21:49.715330

Comments

It's always a good ideas to also upload the image. Otherwise no one can reproduce your error.

FooBar gravatar imageFooBar ( 2015-01-27 05:00:02 -0600 )edit

Also, can you post the code in which you aquire the image in your img handle?

JohannesZ gravatar imageJohannesZ ( 2015-01-27 06:12:59 -0600 )edit

My best guess is indeed that the image is invalid, not the function since you say that it works perfectly on the smaller images. Do not forget to add the initModule_nonfree() if you are using the 2.4 branch!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-27 06:59:03 -0600 )edit