使用flandmark库的面部特征点 - MATLAB r2013d

时间:2014-02-03 09:57:14

标签: matlab image-processing computer-vision feature-detection feature-extraction

我想使用flandmark库查找面部特征点。但是我得到了这个编译错误。

按照指示,我尝试编译flandmark_compilemex.m

编译后显示以下错误:

Warning: MEX could not find the library "flandmark_static" specified with -l option. 
     MEX looked for a file with one of the names: 
           flandmark_static.lib 
           libflandmark_static.lib 
     MEX looked for the library in the following directories: 
           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\LIB\amd64 
           C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\LIB\amd64 
           C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64 
           C:\Program Files\MATLAB\R2013b\extern\lib\win64 
           C:\Program Files (x86)\Microsoft Visual Studio\VC98\mfc\lib 
           C:\Program Files (x86)\Microsoft Visual Studio\VC98\lib 
           C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft 
           ../bin7/libflandmark/Release 

Creating library
    C:\Users\Revathy\AppData\Local\Temp\mex_dVbrg8\templib.x
and object
    C:\Users\Revathy\AppData\Local\Temp\mex_dVbrg8\templib.exp 
flandmark_detector_mex.obj: error LNK2019:
    unresolved external symbol
        "int __cdecl flandmark_detect(struct _IplImage *,int *,struct model_struct *,double *,int *)"
        (?flandmark_detect@@YAHPEAU_IplImage@@PEAHPEAUmodel_struct@@PEAN1@Z)
    referenced in function mexFunction 
C:\OpenCV2.3\build\bin\flandmark-master\flandmark-master\matlab_toolbox\mex\flandmark_detector.mexw64:
    fatal error LNK1120: 1 unresolved externals 
C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL:
    Error: Link of
        'C:\OpenCV2.3\build\bin\flandmark-master\flandmark-master\matlab_toolbox\mex\flandmark_detector.mexw64'
    failed. 

Unable to complete successfully.

Error in flandmark_compilemex (line 79)
    eval(['mex -O -largeArrayDims ./mex/flandmark_detector_mex.cpp -I../libflandmark/'
include libflandmark cvlibs ' -output ../matlab_toolbox/mex/flandmark_detector']);

我不知道如何在matlab中编译库文件flandmark_static。任何人请建议我一步一步安装库。

1 个答案:

答案 0 :(得分:0)

我对编译flandmark有同样的问题。要生成Flandmark_static库,首先使用CMAKE生成解决方案,然后运行项目flandmark-static。这样你就不会收到警告。看看你是否可以用这种方式生成MEX文件。