error: detector.detect, image size too large [closed]
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:
It's always a good ideas to also upload the image. Otherwise no one can reproduce your error.
Also, can you post the code in which you aquire the image in your img handle?
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!