線特征---LineMatching代碼運行(五)


[1]    https://github.com/dlut-dimt/LineMatching

The code is based on Matlab.

 https://github.com/kailigo/LineSegmentMatching

The code is based on the following two papers. The code is based on OpenCV, and you need CMake to build a project from the code.

@article{li2016hierarchical, title={Hierarchical line matching based on Line--Junction--Line structure descriptor and local homography estimation}, author={Li, Kai and Yao, Jian and Lu, Xiaohu and Li, Li and Zhang, Zhichao}, journal={Neurocomputing}, volume={184}, pages={207--220}, year={2016}, publisher={Elsevier} }

@inproceedings{li2014robust, title={Robust line matching based on ray-point-ray structure descriptor}, author={Li, Kai and Yao, Jian and Lu, Xiaohu}, booktitle={Asian Conference on Computer Vision}, pages={554--569}, year={2014}, organization={Springer} }

[3]    https://github.com/chishuideyu/LBD_and_LineMatching

 The code is based on OpenCV ,arpack++.

 

安裝BIAS(沒安裝完成,由於此庫比較老,而且opencv中的函數可代替)

1.BIAS的簡單介紹 ---http://www.mip.informatik.uni-kiel.de/tiki-index.php?page=BIAS&highlight=BIAS.

2.How to get it ---http://www.mip.informatik.uni-kiel.de/~wwwadmin/Software/index.html

我下載的是:BIAS-2.8.0.tar.gz

 

查看imagemagick的版本: convert –version,出現:

Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

 ImageMagick的源碼:   https://github.com/ImageMagick/

下載下來:ImageMagick-master.zip,解壓,由於我是在linux安裝,查看它的Install-unix.txt,並將其重命名為了:ImageMagick-7.0.7

安裝過程:

cd ImageMagick-7.0.7
./configure
make   //build ImageMagick
sudo make install   //install ImageMagick

make check //Run tests using the installed ImageMagick(可選指令)

 ImageMagick is installs binaries in /../usr/local/bin, libraries in /../usr/local/lib, header files in /../usr/local/include and documentation in /../usr/local/share

 

安裝ARPACK++

下載:https://github.com/m-reuter/arpackpp

閱讀“README.md”,對arpackpp (ARPACK++)有大致的了解,並且主要看其Dependencies依賴項,然后看“INSTALL.md”,進行安裝:

安裝:

[1]只安裝頭文件,通過cmake

mkdir build
cd build
cmake ..
sudo make install
-- A library with BLAS API found.
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- LAPACK_LIBRARIES: /usr/lib/liblapack.a;/usr/lib/libf77blas.a;/usr/lib/libatlas.a
-- ARPACK_LIB found: /usr/lib/libarpack.a

//--ARPACK 頭文件:/usr/local/include/arpackpp/
//將其頭文件連接到工程中

 [2]System Libraries: GFORTRAN, BLAS, LAPACK, ARPACK,通過ubuntu軟件源安裝。

$ sudo apt-get install -y gfortran libopenblas-dev liblapack-dev libarpack2-dev

先運行了一下程序,在CMakelists.txt中這句話的執行出現錯誤

TARGET_LINK_LIBRARIES(LineMatchingLib ${OpenCV_LIBS} arpack /usr/lib/x86_64-linux-gnu/libsuperlu.so arpack++) 

error:

[100%] Building CXX object CMakeFiles/TestLineMatchingAlgorithm.dir/TestLineMatchingAlgorithm.cpp.o Linking CXX executable TestLineMatchingAlgorithm libLineMatchingLib.so: undefined reference to `set_default_options' libLineMatchingLib.so: undefined reference to `dCreate_Dense_Matrix' libLineMatchingLib.so: undefined reference to `cgstrs' libLineMatchingLib.so: undefined reference to `sp_ienv' libLineMatchingLib.so: undefined reference to `sgstrs' libLineMatchingLib.so: undefined reference to `StatFree' libLineMatchingLib.so: undefined reference to `debug_' libLineMatchingLib.so: undefined reference to `Destroy_CompCol_Matrix' libLineMatchingLib.so: undefined reference to `dCreate_CompCol_Matrix' libLineMatchingLib.so: undefined reference to `sgstrf' libLineMatchingLib.so: undefined reference to `dsaupd_' libLineMatchingLib.so: undefined reference to `dgstrs' libLineMatchingLib.so: undefined reference to `Destroy_CompCol_Permuted' libLineMatchingLib.so: undefined reference to `zgstrs' libLineMatchingLib.so: undefined reference to `cgstrf' libLineMatchingLib.so: undefined reference to `StatInit' libLineMatchingLib.so: undefined reference to `zgstrf' libLineMatchingLib.so: undefined reference to `dcopy_' libLineMatchingLib.so: undefined reference to `Destroy_SuperNode_Matrix' libLineMatchingLib.so: undefined reference to `get_perm_c' libLineMatchingLib.so: undefined reference to `dseupd_' libLineMatchingLib.so: undefined reference to `Destroy_SuperMatrix_Store' libLineMatchingLib.so: undefined reference to `dgstrf' libLineMatchingLib.so: undefined reference to `sp_preorder' collect2: error: ld returned 1 exit status make[2]: *** [TestLineMatchingAlgorithm] Error 1 make[1]: *** [CMakeFiles/TestLineMatchingAlgorithm.dir/all] Error 2 make: *** [all] Error 2

查看是否安裝了superlu:

$ dpkg -L libsuperlu-dev
dpkg-query: package 'libsuperlu-dev' is not installed Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. 

通過ubuntu軟件源安裝superlu遇到了困難,出現了錯誤:

$ sudo apt-get install libsuperlu-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libsuperlu-dev

上網搜索后說是

#sudo apt-get update   //更新
    執行完后,問題就解決了。

但是我執行完后,依然沒有什么卵用。。。反正,網上說的各種都有,后來想着要不下載下來編譯再安裝吧:

下載superlu:[SuperLU (Version 5.2.x)]  ---   https://github.com/xiaoyeli/superlu

閱讀README,知道有兩種方法安裝,so我使用CMake安裝:

mkdir build
cd build
cmake ..
make
sudo make install

libblas.a
libsuperlu.a
libmatgen.a

//庫文件:/usr/local/lib/libsuperlu.a
 /usr/local/lib/pkgconfig/superlu.pc
//頭文件:/usr/local/include/supermatrix.h
/usr/local/include/slu_Cnames.h
/usr/local/include/slu_dcomplex.h
/usr/local/include/slu_scomplex.h
/usr/local/include/slu_util.h
/usr/local/include/superlu_enum_consts.h
/usr/local/include/slu_sdefs.h
/usr/local/include/slu_ddefs.h
/usr/local/include/slu_cdefs.h
/usr/local/include/slu_zdefs.h

過程中生成了幾個測試文件:build/TESTING/s_test.out   # single precision, real
               build/TESTING/d_test.out   # double precision, real
               build/TESTING/c_test.out   # single precision, complex
               build/TESTING/z_test.out   # double precision, complex

由於生成的是靜態庫libsuperlu.a,不知道怎樣連接到自己的庫上,感覺用不到就刪了,但是庫文件都在,如果想看可以參照/home/wj/Downloads/arpackpp/external/SuperLU_5.2.1-build。還得仿照人家寫的,最終安了個類似的:

$ sudo apt-get install libsuperlu3-dev

這次終於看見曙光了找到了libsuperlu.so:/usr/lib/libsuperlu.so

$ sudo apt-get install libarpack++2-dev

 運行結果:

 

 

 

    

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM