We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › hypermedia opencv library mac memory leak
Page Index Toggle Pages: 1
hypermedia opencv library mac memory leak (Read 2333 times)
hypermedia opencv library mac memory leak
Jan 19th, 2009, 1:15pm
 
i have a problem with the opencv library. what i do is search thousands of pictures for faces against each of the opencv provided cascades. something like:

Code:

// loop pictures, img is current pimage

opencv.allocate( img.width, img.height );
opencv.copy(img);

//// loop cascades array

opencv.cascade( cascades[ic] );
faces = opencv.detect();

//// end loop cascades
// end loop pictures


this runs for a while (couple of hundred pics), then i get:
Code:

java(3577,0x8c4000) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
OpenCV ERROR: Insufficient memory (Out of memory)

in function cvAlloc, ../../../cxcore/src/cxalloc.cpp(111)
Terminating the application...

called from cvUnregisterType, ../../../cxcore/src/cxpersistence.cpp(4933)


thanks
F
Re: hypermedia opencv library mac memory leak
Reply #1 - Jan 20th, 2009, 4:10pm
 
Hate to point out the obvious but if your trying to load thousands of pictures and you get an out of memory error, you might be... out of memory? I think your machine doesn't have enough memory to deal with the program you have written.
Re: hypermedia opencv library mac memory leak
Reply #2 - Mar 11th, 2009, 12:31pm
 
one question here - how do you loop through an array of cascades?
Page Index Toggle Pages: 1