ubuntu 12.04 - Error in trying Face recognition demo in opencv -


i using ubuntu 12.04, , have installed opencv 2.4 (actually, installed ros, opencv gets installed it) trying run demo , getting error:

usama@ubuntu:~/desktop/opencv/advanced/face recognition$ g++ `pkg-config opencv --cflags` face_recog.cpp -o face_recog `pkg-config opencv --libs` face_recog.cpp: in function ‘int main(int, const char**)’: face_recog.cpp:119:30: error: ‘class cv::facerecognizer’ has no member named ‘getmat’ face_recog.cpp:121:20: error: ‘class cv::facerecognizer’ has no member named ‘getmat’ facerecog.cpp:123:23: error: ‘class cv::facerecognizer’ has no member named ‘getmat’ 

any idea, how can rid of error ? should upgrade opencv new version ?

only since opencv 2.4.2 can use cv::algorithm functions getmat(...) cv::facerecognizer. cv::facerecognizer in (the official) opencv 2.4.0 , opencv 2.4.1 wasn't based on cv::algorithm, examples opencv 2.4.2 documentation won't work opencv 2.4.0/2.4.1 release.

so yes, suggest updating opencv 2.4.2. it's been officially released days ago, see new user page @ http://www.opencv.org.

if can't update opencv, either try opencv 2.4.0/2.4.1 compatible demo:

or give libfacerec try, has same interface opencv 2.4.2 implementation:

it depends on opencv version. if using opencv 2.3, try version 0.04 of libfacerec. however, if using opencv 2.4.2 , have problems, please issue bug on official opencv bugtracker:

in case didn't notice. can ask opencv related questions on:

where lot of opencv experts are.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -