9colmap
https://www.cnblogs.com/gooutlook/p/13463316.html
colmap gui
1创建工程
自动创建
file-newproject
1 创建数据库 点击 new 数据库,选择保存路径
2选择select 图像文件夹-要重建的数据
点击save后,看到创建的数据库
3 设置匹配点参数
相机内参 SIMPLE_PINHOLE or PINHOLE
4开始匹配
-
穷举匹配:如果数据集中的图像数量相对较少(最多数百个),这种匹配模式应该足够快,并能产生最佳的重建结果。在这里,每个图像都与其他每个图像进行匹配,而块大小决定了同时从磁盘加载到内存中的图像数量。
-
顺序匹配:如果图像是按顺序获取的(例如通过摄像机),则此模式非常有用。在这种情况下,连续帧具有视觉重叠,并且不需要彻底匹配所有图像对。相反,连续捕获的图像会相互匹配。此匹配模式具有基于词汇树的内置循环检测,其中每个第 N 个图像 ( loop_detection_period ) 与其视觉上最相似的图像 ( loop_detection_num_images ) 进行匹配。请注意,图像文件名必须按顺序排列(例如image0001.jpg、 image0002.jpg等)。数据库中的顺序不相关,因为图像是根据其文件名明确排序的。请注意,循环检测需要预先训练的词汇树,可以从https://demuc.de/colmap/下载。
-
词汇树匹配:在这种匹配模式[schoenberger16vote]中,每个图像都使用具有空间重新排序的词汇树与其视觉最近邻进行匹配。这是大型图像集合(数千个)的推荐匹配模式。这需要预先训练的词汇树,可以从https://demuc.de/colmap/下载。
-
空间匹配:此匹配模式将每个图像与其空间最近邻进行匹配。空间位置可以在数据库管理中手动设置。默认情况下,COLMAP 还会从 EXIF 中提取 GPS 信息,并将其用于空间最近邻搜索。如果有准确的先前位置信息,则推荐使用此匹配模式。
-
传递匹配:这种匹配模式使用现有特征匹配的传递关系来生成更完整的匹配图。如果图像 A 与图像 B 匹配,B 与 C 匹配,则该匹配器会尝试直接将 A 与 C 匹配。
-
自定义匹配:此模式允许指定单个图像对进行匹配或导入单个特征匹配。要指定图像对,您必须提供一个文本文件,每行一个图像对:
Exhaustive MatchingExhaustive Matching
-
Exhaustive Matching: If the number of images in your dataset is relatively low (up to several hundreds), this matching mode should be fast enough and leads to the best reconstruction results. Here, every image is matched against every other image, while the block size determines how many images are loaded from disk into memory at the same time.
-
Sequential Matching: This mode is useful if the images are acquired in sequential order, e.g., by a video camera. In this case, consecutive frames have visual overlap and there is no need to match all image pairs exhaustively. Instead, consecutively captured images are matched against each other. This matching mode has built-in loop detection based on a vocabulary tree, where every N-th image (loop_detection_period) is matched against its visually most similar images (loop_detection_num_images). Note that image file names must be ordered sequentially (e.g., image0001.jpg, image0002.jpg, etc.). The order in the database is not relevant, since the images are explicitly ordered according to their file names. Note that loop detection requires a pre-trained vocabulary tree, that can be downloaded from https://demuc.de/colmap/.
-
Vocabulary Tree Matching: In this matching mode [schoenberger16vote], every image is matched against its visual nearest neighbors using a vocabulary tree with spatial re-ranking. This is the recommended matching mode for large image collections (several thousands). This requires a pre-trained vocabulary tree, that can be downloaded from https://demuc.de/colmap/.
-
Spatial Matching: This matching mode matches every image against its spatial nearest neighbors. Spatial locations can be manually set in the database management. By default, COLMAP also extracts GPS information from EXIF and uses it for spatial nearest neighbor search. If accurate prior location information is available, this is the recommended matching mode.
-
Transitive Matching: This matching mode uses the transitive relations of already existing feature matches to produce a more complete matching graph. If an image A matches to an image B and B matches to C, then this matcher attempts to match A to C directly.
-
Custom Matching: This mode allows to specify individual image pairs for matching or to import individual feature matches. To specify image pairs, you have to provide a text file with one image pair per line:
匹配结束
5 开始重建
选择开始增量重建过程
稀疏重建
保存工程
flie - esport all - models选择文件夹sparse(手动创建文件夹)
<location> |---images | |---<image 0> | |---<image 1> | |---... |---sparse |---0 |---cameras.bin |---images.bin |---points3D.bin
密集重建(没必要)
首先,将稀疏 3D 模型导入 COLMAP(或在完成前面的稀疏重建步骤后选择重建模型)。
然后,选择一个空的或现有的工作区文件夹,该文件夹用于输出和所有密集重建结果。
第一步是图像,第二步是使用 计算深度和法线贴图,第三步是将深度和法线贴图映射到点云,最后是可选的点云 步骤。在立体重建过程中,显示器可能会因计算负载过重而冻结,并且如果您的 GPU 没有足够的内存,重建过程可能会不正常地崩溃。