当前位置:网站首页>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/,欢迎大家访问.
边栏推荐
- 各位大佬 oracle cdc 默认配置 偶发会30秒才抓取到数据 这个怎么优化啊
- CuteOneP is a PHP-based OneDrive multi-network disk mount program with member synchronization and other functions
- VS Code插件国际化
- UnityShader入门精要-立方体纹理、反射、折射、菲涅尔反射
- 2022河南萌新联赛第(五)场:信息工程大学 K - 矩阵生成
- 如何在VMlogin中设置YiLu代理?
- 3.事务篇【mysql高级】
- About MongoDb query Decimal128 to BigDecimal problem
- 腾讯云宋翔:Kubernetes集群利用率提升实践
- Unity资源热更新--资源管理、Addressable
猜你喜欢
随机推荐
XV6 swtch.S详解
高质量WordPress下载站模板5play主题
npm搭建私服,上传下载包
Mysql表数据在命令行窗口下中文乱码问题解决方法
求问各位大佬,FLink SQL读取source的时候去指定水位线的时间字段,如果指定的这个字段中格
2022 Henan Mengxin League No. 5: University of Information Engineering B - Transportation Renovation
强化学习_11_Datawhale模仿学习
UnityShader入门精要-渲染纹理 镜子 玻璃 效果
Text-to-Image最新论文、代码汇总
关于Qt高频率信号槽合并的误解和方案
Qt绘制椭圆曲线的角度问题(离心角和旋转角)
Quickly grasp game resources in one hour and remote hot update
共享静态IP与独享静态ip有何区别
ES13 - ES2022 - The 123rd ECMA Congress approves the ECMAScript 2022 language specification
OpenGL学习笔记(LearnOpenGL)-第四部分 着色器
tqdm高级使用方法(类keras进度条)
2022 Henan Mengxin League No. 5: University of Information Engineering J-AC Automata
UnityShader入门精要-高级光照基础
2022河南萌新联赛第(五)场:信息工程大学 B - 交通改造
神经网络可视化有3D版本了,美到沦陷 已开源









