Reputation: 155
In Open Cv 3.0.0 FaceRecognizer class cannot be resolved while compiling in Linux (Ubuntu). This used to work in 2.4.11 version and the class was present in the contrib module. Looks like the contrib module is missing in the Open cv 3.0.0 version.
Upvotes: 0
Views: 691
Reputation: 155
The contrib module by default doesn't come with the installation of open cv 3.0.0
The contrib module has to be separately installed. Please follow the instructions below to get rid of the compilation issue with FaceRecognizer class.
cmake -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules opencv_source_directory
In the above command, opencv_contrib is the opencv contrib module directory path that you have downloaded from the github link [https://github.com/Itseez/opencv_contrib/tree/3.0.0-rc1][1]. opencv_source_directory is the source directory of the opencv, which would be typically the open cv root folder where you extracted or downloaded it, this would be ../ if you have followed open cv tutorial instructions for installing and creating the release or build folder
I used RC1 tag of open cv 3.0.0 from github, you can use tag of your choice.
make -j $(nproc)
sudo make install
using namespace cv; using namespace face;
Now you shouldn't see any compilation issue.
Upvotes: 1