Python Forum
OpenCV problem - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Bar (https://python-forum.io/forum-27.html)
+--- Thread: OpenCV problem (/thread-11124.html)



OpenCV problem - jogl - Jun-23-2018

I am trying to create my own Haar Cascade classifier.

I keep getting the "Invalid background description file." error.
jogl@shacku:~/opencv$ opencv_createsamples -img slip5050.jpg -bg bg.txt -info info.lst -pngoutput out1 -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 5
Info file name: info.lst
Img file name: slip5050.jpg
Vec file name: (NULL)
BG  file name: bg.txt
Num: 5
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 0.5
Max y angle: 0.5
Max z angle: 0.5
Show samples: FALSE
Width: 24
Height: 24
Max Scale: -1
Create test samples from single image applying distortions...
Open background image: 1.jpg 1 0 0 200 200
Open background image: 1.jpg 1 0 0 200 200
Open background image: 20.jpg 1 0 0 200 200
Open background image: 17.jpg 1 0 0 200 200
Open background image: 18.jpg 1 0 0 200 200
Open background image: 11.jpg 1 0 0 200 200
Open background image: 27.jpg 1 0 0 200 200
Open background image: 18.jpg 1 0 0 200 200
Open background image: 14.jpg 1 0 0 200 200
Open background image: 22.jpg 1 0 0 200 200
Open background image: 22.jpg 1 0 0 200 200
Open background image: 7.jpg 1 0 0 200 200
Open background image: 5.jpg 1 0 0 200 200
Open background image: 25.jpg 1 0 0 200 200
Open background image: 8.jpg 1 0 0 200 200
Open background image: 16.jpg 1 0 0 200 200
Open background image: 14.jpg 1 0 0 200 200
Open background image: 2.jpg 1 0 0 200 200
Open background image: 1.jpg 1 0 0 200 200
Open background image: 22.jpg 1 0 0 200 200
Open background image: 22.jpg 1 0 0 200 200
Open background image: 5.jpg 1 0 0 200 200
Open background image: 14.jpg 1 0 0 200 200
Open background image: 15.jpg 1 0 0 200 200
Open background image: 11.jpg 1 0 0 200 200
Open background image: 7.jpg 1 0 0 200 200
Invalid background description file.
jogl@shacku:~/opencv$ 
I have tried this on two different computers, one running Debian 9 and the other Ubuntu 18.04.

I have tried all the solutions that I could find on the web.

I was roughly following the tutorial here: https://pythonprogramming.net/haar-cascade-object-detection-python-opencv-tutorial/

Anybody have any experience with this? Suggestions?

Thanks

P.S.: Don't know haw I ended up with this in the Bar!


RE: OpenCV problem - j.crater - Jun-23-2018

@jogl - I moved the thread to Bar because it is not a general Python coding question. You are using a very specific library/program, which we don't even see.

If you share your original code from which it would be possible to trace the source of error, thread can go back to programming subforum.