能否更新下你的库

102 views
Skip to first unread message

movingh...@gmail.com

unread,
Feb 17, 2016, 4:00:43 AM2/17/16
to ASMLibrary
yaowei,

你好,很感谢你的这个库,目前在人脸关键点检测方面这个是效果最好的。
现在我试用时出了一些问题:
环境:
g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
opencv版本: 3.0
操作系统: ubuntu14.04,64bit;

操作:
cd asmlibrary/linux
(makefile第15行改为:g++ -pg -o fit vjfacedetect.o video_camera.o demo_fit.o  -Wl,-rpath=./ -    L./ -lasmlibrary)
make

报错:
$ make
g++  -I/usr/local/include/opencv -O2 -Wall -pg -g -MD  -c -o demo_fit.o ../src/demo_fit.cpp
../src/demo_fit.cpp: In function ‘int main(int, char**)’:
../src/demo_fit.cpp:88:6: warning: variable ‘camera_idx’ set but not used [-Wunused-but-set-variable]
  int camera_idx = 0;
      ^
g++  -I/usr/local/include/opencv -O2 -Wall -pg -g -MD  -c -o vjfacedetect.o ../src/vjfacedetect.cpp
g++  -I/usr/local/include/opencv -O2 -Wall -pg -g -MD  -c -o video_camera.o ../src/video_camera.cpp
g++ -pg -o fit vjfacedetect.o video_camera.o demo_fit.o  -Wl,-rpath=./ -L./ -lasmlibrary 
/usr/bin/ld: skipping incompatible .//libasmlibrary.so when searching for -lasmlibrary
/usr/bin/ld: cannot find -lasmlibrary
collect2: error: ld returned 1 exit status
make: *** [fit] Error 1

猜测原因:
opencv的版本太久或者g++的版本太久;

请求:
能否更(基于opencv3.0)新下你的这个库


谢谢!

Yao Wei

unread,
Feb 17, 2016, 8:43:15 AM2/17/16
to asmli...@googlegroups.com

64位系统应该用libasmlibrary64. so

Yao Wei
From Android's Gmail

--

---
You received this message because you are subscribed to the Google Groups "ASMLibrary" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asmlibrary+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

movingh...@gmail.com

unread,
Feb 17, 2016, 10:20:44 AM2/17/16
to ASMLibrary
感谢你的回复!
后来把makefile文件中的15行改为:
g++ -pg -o fit vjfacedetect.o video_camera.o demo_fit.o  -Wl,-rpath=./ -    L./ -lasmlibrary64
编译成功,但是运行(已拷贝相应文件到此目录下)时报错:
$ ./fit -m my68-1d.amf -h haarcascade_frontalface_alt2.xml -i 9.jpg
 
/**************************************************************/
/*      ASMLibrary -- A compact SDK for face alignment        */
/*  Copyright (c) 2008-2011 by Yao Wei, all rights reserved.  */
/*                    Contact: nju...@gmail.com              */
/**************************************************************/
 
Reading active shape models from file my68-1d.amf ...(Done)
ASM model file read time cost: 24.27 millisec
Opencv haar-like file read time cost: 18.02 millisec
Segmentation fault (core dumped)

后来我跟踪错误:
(gdb) backtrace
#0  0x00007f852eca0b51 in cv::_InputArray::type(int) const () from ./libasmlibrary64.so
#1  0x00007f852b629315 in cv::Canny(cv::_InputArray const&, cv::_OutputArray const&, double, double, int, bool) ()
   from /usr/local/lib/libopencv_imgproc.so.3.0
#2  0x00007f852b62bd3c in cvCanny () from /usr/local/lib/libopencv_imgproc.so.3.0
#3  0x00007f852e94339c in cvHaarDetectObjectsForROC(void const*, CvHaarClassifierCascade*, CvMemStorage*, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, int, int, CvSize, CvSize, bool) () from /usr/local/lib/libopencv_objdetect.so.3.0
#4  0x00007f852e943d2b in cvHaarDetectObjects () from /usr/local/lib/libopencv_objdetect.so.3.0
#5  0x000000000040228d in detect_all_faces (Shapes=Shapes@entry=0x7fff5ee888d8, n_shapes=@0x7fff5ee888cc: 32645, image=0x1a7b810)
    at ../src/vjfacedetect.cpp:72
