当前位置:网站首页>COLMAP+OpenMVS realizes 3D reconstruction mesh model of objects
COLMAP+OpenMVS realizes 3D reconstruction mesh model of objects
2022-08-10 06:34:00 【Half_A】
一、环境准备
(1) COLMAP
(2) OpenMVS
OpenMVSYou can download and compile from the source code yourself.If it feels compiledopenmvs可能要费点时间,That can also directly download the compiled executable program.
Github源码:https://github.com/cdcseacave/openMVS
可执行程序:https://github.com/cdcseacave/openMVS_sample
二、COLMAPThe reconstruction results in a dense point cloud
- 新建一个文件夹,在其中新建images文件夹,以及一个Database.db的空文件,Note that the file path does not appear in Chinese.imagesPut the pictures that need to be reconstructed in the folder,The more pictures, the longer the reconstruction time,Too few images may cause reconstruction to fail,我这里以96张图片为例,生成稠密点云05.
本文使用DTU数据集进行测试.
Self-built dataset requirements:
- 尽量使用单反相机或专业数码相机进行数据采集,如果要用手机进行采集,请使用单摄像头的手机进行数据采集.
- 尽量选择纹理丰富的外界环境进行数据采集,避免玻璃围墙、瓷砖和打蜡地板等强反光材料环境
- 尽量选择光照明亮,且光照条件变化不剧烈的环境,最好选择室内环境.如室内客厅,开启客厅大灯进行灯光补偿.
- 尽量围绕重建物体或环境采集较多的影像,且在采集过程中控制快门速度,避免模糊.

- 打开colmap程序(COLMAP.bat),点击File-New Project,在Database栏点击open,选择刚才新建的Database.db文件,在ImagesIn the column, select the newly created image to storeimages文件夹,点击save保存.

- 点击Processing-Feature Extraction,默认参数即可,点击Extract,Waiting for the program to finish running, you can see there is on the rightlog信息输出.

- 点击Processing-Feature matching,默认参数即可,点击Run,Waiting for the program to finish running, you can see there is on the rightlog信息输出.

- 点击Reconstruncion-Start reconstruction,等待执行完毕,The reconstruction result can be obtained.

- 在之前images的同级目录下,新建一个文件夹dense.点击Reconstruncion-Dense reconstrction,点击select,选择刚才新建的denseFolders are used to save dense point cloud results.依次点击Undistorion、Stereo、Fusion,执行完毕.

Click in the programFile-export model as txt,选择dense文件夹下的sparse文件夹(由于openmvs支支持txt格式的,So you need to convert the reconstructed file to txt文件)
检查camera.txtWhether the camera model inside is Pinhole,If not, change it directlypinhole,Regardless of whether you selected it before or not, you can change it directly.
三、OpenMVS重建得到mesh模型
to compileopenmvs_sample为例,我们要把colmapThe generated dense point cloud and image path information are converted into openmvs的.mvs文件.
- 打开命令提示窗口CMD,进入openmvs_sample下的bin目录,执行命令
interfaceCOLMAP.exe -i E:\Projects\2022.06-3DReconstruction\test\dense -o E:\Projects\2022.06-3DReconstruction\test\dense\scene.mvs --image-folder E:\Projects\2022.06-3DReconstruction\test\dense\images

可以看到dense文件夹下生成了scene.mvs文件(-oDirectory for output files,The default is in the current folder,Other paths can also be specified).
- Execute the command to rebuild
ReconstructMesh.exe -i E:\Projects\2022.06-3DReconstruction\test\dense\scene.mvs -o E:\Projects\2022.06-3DReconstruction\test\dense\mesh.mvs

- Execute command to add texture(This step consumes more computer resources,My computer is old,BSOD rebooted while running,Everyone try it as appropriate)
TextureMesh.exe -i E:\Projects\2022.06-3DReconstruction\test\dense\mesh.mvs
You can see that four new files have been created in the folder,可以使用meshlab打开其中的.ply文件(三维mesh模型),下图为Solidworks打开的样子(no texture added).

本博客文章首先发布于个人博客网站:https://www.mahaofei.com/,欢迎大家访问.
边栏推荐
- 各位大佬,oracle11g,cdc2.2,flink1.13.6,单表增量同步。在没新增数据的情
- MySQL事务隔离级别
- OpenGL学习笔记(LearnOpenGL)-第二部分 绘制三角形
- UnityShader入门精要-unity shader基础
- VS Code插件国际化
- 关于研究鼠标绘制平滑曲线的阶段总结
- 动态规划——从0-1背包问题到leetcode正则匹配
- 各位大佬 oracle cdc 默认配置 偶发会30秒才抓取到数据 这个怎么优化啊
- 2022 Henan Mengxin League No. 5: University of Information Engineering J-AC Automata
- ES13 - ES2022 - 第 123 届 ECMA 大会批准了 ECMAScript 2022 语言规范
猜你喜欢
随机推荐
netlink IPC
socket实现进程间通信
Lunix(阿里云服务器)安装Anaconda并开启jupyter服务本地访问
求职
如何在AdsPower中设置YiLu代理?
Quickly grasp game resources in one hour and remote hot update
Grammar Basics (Judgment Statements)
椭圆曲线离散对数问题以及求解
High quality WordPress download station 5 play theme template
2022河南萌新联赛第(五)场:信息工程大学 H - 小明喝奶茶
UnityShader入门精要-立方体纹理、反射、折射、菲涅尔反射
Kernel Image File Format
UnityShader入门精要-渲染纹理 镜子 玻璃 效果
Qt列表下方增加弹出加载数据提示效果
新手使用 go channel 需要注意的问题
【强化学习】《Easy RL》- Q-learning - CliffWalking(悬崖行走)代码解读
OpenGL学习笔记(LearnOpenGL)-第二部分 绘制三角形
[Reinforcement Learning] "Easy RL" - Q-learning - CliffWalking (cliff walking) code interpretation
强化学习_06_DataWhale深度Q网络
强化学习_08_Datawhale针对连续动作的深度Q网络









![[网络安全]实操AWVS靶场复现CSRF漏洞](/img/7f/f08e429e3d8ede03a1c1754e256f99.png)