Ask Your Question

[OSX] Can't find opencv_createsamples & opencv_traincascade

asked 2019-10-01 20:20:38 -0500

updated 2019-10-02 00:13:54 -0500

berak gravatar image


Im running on OSX mojave 10.14.6 and im facing issue that it miss 2 scripts after the opencv's installation ..

After installing opencv from the repo github (, it installed all apps script except opencv_createsamples & opencv_traincascade ..

How i installed the package :

  1. git clone
  2. cd opencv
  3. mkdir build
  4. cd build
  5. cmake ..

( i remark on this step, in the opencv/build/apps/ directory, there is no createsample & traincascade folder)

  1. make -j 4
  2. sudo make install

Do you guys know why im facing this issue please ?

Thanks by advance for your help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-10-02 00:25:31 -0500

berak gravatar image

the cascade training tools can no more be built in opencv4, after a lot of arcane C-api code was removed.

since you cloned the github repo, you can easily fall back to the 3.4 branch, where those tools are still intact:

git checkout 3.4

then clean your build folder and restart with cmake.

note: it's 2019, and you should rather use some SSD,RCNN or yolo network for object detection, they're much faster / accurate.

edit flag offensive delete link more



Hi, many thanks for your reply and advise !^^ (i just learned opncv about 4 days ago, im totally new haha)

xShadow gravatar imagexShadow ( 2019-10-02 04:46:31 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-01 20:20:38 -0500

Seen: 122 times

Last updated: Oct 02 '19