Ask Your Question

opencv_traincascade giving error: parameters cannot be written, because params.xml cannot be opened.

asked 2013-10-11 01:33:25 -0600

Tanay gravatar image

updated 2013-10-11 01:41:05 -0600

berak gravatar image

i am trying to train a haar cascade using opencv_traincascade.exe with 101 positive samples n the vector file and 50 negative images. what should be my command so that i can avoid the above mentioned problem.

i am using windows 8, 64-bit system.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-29 02:45:05 -0600

r.a. gravatar image

updated 2013-10-29 04:37:00 -0600

You have wrong parameters try something like this:

-data C:\MyProject\data -vec C:\MyProject\Vector.vec -bg C:\MyProject\Neg.txt -numPos 500 -numNeg 2000 -numStages 14 -precalcValBufSize 50 -precalcIdxBufSize 256 -featureType LBP -w 30 -h 26 -minHitRate 0.998 -maxFalseAlarmRate 0.5

Probably in -data you have specified a file instead of folder. See also opencv doc of train_cascade, you have there all the parameters and check in this forum to learn more on the parameters,there are many questions on this topic. Good luck!

edit flag offensive delete link more

Question Tools


Asked: 2013-10-11 01:33:25 -0600

Seen: 4,905 times

Last updated: Oct 29 '13