Python Forum
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenCV problem
#1
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-casca...-tutorial/

Anybody have any experience with this? Suggestions?

Thanks

P.S.: Don't know haw I ended up with this in the Bar!
Reply
#2
@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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020