Reputation: 37
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
Upvotes: 2
Views: 6383
Reputation: 51
I am using Ubuntu 20.04, and I had the same problem.
I recommend using the Conda environment with the following Python version:
conda create -n NAME python=3.6.13
Also, install OpenCv version 3.4.0
and it will be solved.
Upvotes: 0
Reputation: 4342
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.
Upvotes: 2