#6  0x0000000000401bed in main (argc=7, argv=<optimized out>) at ../src/demo_fit.cpp:236


再详细跟踪:
(gdb)  backtrace  full 
#0  0x00007f852eca0b51 in cv::_InputArray::type(int) const () from ./libasmlibrary64.so
No symbol table info available.
#1  0x00007f852b629315 in cv::Canny(cv::_InputArray const&, cv::_OutputArray const&, double, double, int, bool) ()
   from /usr/local/lib/libopencv_imgproc.so.3.0
No symbol table info available.
#2  0x00007f852b62bd3c in cvCanny () from /usr/local/lib/libopencv_imgproc.so.3.0
No symbol table info available.
#3  0x00007f852e94339c in cvHaarDetectObjectsForROC(void const*, CvHaarClassifierCascade*, CvMemStorage*, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, int, int, CvSize, CvSize, bool) () from /usr/local/lib/libopencv_objdetect.so.3.0
No symbol table info available.
#4  0x00007f852e943d2b in cvHaarDetectObjects () from /usr/local/lib/libopencv_objdetect.so.3.0
No symbol table info available.
#5  0x000000000040228d in detect_all_faces (Shapes=Shapes@entry=0x7fff5ee888d8, n_shapes=@0x7fff5ee888cc: 32645, image=0x1a7b810)
    at ../src/vjfacedetect.cpp:72
        pWork = 0x1a33ad0
        pFaces = <optimized out>
#6  0x0000000000401bed in main (argc=7, argv=<optimized out>) at ../src/demo_fit.cpp:236
        image = 0x1a7b810
        nFaces = 32645
        shapes = 0x0
        detshapes = 0x0
        flag = <optimized out>
        t = <optimized out>
        fit_asm = {m_model = {m_M = 0x197a9a0, m_B = 0x197b010, m_V = 0x197ae70, m_SM = 0x1984120, m_SSD = 0x19842c0, m_type = PROFILE_1D, {
              lbp_tdm = 0x1984450, classical_tdm = 0x1984450}, m_asm_meanshape = {m_vPoints = 0x197a760, m_nPoints = 68}, m_nPoints = 68, 
            m_nWidth = 17, m_nLevels = 4, m_nModes = 34, m_dReferenceFaceWidth = 167.935, m_bInterpolate = false, m_dMeanCost = 1149.04, 
            m_dVarCost = 210.226, m_CBackproject = 0x1a32470, m_CBs = 0x1a32940, m_dist = 0x1a32230, m_profile = 0x193bca0, m_search_shape = {
              m_vPoints = 0x1a32d00, m_nPoints = 68}, m_temp_shape = {m_vPoints = 0x1a32ad0, m_nPoints = 68}}, m_edge_start = 0x1a33440, 
          m_edge_end = 0x1a33160, m_nEdge = 180, m__VJdetavshape = {m_vPoints = 0x1a32f30, m_nPoints = 68}, m_param = {left = 1, right = 13}, 
          m_flag = false, m_dReferenceFaceWidth = 6.953222278231463e-310, __lastframe = 0x0, __pyrimg1 = 0x0, __pyrimg2 = 0x0, __features1 = 0x197a520, 
          __features2 = 0x1a33720, __found_feature = 0x1a33950 "", __feature_error = 0x1a339a0}
        model_name = <optimized out>
        cascade_name = <optimized out>
        n_iteration = <optimized out>
        t = <optimized out>
        filename = <optimized out>
        use_camera = <optimized out>
        image_or_video = <optimized out>
        camera_idx = <optimized out>
        i = <optimized out>




在 2016年2月17日星期三 UTC+8下午9:43:15,Yao Wei写道:

Yao Wei

unread,
Feb 18, 2016, 8:24:16 AM2/18/16
to asmli...@googlegroups.com

这个是人脸检测部分出现问题,相关代码都在vjfacedetect. cpp中,不涉及到libasmlibrary。可以进一步调试。

Yao Wei
From Android's Gmail

Reply all
Reply to author
Forward
0 new messages