insufficient memory using SIFT
I want to use OpenCV Python to do SIFT feature detection on remote sensing images. These images are high resolution and can be thousands of pixels wide (7000 x 6000 or ~160 MB). I am having trouble with insufficient memory, however. I've ran the same image through SIFT in Matlab (using VLFEAT) without problems. Looking at the documentation, I see that the returned descriptor is (num_keypoints x 128) array, which is probably what is causing the memory issues. VLFEAT returns only (x,y,scale,orient), however, which is easier to store in memory. Is there a way to use OpenCV so that histogram information is not saved along the way? Or is there some other issue going on that I'm not seeing?
img = cv2.imread('home.jpg')
sift = cv2.xfeatures2d.SIFT_create()
kp, des = sift.detect(img, None)
wait, (x,y,scale,orient), is (some part of) the keypoint, but the corresponding descriptor is indeed 128 floats.
you're comparing apples to oranges, somehow.
What I initially wrote wasn't completely correct. When using sift.detect() only the keypoints, kp, are returned. Keypoints is a list with angle, point, class_id, octave, response and size. The histogram descriptors, des, are not returned. So I'm still not sure what is causing the memory issue. I can run my 160 MB image with Matlab VLFEAT but it causes OpenCV SIFT to max out my memory usage to 100% and the computer crashes.
sorry, but you'll have to start all over from the beginning. -- what are you trying to achieve ?
I want to run SIFT using Python OpenCV on a large image. When I try to process it, I've either gotten an error message about memory allocation or I've had the memory usage shoot to 100% and the computer crashes. I want to understand why this is happening and what other options I have.