The source code does not compile as some of the files with the old_ml prefix in the source code make reference to a CvFileStorage data structure. This seems not to be present in version 4.x of OpenCV (Documentation has it listed in version 3.x).
How can I build this application ? (I would like to for version 4.x and 32-bit & 64-bit, dynamic linked & static linked)
indeed, the train cascade tools can no longer be built with 4.x
as of now, you have to checkout the 3.4 branch (which still has the missing c-api parts) by either
// if you got it via git, just change the branch
cd opencv
git checkout 3.4
// else download anew
git clone -b 3.4 https://github.com/opencv/opencv.git
anyway, you’ll have to remove all your previous cmake artefacts, and start all over.
I tried building with 3.4. But I get huge amount of compiler errors.
Are you sure it actuallywill compile with 3.4 ?.
Can you give fool-proofstep by step instructions, from scratch? (include all steps such as download,extract,configuration,setup,Visual Studio Project configuration, etc…), for every file. - For Static and Dynamic (Shared), 32-Bit and 64-Bit, using Visual Studio 2019 ( Windows 7 SP1)
sorry, i can’t, not using VS (mayne someone else ?)
this is controlled by a cmake flag, irresp. of the compiler used.
in cmake, set BUILD_SHARED_LIBS=OFF for building and linking against static libs
apart from that, please clarify, what you want to detect later (is this even the correct tool ?)
have you considered different means to do so, like HogDetector or some (pre or re) - trained network ?
Yes correct tool, been referred to it by the tutorials.
When compiling I get Build error output:
1>C:\OpenCV_3.4.13\traincascade\old_ml_precomp.hpp(49,10): fatal error C1083: Cannot open include file: 'opencv2/core/private.hpp': No such file or directory
Hello, I know this is old but I´m having the same trouble, also I download the 3.4 version of opencv and opencv_contrib and configured it with cmake but then when I load the solution with visual studio 2019 I get a lot of compiler errors so I guess the only thing that we can do is to fix all those hundreds and unplacent errors… Maybe now with ChatGPT we can fix those errors? don´t know for sure
please, ask a new question, describe exactly, what you are trying to detect, and where (in 95% of all cases, cascades are the wrong tool for it, anyway !!!)