问题
I am following Creating your own Haar Cascade OpenCV Python Tutorial But when I get to making the samples I get opencv_createsamples: command not found
I am using this to create the samples opencv_createsample -img img.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 573
but I know the command exists because when I do man opencv_createsamples
it pulls up the man page.
I am using ubuntu 20.04.1
回答1:
I have also met this same problem while trying to get Haar Cascade. Similar problem also mentioned here.
According to @Alekhin saying here:
To be able to use
opencv_createsamples
command, you should use opencv version 3.x or lower.
This step(creating samples) is only necessary to get our samples. So my suggestions:
Installing supported opencv version in a docker and getting samples
Installing supported opencv in another machine and getting samples
Note: I don't suggest you to install opencv while other one already exist in your machine.
Same problems also mentioned here and here.
For opencv installation on a docker.
来源:https://stackoverflow.com/questions/63305283/opencv-createsamples-command-not-found-ubuntu