# 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:

edit retag 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

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!