cvGoodFeaturesToTrack requesting huge amount of memory

asked 2014-03-26 12:19:10 -0500

duxy gravatar image

Hi,

I'm using cvGoodFeaturesToTrack() to extract intial image locations for further corner localisation.

I'm applying the function to an 8-bit single-channel 18 megapixel image. When I try processing images in a loop, a cvOutOfMemory error is thrown on the second image (second pass through the loop). I'm deallocating and releasing the image at the end of each loop so I shouldn't have any huge memory leak. When I catch the error and examine it, it states that it cannot allocate 216MB of memory. This seems a huge amount of memory to be requesting for this image size. Does anyone have any ideas on why it is requesting so much memory?

When I view my task manager as I single step through my code, I see a jump of 415MB while the function is executing. Also, the amount of memory that the function is requesting (216MB) is almost exactly 12 times the amount of memory required to store the image on which it is operating (i.e. the input image). Is there any significance to this?

Any comments are much appreciated!

edit retag flag offensive close merge delete