Bug 355076 - opencvfacedetector.cpp compile fails with opencv-3.0.0
Summary: opencvfacedetector.cpp compile fails with opencv-3.0.0
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 5.0.0
Platform: Other Other
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 12:29 UTC by Treeve Jelbert
Modified: 2017-08-19 20:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Treeve Jelbert 2015-11-09 12:29:53 UTC
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp:115:1: error: expected class-name before '{' token
 {
 ^
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp: In constructor 'FacesEngine::Cascade::Cascade(const QStringList&, const QString&)':
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp:132:37: error: 'load' was not declared in this scope
         if (!load(file.toStdString()))
                                     ^
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp: In member function 'QList<QRect> FacesEngine::OpenCVFaceDetector::cascadeResult(const cv::Mat&, FacesEngine::Cascade&, const FacesEngine::DetectObjectParameters&) const':
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp:448:17: error: 'class FacesEngine::Cascade' has no member named 'empty'
     if (cascade.empty())
                 ^
/var/git/qt5/kde5-apps/digikam/libs/facesengine/detection/opencvfacedetector.cpp:464:13: error: 'class FacesEngine::Cascade' has no member named 'detectMultiScale'
     cascade.detectMultiScale(inputImage, faces,
             ^


cmake reports:

-- First try at finding OpenCV...
-- Great, found OpenCV on the first try.
-- OpenCV Root directory is: /opt/qt5/share/OpenCV
-- OpenCV: Found version 3.0.0 (required: 3.0.0)
-- OpenCV headers: /opt/qt5/include/opencv;/opt/qt5/include
-- OpenCV libs   : opencv_core;opencv_face;opencv_highgui;opencv_objdetect;opencv_imgproc



Incidentally, need to explicitly search for face module with opencv-3

Reproducible: Always
Comment 1 caulier.gilles 2015-11-09 14:26:40 UTC
Git commit 1888426f573739f3afa802182916ca3cc5e6c3d8 by Gilles Caulier.
Committed on 09/11/2015 at 14:25.
Pushed by cgilles into branch 'master'.

opencv3 face component is mandatory to compile digiKam 5.0.0

M  +1    -1    CMakeLists.txt

http://commits.kde.org/digikam/1888426f573739f3afa802182916ca3cc5e6c3d8
Comment 2 caulier.gilles 2015-11-09 14:30:14 UTC
Git commit 1942121374a419cff069479a1b6d3446dcca915b by Gilles Caulier.
Committed on 09/11/2015 at 14:29.
Pushed by cgilles into branch 'master'.

Specified OpenCV modules are always mandatory

M  +1    -1    cmake/modules/MacroOpenCV.cmake

http://commits.kde.org/digikam/1942121374a419cff069479a1b6d3446dcca915b
Comment 3 caulier.gilles 2015-11-09 14:54:47 UTC
The OpenCV3::Face component required to compile digiKam 5.x is available in Opencv_Contrib module. OpenCV3 must be compiled with this extra contrib module.

Opencv_Contrib is avaialble here :

https://github.com/Itseez/opencv_contrib

Gilles Caulier
Comment 4 caulier.gilles 2015-11-09 21:34:58 UTC
Git commit b400f57f7c457b0bac5ea3d4fd39fbde0c5e11e5 by Gilles Caulier.
Committed on 09/11/2015 at 21:31.
Pushed by cgilles into branch 'master'.

we don't need opencv3::face contrib module. This one is now integrated in FaceEngines as well.
As usual, OpenCV make the puzzle. With version 3, and all the contrib modules never released as a dedicated tarball,
this code will stay in beta stage for a while. This is not a safe situation, if OpenCV3 packager do not integrate face module in standard.
The OpenCV3::face implementation is just adated to be compiled outside the contrib structure, that all...

M  +1    -1    CMakeLists.txt
M  +3    -1    app/utils/libopencv.h.cmake.in
M  +16   -1    libs/facesengine/CMakeLists.txt
A  +147  -0    libs/facesengine/opencv3-face/eigen_faces.cpp     [License: Public Domain]
A  +360  -0    libs/facesengine/opencv3-face/face.hpp     [License: Unknown license]  *
A  +177  -0    libs/facesengine/opencv3-face/face_basic.hpp     [License: UNKNOWN]  *
A  +78   -0    libs/facesengine/opencv3-face/facerec.cpp     [License: Public Domain]
A  +168  -0    libs/facesengine/opencv3-face/facerec.hpp     [License: UNKNOWN]  *
A  +167  -0    libs/facesengine/opencv3-face/fisher_faces.cpp     [License: Public Domain]
A  +435  -0    libs/facesengine/opencv3-face/lbph_faces.cpp     [License: Public Domain]
A  +58   -0    libs/facesengine/opencv3-face/precomp.hpp     [License: Unknown license]  *
M  +4    -0    libs/facesengine/recognition-opencv-lbph/facerec_borrowed.h

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


http://commits.kde.org/digikam/b400f57f7c457b0bac5ea3d4fd39fbde0c5e11e5