When I try using this Command: opencv_createsamples -img image.jpg -bg bg.txt -info /info/info.lst -pngoutput info -num 2600
it tells me: Invalid background descrip
I had the exact same problem. I tried changing the bg.txt
encoding and it made no difference. I deleted all instances of OpenCV on my Ubuntu server and rebooted. I typed:
git clone https://github.com/Itseez/opencv.git
into the terminal.
Once downloaded, rebooted the server and proceeded with:
opencv_createsamples -img image.jpg -bg bg.txt -info /info/info.lst -pngoutput info -num 1500
That seemed to fix my "Invalid background description file" error.
Bear in mind that I tried to create a new folder and add a fresh download of OpenCV to use on a separate project and it just copied my existing file.
Delete all instances of the OpenCV folder before rebooting and redownloading it!