Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv: train cascade image reader

i try to training a classifier, i have create a file .vec whit create sample and it's ok.

Info file name: C:\OpenCV\positive.txt
Img file name: (NULL)
Vec file name: C:\OpenCV\sample.vec
BG  file name: (NULL)
Num: 20
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 50
Height: 50
Create training samples from images collection...
Done. Created 20 samples

and now use training.bat, this is the file:

C:\OpenCV\opencv-2_4\build\x86\vc10\bin\opencv_traincascade.exe -data classifier -vec "C:\OpenCV\samples.vec" -bg "C:\OpenCV\negative.txt" -npos 20 -nneg 16 -numStages 4 -minHitRate 0.999 -maxFalseAllarmRate 0.5 -w 74 -h 100 -mode ALL -precalcvalBuffSize 256 -precalcdxBufSize 256

But when i call training.bat in dos give me this error:

Image reader can not be created from -vec C:\OpenCV\samples.vec and -bg C:\OpenCV\negative.txt.

Opencv: train cascade image reader

i try to training a classifier, i have create a file .vec whit create sample and it's ok.

Info file name: C:\OpenCV\positive.txt
Img file name: (NULL)
Vec file name: C:\OpenCV\sample.vec
BG  file name: (NULL)
Num: 20
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 50
Height: 50
Create training samples from images collection...
Done. Created 20 samples

and now use training.bat, this is the file:

C:\OpenCV\opencv-2_4\build\x86\vc10\bin\opencv_traincascade.exe -data classifier -vec "C:\OpenCV\samples.vec" -bg "C:\OpenCV\negative.txt" -npos 20 -nneg 16 -numStages 4 -minHitRate 0.999 -maxFalseAllarmRate 0.5 -w 74 -h 100 -mode ALL -precalcvalBuffSize 256 -precalcdxBufSize 256

But when i call training.bat in dos give me this error:

Image reader can not be created from -vec C:\OpenCV\samples.vec and -bg C:\OpenCV\negative.txt.

Can someone help me please?