For OpenCV, FaceRecognizer class is not found on Ubuntu. [closed]

asked 2017-11-20 08:41:35 -0500

venkatesh-u gravatar image

I am using java for this but FaceRecognizer class is not detected.
I got some hint for this, in ubuntu when we use cmake command for building opencv-contrib it generates java folder but in ubuntu, there is no java folder in module directory. is that where something going wrong??
If it is the reason, somewhere someone has posted a solution for that

In this link, CMakeLists.txt is added with some lines and running the cmake command and compiling it is also not working.
Could you please post the solution.
Thank you.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-30 09:36:59.945287


  • please add the cmake output to your question
  • if there are any errors, we need to see them, too !
  • what are you trying to do with the face-recognition ?
berak gravatar imageberak ( 2017-11-20 09:12:16 -0500 )edit

Output: (con) --There are no errors and its configured completely too. -- working in windows but not ubuntu. I need it to be in ubuntu. -- Doing an application which recognizes the faces for that i need face-recognition class.

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-20 23:38:32 -0500 )edit

we cannot help you, if all you can say is: "does not work"

berak gravatar imageberak ( 2017-11-21 01:49:34 -0500 )edit

I have followed the below link for installation of opencv and opencv-contrib and used java language as building the application. can you find out anything is wrong in these commands.

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 07:47:30 -0500 )edit

showing tutorials you tried to follow is entirely useless. we need to know, what YOU did, not someone else.

berak gravatar imageberak ( 2017-11-21 08:17:20 -0500 )edit

sudo apt-get update sudo apt-get upgrade

sudo apt-get remove x264 libx264-dev

sudo apt-get install build-essential checkinstall cmake pkg-config yasm gfortran git sudo apt-get install libjpeg8-dev libjasper-dev libpng12-dev

If you are using Ubuntu 14.04

sudo apt-get install libtiff4-dev sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev sudo apt-get install libxine2-dev libv4l-dev sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev sudo apt-get install libqt4-dev libgtk2.0-dev libtbb-dev sudo apt-get install libatlas-base-dev sudo apt-get install libfaac-dev libmp3lame-dev libtheora-dev sudo apt-get install libvorbis-dev libxvidcore-dev sudo apt-get install libopen

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 08:26:59 -0500 )edit

sudo apt-get install libprotobuf-dev protobuf-compiler sudo apt-get install libgoogle-glog-dev libgflags-dev sudo apt-get install libgphoto2-dev libeigen3-dev libhdf5-dev doxygen

Download opencv & opencv_contrib from Github

git clone cd opencv git checkout 3.3.0 cd ..

git clone cd opencv_contrib git checkout 3.3.0 cd ..

cd opencv mkdir build cd build


venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 08:30:36 -0500 )edit

Compile and Install

make -j4
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/'
sudo ldconfig

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 08:34:27 -0500 )edit

cmake output

OpenCV modules: -- To be built:
core flann hdf imgproc ml objdetect phase_unwrapping photo plot reg surface_matching video viz xphoto bgsegm dnn face freetype fuzzy img_hash imgcodecs shape videoio xobjdetect highgui superres ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco java optflow sfm stitching python2
-- Disabled: world contrib_world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python3 cnn_3dobj cvv dnn_modern matlab

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 08:40:41 -0500 )edit

-- QT 4.x: YES (ver 4.8.6 EDITION = OpenSource)
-- QT OpenGL support: YES (/usr/lib/x86_64-linux-gnu/
-- OpenGL support: YES (/usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
/usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/

-- VTK support: YES (ver 5.8.0)

-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/ (ver 1.2.8)
-- JPEG: /usr/lib/x86_64-linux-gnu/ (ver )
-- WEBP: build (ver encoder: 0x020e)

venkatesh-u gravatar imagevenkatesh-u ( 2017-11-21 08:42:41 -0500 )edit