Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8187843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:42:00+00:00 2026-06-07T02:42:00+00:00

i am using ubuntu 12.04, and i have installed opencv 2.4 (actually, i installed

  • 0

i am using ubuntu 12.04, and i have installed opencv 2.4 (actually, i installed ROS, opencv gets installed with it) i am trying to run this demo and i am getting this 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 i get rid of this error ? should i upgrade opencv to a new version ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:42:02+00:00Added an answer on June 7, 2026 at 2:42 am

    Only since OpenCV 2.4.2 you can use the cv::Algorithm functions like getMat(...) for the cv::FaceRecognizer. The cv::FaceRecognizer in (the official) OpenCV 2.4.0 and OpenCV 2.4.1 wasn’t based on cv::Algorithm, so the examples from the OpenCV 2.4.2 documentation won’t work with the OpenCV 2.4.0/2.4.1 release.

    So yes, I would suggest updating to OpenCV 2.4.2. It’s been officially released some days ago, see the new user page at http://www.opencv.org.

    If you can’t update OpenCV, then you could either try a OpenCV 2.4.0/2.4.1 compatible demo:

    • http://bytefish.de/dev/cpp/facerec_demo.cpp

    Or you give libfacerec a try, which has the same interface as the OpenCV 2.4.2 implementation:

    • https://github.com/bytefish/libfacerec

    It really depends on your OpenCV Version. If you are using OpenCV 2.3, then try the version 0.04 of libfacerec. However, if you are using OpenCV 2.4.2 already and you have problems, then please issue a bug on the official OpenCV bugtracker:

    • http://code.opencv.org.

    In case you didn’t notice. You can also ask OpenCV related questions on:

    • http://answers.opencv.org/questions

    Where a lot of OpenCV experts are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Ubuntu and i have installed Griffon by taking the steps from this
I have installed rabbitmq on ubuntu and trying to start it using rabbitmq-server start
I have installed the vim-latex package using Ubuntu Synaptic package manager and updated my
I am using Ubuntu 9.04 I have installed the following package versions: unixodbc and
I am running windows 7 and have installed an Ubuntu machine using virtual box.
I have installed KVM on my Ubuntu system. Using vmbuilder , I setup a
I have a machine with Ubuntu 12.04 and have installed Jenkins ver. 1.424.6 using
I have installed wxWidgets 2.9.3 on Ubuntu 10.10 using ../configure --with-gtk I am using
I have installed the latest 0.18.1 DocBlox on Ubuntu 11.10 using PEAR. Everything seems
I'm running Ubuntu 11.10 and have installed rvm using the standard instructions listed here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.