aam-opencv is showing errors [closed]

asked 2014-07-22 22:21:47 -0600

Ammu gravatar image

updated 2014-07-22 23:00:43 -0600

I am doing a project on face recognition from surveillance cameras. I have used SURF for feature extraction, If I train and test using the same video it works well. But if I train using one video and test using another video with same people as in the first video it is not showing good matches. When I have an image of a particular person in my database I need to match that face with his different poses(wearing glasses,side pose,if somebody is covering his face) etc. So for improving my algorithm I have tried active appearance model(AAM). I have downloaded the source code from this website. But it is showing errors like,

/home/athira/project_images/neural/aam-opencv/src/delaunay.cpp:168: undefined reference to `cvGet2D'
/home/athira/project_images/neural/aam-opencv/src/delaunay.cpp:200: undefined reference to `cvCreateImage'
/home/athira/project_images/neural/aam-opencv/src/delaunay.cpp:438: undefined reference to `cvCreateMat'
/home/athira/project_images/neural/aam-opencv/src/delaunay.cpp:455: undefined reference to `cvReleaseMat' 
/home/athira/project_images/neural/aam-opencv/src/delaunay.cpp:469: undefined reference to `cvNamedWindow'

Actually all the opencv libraries are installed, then also it is showing this errors. Usually I used to compile opencv programs using the below mensioned command,

g++ -ggdb `pkg-config --cflags opencv` -o `basename backproj.cpp .cpp` backproj.cpp-lmysqlclient `pkg-config --libs opencv`

But I compiled AAM using the commands which mensioned in the url. Is this is the problem for showing these errors then how can we avoid those errors.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-06 23:27:13.939040

Comments

I have downloaded the source code from this website, you haven’t provided the link. Also check out the implementation here

Haris gravatar imageHaris ( 2014-07-22 22:56:49 -0600 )edit

Please give me a valid answer

Ammu gravatar imageAmmu ( 2014-07-22 23:33:42 -0600 )edit
1

it somehow fails to link opencv libs.

see what pkg-config --libs opencv actually prints on the console.

berak gravatar imageberak ( 2014-07-23 00:43:21 -0600 )edit
1

Your pkg-config is only linking your opencv2 module and not the old opencv module and header files. You should be sure that you are linking to the old obsolete C - API for your code to work.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-23 03:44:04 -0600 )edit

How we can manually link opencv libs in ubuntu?

Ammu gravatar imageAmmu ( 2014-07-23 04:13:22 -0600 )edit

By adding the; to your building path. You should add -L /opencv_path/ to your compiler settings.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-23 04:33:10 -0600 )edit