Skip to content

fix(opencv): Include cascade detector in OpenCV 5 - #334

Merged
jaromil merged 1 commit into
dyne:masterfrom
rautyrauty:fix/opencv5-cascade
Nov 20, 2026
Merged

jaromil merged 1 commit into
dyne:masterfrom
rautyrauty:fix/opencv5-cascade

Conversation

@rautyrauty

Copy link
Copy Markdown
Contributor

Rebuilding against the new libopencv 5.1 package fails because OpenCV 5 moves Haar cascade detection to the contrib xobjdetect module. Its API is no longer declared by opencv2/opencv.hpp, so both facebl0r and facedetect fail to compile:

facebl0r.cpp:69:9: error: 'CascadeClassifier' in namespace 'cv' does not name a type
69 | cv::CascadeClassifier cascade;
| ^~~~~~~~~~~~~~~~~

Closes: #289

Rebuilding against the new libopencv 5.1 package fails because OpenCV 5
moves Haar cascade detection to the contrib xobjdetect module. Its API
is no longer declared by opencv2/opencv.hpp, so both facebl0r and
facedetect fail to compile:

  facebl0r.cpp:69:9: error: 'CascadeClassifier' in namespace 'cv' does not name a type
     69 |     cv::CascadeClassifier cascade;
        |         ^~~~~~~~~~~~~~~~~

Closes: dyne#289
@jaromil
jaromil merged commit d6b25f2 into dyne:master Nov 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support opencv 5

2 participants