contrib module missing in opencv 3.0? up vote 3 down vote favorite I am using OpenCV 3.0 beta.

I am using OpenCV 3.0 beta.

I tried to create a face recogniser using createLBPHFaceRecognizer(); class as,

   **Ptr <FaceRecognizer> model =  createLBPHFaceRecognizer();**

the error I have is

   **error: 'createLBPHFaceRecognizer' was not declared in this scope**

I have researched and found that the class exists in contrib module of opencv2 (opencv2/contrib/contrib.hpp) in previous versions of OpenCV

But this module is not available in opencv 3.0 beta. So where are the recogniser classes defined in opencv 3.0?

If they are not defined,how can we add this module in addition to the existing modules?

share improve this question
 
up vote 2 down vote accepted

you will have to download and build the opencv_contrib repo.

after running cmake, make, make install,

#include <opencv2/face.hpp>

// note the additional namespace:    
cv::Ptr <cv::face::FaceRecognizer> model = cv::face::createLBPHFaceRecognizer();
// proceed as usual
share improve this answer
 
 
Thanks for your reply..I tried to build opencv_contrib using cmake gui, but i couldnt find any cmake lists in the repository. cmake lists were found in individual modules inside the repository. But building individual modules throws error. how to resolve the problem ? –  Jayendhar Gautham Feb 4 at 14:28
1 
you add the opencv_contrib module to you cmake int the main opencv dir -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules and re-build the main opencv repo, not seperated. –  berak Feb 4 at 14:49
 
Thanks..How to add this path in cmake-GUI "DOPENCV_EXTRA_MODULES_PATH".? –  balajichinna Feb 4 at 15:08
 
click 'grouped', -> opencv ->OPENCV_EXTRA_MODULES_PATH –  berak Feb 4 at 15:11
 
Or just search for "OPENCV_EXTRA_MODULES_PATH" and CMke-gui will find it for you :) –  cyriel Feb 5 at 1:59
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值