Ubuntu16.04安装VisualSFM

Dependency Libs and App

Create compile folder, then download all the dependency files to this folder.

$ sudo mkdir ~/vsfm

Dependency:

VisualSFM 
SiftGPU 
Multicore Bundle Adjustment 
PMVS-2 
CMVS 
Graclus 1.2 

Steps

Step 1:Build VisualSFM

$ unzip VisualSFM_linux_64bit.zip 
$ cd vsfm
$ make

Step 2:Build SiftGPU-V400

$ unzip SiftGPU-V400.zip 
$ cd SiftGPU
$ make
$ cp bin/libsiftgpu.so ../vsfm/bin

Step 3:Build Multicore Bundle Adjustment (a.k.a. “pba”)

Uncompress the zip files, enter the path:pba/src/pba, and edit the two source files of “SparseBundleCU.h” and “pba.h”. Adding follows lib to the file start.

#include <stdlib.h>

The default compile is with GPU version, if no GPU, you should delete the makefile file in PBA folder, rename makefile_no_gpu to makefile, then just make it.

$ cd ~/vsfm/pba
$ make

Step 4:Build Hack PMVS-2

compile this file according to the follows command:

$ tar xf pmvs-2.tar.gz
$ cd pmvs-2/program/main/
$ cp mylapack.o mylapack.o.backup
$ make clean
$ cp mylapack.o.backup mylapack.o
$ make depend
$ make

Step 5:Build Graclus 1.2

Uncompress the Graclus, then edit the Makefile.in file, set the “-DNUMBITS=64” item:

# What options to be used by the compiler
COPTIONS = -DNUMBITS=64
$ cd ~/vsfm/Graclus
$ make

Step 6:Build Graclus 1.2

$ cd ~/vsfm
$ tar xf cmvs-fix2.tar.gz
$ cp pmvs-2/program/main/mylapack.o cmvs/program/main/

add follows line to the “cmvs/program/main/genOption.cc” file

#include <stdlib.h>

Next, edit the CMVS Makefile(in cmvs/program/main), remember change the path(/home/scott/vsfm/) to your own.

#Your INCLUDE path (e.g., -I/usr/include)
YOUR_INCLUDE_PATH =

#Your metis directory (contains header files under graclus1.2/metisLib/)
YOUR_INCLUDE_METIS_PATH = -I/home/scott/vsfm/graclus1.2/metisLib

#Your LDLIBRARY path (e.g., -L/usr/lib)
YOUR_LDLIB_PATH = -L/home/scott/vsfm/graclus1.2

After these, compile all the files, then copy the three executable files.

$ cd ~/vsfm/cmvs/program/main
$ make
$ cp cmvs ~/vsfm/vsfm/bin
$ cp pmvs2 ~/vsfm/vsfm/bin
$ cp genOption ~/vsfm/vsfm/bin

Step 7:Running VisualSFM

Add VisualSFM to your own path(LD_LIBRARY_PATH). Please change the “/home/scott/vsfm/” to your own path.

$ sudo vim ~/.bashrc
export PATH=$PATH:/home/scott/vsfm/vsfm/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/scott/vsfm/vsfm/bin

All can’t understand thing, please find the origin:
VisualSFM of Offical

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值