Pregunta

I am using opencv 2.4.2 and C++. I am trying to implement flandmarker detector in C++ and came across this post Cant get Flandmarks to work, C++, Error LNK2019, Unresolved external symbol . I tried doing the same,that is, I added the Additional Include Directories under C/C++ and Linker,added the additional dependencies under Input and download this file https://codeload.github.com/uricamic/flandmark/zip/master from the flandmarker website,extracted those files and put them in my project folder. I even did what @dervish said below. But still I get the error below enter image description here. Also if I do not include the opencv_***244d.lib files in the linker I get this error enter image description here.I searched for those opencv_***244d.lib files on my pc but could not find any. I really need to get this working. Can anyone help with this please?

¿Fue útil?

Solución

I am also using the same library to detect facial feature points recently.

You can make it work by following the follwowing steps:

  1. Make sure you add the correct OpenCV-Path\build\include and OpenCV-Path\build\x86\vc10\lib (all OpenCV libs you added to your project should be found here) to the project.

  2. For liblbp.h file, change

    #include "msvc-compat.h"
    

    to

    #include <stdint.h>
    
  3. For flandmark_detector.h file, change

    #include "msvc-compat.h"
    #include <cv.h>
    #include <cvaux.h>
    

    to

    #include <stdint.h>
    
    #include "opencv2/opencv.hpp"
    #include "opencv2/objdetect/objdetect.hpp"
    #include "opencv2/highgui/highgui.hpp"
    #include "opencv2/imgproc/imgproc.hpp"
    
    #include <iostream>
    #include <stdio.h>
    
    using namespace std;
    using namespace cv;
    

You can download the workable VS10 project of this library here.

Note: I also added the OpenCV library in the project so that it should run well without any extra setting.

After running this, you should achieve something like this:

enter image description here

Otros consejos

Go to the file flandmark_detector.h, replace

#include <cv.h>
#include <cvaux.h>

by

#include <opencv/cv.h>
#include <opencv/cvaux.h>

because those files have this path:

/opencvDIR/include/opencv

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top