Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Haar Cascade training outOfMemory error.. help!!

Hi,

I need to find patterns in manually set ROI. The patterns are not complicated so I decided to use Haar Cascade Pattern Detection. In order to do that, I needed to train my samples first using "opencv_traincascade.exe" so I grabbed 38 positive images and a few negative images. For the positive images, I tried two different sizes, 100 x 64 and 50 x 32, to train.

But everytime I try run my opencv_traincascade.exe, it returns with outOfMemory error: "OpenCV Error: Insufficient memory error (failed to allocate 3.8GB) in cv::OutOfMemoryError, file: c:\builds\2_4_PackSlace-win32-vc12-shared\opencv\modules\core\src\alloc.cpp line 52"

When I tried two difference positive sample sizes, the memory size in the error message was exactly same so I don't think it's sample size.

The command I entered in my cmd was: opencv_traincascade -vec positive.txt -bg negative.txt -data output -featureType LBP

Why does this happen and how do I fix it? Please help!!