主要内容

本页采用了机器翻译。点击此处可查看英文原文。

运动重建

使用增量式运动重建和 NeRF 从多个视图重建三维场景结构

运动重建 (SfM) 是基于一组从不同视角拍摄的二维图像估计场景的三维结构的过程。Computer Vision Toolbox™ 提供端到端的 SfM 流程,包括特征检测、匹配、相机位姿估计、三角剖分和光束法平差。这些功能对于三维地图构建、摄影测量和自主导航等应用至关重要。

有关增量式运动重建流程的分步综合演练,请参阅多视图运动重建示例系列。该示例系列展示了如何使用特征袋方法从相机视图创建视图图、使用几何约束优化视图图、通过选择稳健的初始视图对来初始化三维重建,以及如何整合其余相机视图来重建完整的三维场景。有关如何使用场景的稀疏三维点云生成稠密三维网格的信息,请参阅Dense 3-D Reconstruction of Asteroid Surface from Image Sequence示例。

对于稠密重建和新视图合成,工具箱支持神经辐射场 (NeRF)。使用 trainNerfacto 函数在您的图像集合上训练 NeRF 模型并生成新视图。然后,您可以使用 pc2surfacemesh (Lidar Toolbox) 函数使用点云生成三维网格。

函数

全部展开

detectSIFTFeatures检测尺度不变特征变换 (SIFT) 特征 (自 R2021b 起)
detectORBFeatures检测 ORB 关键点
detectBRISKFeatures检测 BRISK 特征
detectFASTFeatures使用 FAST 算法检测角点
detectHarrisFeatures 使用哈里斯-斯蒂芬斯算法检测角点
detectMinEigenFeatures使用最小特征值算法检测角点
detectMSERFeaturesDetect MSER features
detectSURFFeatures检测 SURF 特征
detectKAZEFeatures检测 KAZE 特征
extractFeatures提取兴趣点描述符
matchFeatures查找匹配的特征
matchFeaturesInRadiusFind matching features within specified radius
vision.PointTrackerTrack points in video using Kanade-Lucas-Tomasi (KLT) algorithm

存储图像和相机数据

imageviewsetManage data for structure-from-motion, visual odometry, and visual SLAM
worldpointsetManage 3-D to 2-D point correspondences
cameraIntrinsics用于存储相机内参的对象
rigidtform3d三维刚性几何变换 (自 R2022b 起)
affinetform3d三维仿射几何变换 (自 R2022b 起)

估计相机位姿

estimateEssentialMatrixEstimate essential matrix from corresponding points in a pair of images
estimateFundamentalMatrixEstimate fundamental matrix from corresponding points in stereo images
estworldposeEstimate camera pose from 3-D to 2-D point correspondences (自 R2022b 起)
estrelposeCalculate relative rotation and translation between camera poses (自 R2022b 起)

对图像点进行三角剖分

pointTrackObject for storing matching points from multiple views
findTracksFind matched points across multiple views
triangulate立体图像中未去畸变的匹配点的三维位置
triangulateMultiview3-D locations of world points matched across multiple images

优化相机位姿和三维点

bundleAdjustmentAdjust collection of 3-D points and camera poses
bundleAdjustmentMotionAdjust collection of 3-D points and camera poses using motion-only bundle adjustment
bundleAdjustmentStructureRefine 3-D points using structure-only bundle adjustment
nerfactoDense reconstruction and novel view synthesis using Nerfacto Neural Radiance Field (NeRF) model (自 R2026a 起)
trainNerfactoCreate and train Nerfacto Neural Radiance Field (NeRF) model (自 R2026a 起)
compareTrajectoriesCompare estimated trajectory against ground truth (自 R2024b 起)
trajectoryErrorMetricsStore accuracy metrics for trajectories (自 R2024b 起)
stereoAnaglyphCreate red-cyan anaglyph from stereo pair of images
pcshowPlot 3-D point cloud
plotCameraPlot camera in 3-D coordinates
showMatchedFeatures显示相应的特征点
rotmat2vec3d将三维旋转矩阵转换为旋转向量 (自 R2022b 起)
rotvec2mat3d将三维旋转向量转换为旋转矩阵 (自 R2022b 起)
quaternionCreate quaternion array (自 R2023b 起)

主题

增量式运动重建

基础知识

精选示例