Ask Your Question
0

How to compile the example "facerec_video.cpp"?

asked 2014-10-05 21:30:37 -0600

Hello. I got some problems to compile the example "Face Recognition in Videos with OpenCV" (problem with facerec_video.cpp). The problem is that i don't understand where is the "include files"

#include "opencv2/core.hpp"
#include "opencv2/face.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/objdetect.hpp"

I installed opencv-2.4.9. Is this the problem? In /usr/local/include i found the opencv2 folder with all the header files. Really there was some differences: core.hpp was in opencv2/core/core.hpp, highgui.hpp in opencv2/highgui/highgui.hpp and so on but can't find face.hpp.

Help me please!

edit retag flag offensive close merge delete

Comments

hi andrei, put you entire code once then easy to found where is problem, and in your question there is ambiquity too..

govardhana padavala gravatar imagegovardhana padavala ( 2014-10-06 01:13:21 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-10-06 03:30:49 -0600

berak gravatar image

updated 2014-10-06 03:31:44 -0600

"I installed opencv-2.4.9. Is this the problem?" - yes, it seems the sample you're trying is for 3.0..

for 2.4.9, use(this example) and:

 #include "opencv2/contrib/contrib.hpp"

if you use 3.0, get the opencv_contrib repo, and

 #include "opencv2/face.hpp"
edit flag offensive delete link more
0

answered 2014-10-13 07:31:13 -0600

I solve the problem by making a clean up. The problem was that i installed opencv from repo and than from source (cmake/make/make install). So i solve by removing the 'form source version' of opencv.

To compile (facerec_video.cpp v2.4.9 here) i use opencv from repo and run:

g++ `pkg-config --cflags opencv` -o facerec_video facerec_video.cpp `pkg-config --libs opencv`

Thanks for help!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-10-05 21:30:37 -0600

Seen: 1,954 times

Last updated: Oct 13 '14