目录
只有装了cuda的才可以进行MVS,否则只能过sfm的稀疏重建
colmap的使用文档(教程)
https://colmap.github.io/install.html
colmap的github链接
GitHub - colmap/colmap: COLMAP - Structure-from-Motion and Multi-View Stereo
参考安装链接
【三维重建】利用开源软件colmap实现基于图像的三维重建_哔哩哔哩_bilibili
安装问题:
1)colmap版本更新(反正下载最新版的就可以了)
1)在总project文件夹下为每个项目创建一个项目文件夹(例如DTU_test)
2)在项目文件夹下创建images文件夹,里面存放多视角图片
3)打开colmap(bat文件),然后选择创建新项目(new project),database也在项目文件夹创建,名字取成项目名称即可,然后选择好自己创建的images文件夹
4)特征提取,选择feature extraction(注意这里的相机模型类型选成pinhole,extract from exif(一般照片自带))

5)特征匹配,feature matching,参数直接默认,run就可以了(DTU数据集只需要十几秒就可以了)
6) 选择reconstruction,start reconstruction,就可以进行相机位姿预测、并生成可视化的图
6)dense reconstruction,select(可以自己创建一个dense文件夹,然后选择),此后就会在这个文件夹下进行密集匹配与重建。
7)undistortion(畸变校正,大概是通过内参进行校正)
8)点击stereo,进行密集重建和匹配,会为每张图生成他的深度图
9)fusion,深度图融合,生成点云(稠密点云)
10)poisson,泊松mesh重建(效果还是不错的),某些破损的面可以通过mesh进行修补。同时纹理贴图的效果还是非常不错的,可以看到标牌上的字之类的。具体示例如下,以DTU数据集的SCAN9为例。

稠密点云

