1

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

Pizzarules668
  • 27
  • 2
  • 11

1 Answers1

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:

  1. Installing supported opencv version in a docker and getting samples

  2. 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.

Yunus Temurlenk
  • 4,085
  • 4
  • 18
  • 39