Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SIFT - Insufficient memory

Hello,

I have to detect keypoints on big sized images (about 6mb). I have tried SURF and it works fine and now I'm trying to use SIFT. The code is simple:

cv::Mat image = imread("../images/IMG_3849.jpg", CV_LOAD_IMAGE_GRAYSCALE);

cv::SiftFeatureDetector detector;
std::vector<cv::KeyPoint> keypoints;
detector.detect(image, keypoints);

cv::SiftDescriptorExtractor extractor; 
cv::Mat descriptors_object;
extractor.compute( image, keypoints, descriptors_object );

However when I run this code, I get the error "OpenCV Error: Insufficient memory - Failed to allocate 286654468 bytes".

Anyone knows why this might be happening?

Thank you!