有纹理贴图的mesh化模型
为什么用ubuntu系统,(1)因为服务器是ubuntu系统的 (2)因为ubuntu下面可以用源码进行操作,还可以跟mvsnet放在一起,肯定是更方便的
注意这个系统必须要有gui界面(无论是物理显示屏还是虚拟显示屏),否则会出现后续的一系列问题,一般是没啥问题的。
(16条消息) colmap安装(ubuntu 18.04系统)_pxt999的博客-CSDN博客_colmap安装
参考上述文章进行安装
问题1:
编译colmap时候cmake .. 时,出现了如下报错
runtime library [libmpfr.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /D/anaconda/lib
runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /D/anaconda/lib
大概是由于跟anaconda的环境有点冲突,所以最好能够屏蔽anaconda环境
尝试了如下做法
1、conda deactivate 退出anaconda环境,没有成功
2、更换path,没有成功
3、想法是把lib下面libmpfr.so.6开头的文件全都移动到某个文件夹里,自己把他屏蔽掉,编译完再把他移出来,尝试一下!记得最后把他移动回去!
mkdir /D/anaconda/lib/zt_lib
mv /D/anaconda/lib/libmpfr.so.6* /D/anaconda/lib/zt_lib
mv /D/anaconda/lib/libgmp.so.10* /D/anaconda/lib/zt_lib
mv /D/anaconda/lib/zt_lib/* /D/anaconda/lib # 最后把他移动回去
可以避免anaconda冲突的问题了,但是又出现了新的问题:
问题2:
还是在cmake的时候出现的问题
Target "colmap_cuda" links to target "CUDA::cusparse" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
尝试了如下做法:
1、是不是cuda坏了?
nvidia-smi
确实报错了(报错和解决如下所示)
Failed to initialize NVML: Driver/library version mismatch - HarryPotterIsDead! - 博客园 (cnblogs.com)
虽然解决了cuda的问题,但是还是没啥用,该报错还是报错
2、在colmap自己的issue里找到了答案
When I run cmake .. ,Bug occurs. · Issue #1699 · colmap/colmap · GitHub
似乎是因为cmake的版本的问题
pip install cmake --upgrade
hash -r
升级了cmake之后,终于编译通过了!
所以以后记得可以在github里的issue里找,尤其是一些比较出名的project。
问题3:
make -j8 的时候连续出现一大片的LIBTIFF报错(最后还是报错了)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFTileRowSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldTag@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFCurrentDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFIsByteSwapped@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFComputeStrip@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadTile@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
/usr/bin/ld: /D/anaconda/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()@CXXABI_1.3.13'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldWithTag@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFTileSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFWriteDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldName@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldReadCount@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetTagListEntry@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetTagExtender@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetTagListCount@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetFieldDefaulted@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSwabArrayOfLong@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldPassCount@LIBTIFF_4.0'
/usr/bin/ld: /D/anaconda/lib/libQt5Widgets.so.5.15.2: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetSubDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFStripSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldDataType@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `_TIFFDataSize@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadRGBAImage@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFMergeFieldInfo@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFDataWidth@LIBTIFF_4.0'
/usr/bin/ld: /D/anaconda/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()@CXXABI_1.3.13'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetDirectory@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEXIFDirectory@LIBTIFF_4.0'
是和anaconda的libtiff冲突了(和qt、gui有关)
尝试了其他方法都没成功(包括更改PATH,在cmakelist中加内容)
最后还是最暴力的卸载了anaconda中的libtiff
conda uninstall libtiff
如果不通过的话可以多卸载几次(每次不通过一定要用如下命令把build文件夹下的内容全部删掉,否则重新make也没用)
rm -rf *
问题4
由于服务器不具备图形化界面,所以不能有GUI,只能将GUI_ENABLED设置为FALSE
需要重新编译(刚刚编译好的东西需要uninstall一下)
1、回退编译进度
cd xxx/build # 先进入到build文件夹
sudo make uninstall # 卸载
rm -rf * # 删除bulid文件夹下的编译进度
2、查看一下根目录(也就是最大的那个目录colmap)下面的CMAKELIST.txt,里面其实写到了一些关于GUI_ENABLED的东西
所以其实只要在用到GUI_ENABLED之前将其设为FALSE就可以。
set(GUI_ENABLED FALSE)
确实解决了GUI的问题
问题5
似乎编译出了一个用不上cuda的colmap
ERROR: Cannot use Sift GPU without CUDA or OpenGL support; set SiftExtraction.use_gpu or SiftMatching.use_gpu to false.
不要直接git clone最新的colmap,在旁边的release下载3.7的source code就可以了。
问题6
‘LocalParameterization’ is not a member of ‘ceres’
似乎是ceres的版本太高了,打算将2.1退回到2.0版本,因为看到有人2.0成功了。
问题7
'GL_LUMINANCE' was not declared in this scope
因为,Disabling GUI will also disable OpenGL(这是colmap设定好了的)
而不用openGL的话,sift_gpu用不了,所以到头来,CUDA和GUI必须要有。
后续就再也没遇到过报错了,一路都顺下来了,也能正常的做特征提取了(在有gui的前提下),但是过程中还是遇到了一些cuda的warning,不确定是不是有问题,还是打算重新编译一下,据说是要用2.1版本的ceres加固定c++14进行编译。
cmake .. -DCUDA_ENABLED=ON -DCUDA_NVCC_FLAGS="--std c++14" # 可以固定c++14版本
编译完之后没有什么区别,所以也无所谓了。
参照官方github和教程文档
GitHub - colmap/colmap: COLMAP - Structure-from-Motion and Multi-View Stereo
Tutorial — COLMAP 3.8 documentation
(24条消息) COLMAP简明教程 重建 转化深度图 导出相机参数 导入相机参数 命令行_BigYouYou的博客-CSDN博客_colmap导出相机参数
1)命令行输入colmap gui打开gui界面
2)其余操作和windows系统完全一致(参考本文的1.2)
我正在学习如何使用Nokogiri,根据这段代码我遇到了一些问题:require'rubygems'require'mechanize'post_agent=WWW::Mechanize.newpost_page=post_agent.get('http://www.vbulletin.org/forum/showthread.php?t=230708')puts"\nabsolutepathwithtbodygivesnil"putspost_page.parser.xpath('/html/body/div/div/div/div/div/table/tbody/tr/td/div
我有一个Ruby程序,它使用rubyzip压缩XML文件的目录树。gem。我的问题是文件开始变得很重,我想提高压缩级别,因为压缩时间不是问题。我在rubyzipdocumentation中找不到一种为创建的ZIP文件指定压缩级别的方法。有人知道如何更改此设置吗?是否有另一个允许指定压缩级别的Ruby库? 最佳答案 这是我通过查看rubyzip内部创建的代码。level=Zlib::BEST_COMPRESSIONZip::ZipOutputStream.open(zip_file)do|zip|Dir.glob("**/*")d
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
很好奇,就使用rubyonrails自动化单元测试而言,你们正在做什么?您是否创建了一个脚本来在cron中运行rake作业并将结果邮寄给您?git中的预提交Hook?只是手动调用?我完全理解测试,但想知道在错误发生之前捕获错误的最佳实践是什么。让我们理所当然地认为测试本身是完美无缺的,并且可以正常工作。下一步是什么以确保他们在正确的时间将可能有害的结果传达给您? 最佳答案 不确定您到底想听什么,但是有几个级别的自动代码库控制:在处理某项功能时,您可以使用类似autotest的内容获得关于哪些有效,哪些无效的即时反馈。要确保您的提
假设我做了一个模块如下:m=Module.newdoclassCendend三个问题:除了对m的引用之外,还有什么方法可以访问C和m中的其他内容?我可以在创建匿名模块后为其命名吗(就像我输入“module...”一样)?如何在使用完匿名模块后将其删除,使其定义的常量不再存在? 最佳答案 三个答案:是的,使用ObjectSpace.此代码使c引用你的类(class)C不引用m:c=nilObjectSpace.each_object{|obj|c=objif(Class===objandobj.name=~/::C$/)}当然这取决于
我正在尝试使用ruby和Savon来使用网络服务。测试服务为http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2require'rubygems'require'savon'client=Savon::Client.new"http://www.webservicex.net/stockquote.asmx?WSDL"client.get_quotedo|soap|soap.body={:symbol=>"AAPL"}end返回SOAP异常。检查soap信封,在我看来soap请求没有正确的命名空间。任何人都可以建议我
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
我想将html转换为纯文本。不过,我不想只删除标签,我想智能地保留尽可能多的格式。为插入换行符标签,检测段落并格式化它们等。输入非常简单,通常是格式良好的html(不是整个文档,只是一堆内容,通常没有anchor或图像)。我可以将几个正则表达式放在一起,让我达到80%,但我认为可能有一些现有的解决方案更智能。 最佳答案 首先,不要尝试为此使用正则表达式。很有可能你会想出一个脆弱/脆弱的解决方案,它会随着HTML的变化而崩溃,或者很难管理和维护。您可以使用Nokogiri快速解析HTML并提取文本:require'nokogiri'h
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po