What kind of images should I use to train a haarcascade classifier for sad mouth detection to reduce memory use?
显示 更早的评论
I am trying to make a haarcascade classifier using the trainCascadeObjectDetector ( http://www.mathworks.com/help/vision/ref/traincascadeobjectdetector.html ). I want this classifier to detect sad mouths and use it for emotion detection with opencv. I have gathered 1265 possitive images with sad faces and specified the mouths with ROIs using the Training Image Labeler app. I also gathered 12000 negative images with faces having mouths in other positions. All my images are pgm and coloured. When I run the trainCascadeObjectDetector I get a warning "file ended while reading image data." for the negative images folder, after that the procedure starts normally and finally stops with this error: "Error using ocvTrainCascade Error in c:\temp\a3p0_5828a_1708\win64\opencv\modules\core\src\alloc.cpp: Insufficient memory." Do I have to change the format of the photos? Do I need to crop them pointing only the face? Do they need to be grayscale? Or all these will slightly affect the physical memory usage?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Computer Vision Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!