Ask Your Question
0

cmake build error for 'trancascade' app

asked 2019-08-14 06:01:59 -0500

ppgun gravatar image

Hi,

I followed https://docs.opencv.org/master/d7/d9f..., opencv-4.1.1dev to install succesfully opencv on ubuntu16.04.

When i was following https://docs.opencv.org/master/dc/d88... to try use traincascade, i couldnt find the 'traincascade' app in my opencv/build/bin, then i checked /opencv/apps/CmakeLists.txt, i found that the line "ocv_add_app(traincascade)" was commented out, then i uncommented it.

back to /opencv/build, i run command "cmake ." without problem, but next i run command "make", there poped out plenty of errors, mainly telling:

old_ml.hpp error CvFileStorage has not been declared old_ml.hpp error CvFileNode has not been declared
old_ml.hpp error read_split has not been declared

Can someone tell how to fix this? thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-08-15 12:49:35 -0500

berak gravatar image

with opencv 4.1.0, parts of the deprecated c-api were removed, and those tools (which unfortunately heavily relied on it) can no more be built.

note, that training / using cascades also has been superseeded by cnn methods like ssd, which are much faster.

if you really need those cascade tools, you have to checkout the opencv 3.4 branch (any version of it), and build opencv with :

 cmake -DBUILD_opencv_apps=ON
edit flag offensive delete link more

Comments

Hi, thanks so much, i did as you said and now i have it.

ppgun gravatar imageppgun ( 2019-08-15 23:25:55 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-14 06:01:59 -0500

Seen: 12 times

Last updated: Aug 15