opencv_createsamples: command not found ubuntu

爷,独闯天下 提交于 2021-01-28 14:24:07

问题


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:

  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.



来源:https://stackoverflow.com/questions/63305283/opencv-createsamples-command-not-found-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!