OpenCV Invalid background description file

前端 未结 5 996
长情又很酷
长情又很酷 2021-01-27 10:54

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

5条回答
  •  时光取名叫无心
    2021-01-27 11:13

    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!

提交回复
热议问题