主要内容

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

相机位姿估计和三维重建

使用基础对极几何、三角剖分和光束法平差来估计相机位姿,用于三维重建

Computer Vision Toolbox™ 提供了一整套基础工具,用于从多个视图中估计相机位姿和重建三维场景。这些工具对于运动重建、视觉 SLAM、增强现实和机器人等应用至关重要。您可以使用本质矩阵或基本矩阵来估计相机位姿,还可以基于对极几何计算相机的相对位置。对于已标定的相机,您可以使用透视三点 (P3P) 算法或相机投影矩阵,通过二维到三维点对应关系来确定绝对或相对位姿。有关详细信息,请参阅 estimateEssentialMatrixestimateFundamentalMatrixestrelpose

为了优化位姿估计并提高重建精度,该工具箱支持光束法平差技术,可联合或独立地优化相机位姿和三维点位置。有关详细信息,请参阅 bundleAdjustment

对于三维重建,您可以利用多个视图对点进行三角测量,并管理点轨迹的对应关系。您还可以在图像坐标和世界坐标之间进行转换,这支持投影和反投影任务。有关详细信息,请参阅 pointTracktriangulateimg2world2d

工具箱提供了使用专用对象来管理和组织图像以及点数据的功能。这些结构能够为大规模重建流程实现位姿图的创建和优化。工具箱还支持在三维空间中可视化相机位置和重建的点云。有关详细信息,请参阅 imageviewsetcreatePoseGraphplotCamera

函数

全部展开

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 起)
estimateExtrinsics计算已标定相机的位置 (自 R2022b 起)
pose2extrConvert camera pose to extrinsics (自 R2022b 起)
extr2poseConvert extrinsics to camera pose (自 R2022b 起)
cameraProjectionCamera projection matrix (自 R2022b 起)
estimateCameraProjectionEstimate camera projection matrix from world-to-image point correspondences (自 R2022b 起)
readAprilTag检测图像中的 AprilTag 并估计其位姿
readArucoMarkerDetect and estimate pose for ArUco marker in image (自 R2024a 起)
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
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
img2world2dDetermine world coordinates of image points (自 R2022b 起)
world2img将世界点投影到图像中 (自 R2022b 起)
imageviewsetManage data for structure-from-motion, visual odometry, and visual SLAM
createPoseGraphCreate pose graph
optimizePosesOptimize absolute poses using relative pose constraints
worldpointsetManage 3-D to 2-D point correspondences
plotCameraPlot camera in 3-D coordinates
pcshowPlot 3-D point cloud
estgeotform3dEstimate 3-D geometric transformation from matching point pairs (自 R2022b 起)
affinetform3d三维仿射几何变换 (自 R2022b 起)
rigidtform3d三维刚性几何变换 (自 R2022b 起)
simtform2d2-D similarity geometric transformation (自 R2022b 起)
simtform3d3-D similarity geometric transformation (自 R2022b 起)
se3SE(3) homogeneous transformation (自 R2026a 起)
so3SO(3) rotation (自 R2026a 起)
rotmat2vec3d将三维旋转矩阵转换为旋转向量 (自 R2022b 起)
rotvec2mat3d将三维旋转向量转换为旋转矩阵 (自 R2022b 起)
quaternionCreate quaternion array (自 R2023b 起)
randrotUniformly distributed random rotations (自 R2023b 起)

主题

  • 多视图运动重建

    利用增量式运动重建方法,根据一组二维视图推断场景的三维结构。 (自 R2026a 起)

  • Implement Visual SLAM in MATLAB

    Understand the visual simultaneous localization and mapping (vSLAM) workflow and how to implement it using MATLAB.

  • 坐标系

    指定像素索引、空间坐标和三维坐标系。

  • 什么是相机标定?

    估计图像或视频相机的镜头与图像传感器的参数。

精选示例