Ask Your Question

Revision history [back]

CvBlobTrackerAuto Memory Use

I am using the CvBlobTrackerAuto class to detect moving blobs in a video. For now I am running on an Intel PC with both MS Windows and Linux. My hope is to be able to port this to a Linux embedded system, but I see a potential problem with the amount of memory that is being allocated.

For a 720x480 image, 335 MB of memory is allocated on first call of CvBlobTrackerAuto.process(IplImage *pImg, IplImage pMask). An HD image can allocate almost 2 GB. This amount of memory may not be available on an embedded system. Even if that much memory was available, I'd rather not allocate that much to a single process, as this takes away from memory available to the rest of the system.

I plan to work with a smaller version of the full size image, which should be sufficient for detecting blobs, but even 1/4 of the image size still leaves me with a large chunk of memory to allocate.

Does anyone know of any other options or ideas for reducing my memory footprint in the CvBlobTrackerAuto class? If not, perhaps another approach to detecting blobs in a memory-restricted system?