opencv_createsamples from image collections allowing create samples same count as positive images

asked 2014-11-05 17:44:11 -0500

OrkunK gravatar image

updated 2014-11-06 14:24:36 -0500

Hi everyone. I'm trying to create samples from hand images to recognize hand. When I want to create samples from an image there is no problem and opencv_createsamples is creating (sample count defined with -num parameter and image file with -img) *.vec file but when I want to create samples from images collection (with positive images file and name info parameter -info and again with -num) opencv_createsamples's output is (for example; I've 500 positive image and I'm giving 1000 for -num and my image info file at /opt/hand/pos.txt);

/opt/hand/pos.txt(501) : parse errorDone. Created 500 samples

when I change the -num parameter to 500 it's just write to terminal Done. Then I train the classifier for -numStages 10 but train process ended at 4th stage (but the output is not an error here the link 3rd answer is saying). Is this normal (I think not because if -num X and -img just one X samples will be created but if -info has 10 images mustn't it be 10X)? I'm using OpenCV2.4.8 on Ubuntu 12.04. At the last I've tried to get capture from webcam and tried to recognize the hand but program detected few things without hand ( but it detected my face :) I think 2nd one probably about the positive and negative images count but the first one I'm not figuring why. Thanks.

edit retag flag offensive close merge delete


still there is no answer.

OrkunK gravatar imageOrkunK ( 2014-11-07 03:27:45 -0500 )edit