dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
420 stars 90 forks source link

facedetect / opencv : fix build cv < 3.0 #58

Closed d-j-a-y closed 5 years ago

jaromil commented 5 years ago

utACK, I believe this is needed and would merge even without testing with both versions. CI Tests pass. thanks!

rrrapha commented 5 years ago

Both versions work for me with OpenCV 2.4.13 on OpenBSD.

..but wouldn't it be better to just include all the opencv headers like this? #include <opencv2/opencv.hpp>

ddennedy commented 5 years ago

but wouldn't it be better to just include all the opencv headers like this? #include <opencv2/opencv.hpp>

That works for me as well. I suggested module-specific form because I seem to recall it was suggested, and it is generally better practice in modular projects (e.g. Qt). However, considering the difficulty we are facing with OpenCV's header changes, I think it is better to take the safer route. Can we please all test that general include? It works for me on OpenCV 3.2.

d-j-a-y commented 5 years ago

..but wouldn't it be better to just include all the opencv headers like this?

include <opencv2/opencv.hpp>

works for me (deb9 opencv 2.4.9.1)