long story short .... as other similar thread on argument .... the file path was wrong ....
the path valid in every situation right path, situation, TESTED ONLY ON UBUNTU (using gedit "classic" scheme colour+characters):
/home/yourFolder/pos - /home/yourFolder/neg/home/yourFolder/pos (folder of positives images)
- /home/yourFolder/neg (folder of negatives images)
- /home/yourFolder/positives.txt
- /home/yourFolder/cars.info
- /home/yourFolder/cars.vec
- /home/yourFolder/bg.txt
/home/yourFolder/data/......../home/yourFolder/data (folder of result "xml" file) - in my case: yourFolder = b/Scrivania
the erroneus PATH:
- inside positives.txt = pos/yourimage.png <--- these is right
- inside cars.info = pos/yourimage.png 1 0 0 100 40 <--- these is right
- inside bg.txt = neg/yourimage.png THESE IS ABSOLUTELY WRONG
- OTHER IS ALL RIGHT
THE RIGHT PATH INSIDE FILE:
- inside positives.txt = pos/yourimage.png <--- OK
- inside cars.info = pos/yourimage.png 1 0 0 100 40 <--- OK
- inside bg.txt = /home/yourFolder/neg/yourimage.png THESE RIGHT
- OTHER IS ALL RIGHT
so is possible to use the command as explain into tutorial and make the cascade ....
THE COMMAND:
- for make cars.info
file:
file:
find /home/yourFolder/pos -name '*.pgm' -exec echo {} 1 0 0 100 40 \; > /home/yourFolder/cars.info - for make bg.txt
file
file:
find /home/yourFolder/neg -name -iname '*.pgm' -exec echo {} \; > /home/yourFolder/bg.txt - for make
cars.vec
cars.vec:
opencv_createsamples -info /home/yourFolder/pos/cars.info -numPos 550 -w 48 -h 24 -vec /home/yourFolder/cars.vec - for
traincascade
traincascade:
opencv_traincascade -data /home/yourFolder/data -vec /home/yourFolder/cars.vec -bg ~/home/yourFolder/bg.txt -numPos 500 -numNeg 500 -numStages 2 -w 48 -h 24 -featureType LBP
Problem Solved!