主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

相机标定

使用针孔和鱼眼相机模型标定单目或立体相机,并估计相机的内参、外参和畸变参数

相机标定是通过使用包含标定模式的图像来估计相机参数的过程。这些参数包括相机内参、畸变系数和相机外参。使用这些相机参数可以消除图像中的镜头畸变效果,测量平面目标,基于多个相机重建三维场景,以及执行其他计算机视觉应用。

使用相机标定器和函数可估计单目相机的内参、外参和镜头畸变参数。

使用立体相机标定器和函数可估计一个立体相机组中两个相机的参数以及相对位置和方向。然后,您可以使用相机从图像中还原深度。它还可用于计算第二个相机相对于第一个相机的位置和方向。

Calibration patterns

App

相机标定器估计单目相机的几何参数
立体相机标定器估计立体相机的几何参数

函数

全部展开

棋盘

detectCheckerboardPointsDetect checkerboard pattern in image

圆形网格

detectCircleGridPointsDetect circle grid pattern in images (自 R2021b 起)

ChArUco 标定板

detectCharucoBoardPointsDetect ChArUco board pattern in images (自 R2024b 起)
generateCharucoBoardGenerate ChArUco board image (自 R2024b 起)

AprilGrid

detectAprilGridPointsDetect keypoints of AprilGrid pattern in images (自 R2024b 起)

自定义模式

vision.calibration.PatternDetectorInterface for defining custom planar pattern detectors (自 R2021b 起)

生成世界点

patternWorldPointsGenerate world point locations of a camera calibration pattern (自 R2024b 起)
generateWorldPointsGenerate world coordinates for keypoints of custom planar patterns (自 R2021b 起)

多相机标定模式

detectPatternPointsDetect calibration pattern keypoints in images from multiple cameras (自 R2025a 起)

AprilTag 与 ArUco 标记

readAprilTagDetect and estimate pose for AprilTag in image
readArucoMarkerDetect and estimate pose for ArUco marker in image (自 R2024a 起)
generateArucoMarkerGenerate ArUco marker images (自 R2024a 起)

针孔相机

estimateCameraParametersCalibrate a single or stereo camera
estimateCameraProjectionEstimate camera projection matrix from world-to-image point correspondences (自 R2022b 起)

鱼眼相机

estimateFisheyeParametersCalibrate fisheye camera

立体相机

estimateStereoBaselineEstimate baseline of stereo camera

多相机

estimateMultiCameraParametersCalibrate extrinsic parameters of multiple cameras with overlapping views (自 R2025a 起)

机器人相机

estimateCameraRobotTransformEstimate pose of camera relative to robot using hand-eye calibration (自 R2025a 起)

单目相机

cameraParametersObject for storing camera parameters
cameraIntrinsicsObject for storing intrinsic camera parameters
cameraIntrinsicsKBIntrinsic camera parameters based on Kannala-Brandt model (自 R2024a 起)
cameraProjectionCamera projection matrix (自 R2022b 起)

多相机

multiCameraParametersStore multi-camera system parameters (自 R2025a 起)

鱼眼相机

fisheyeIntrinsicsObject for storing intrinsic fisheye camera parameters
fisheyeParametersObject for storing fisheye camera parameters

立体相机

stereoParametersObject for storing stereo camera system parameters

误差度量

cameraCalibrationErrorsObject for storing standard errors of estimated camera parameters
stereoCalibrationErrorsObject for storing standard errors of estimated stereo parameters
extrinsicsEstimationErrorsObject for storing standard errors of estimated camera extrinsics and distortion coefficients
intrinsicsEstimationErrorsObject for storing standard errors of estimated camera intrinsics and distortion coefficients
fisheyeCalibrationErrorsObject for storing standard errors of estimated fisheye camera parameters
fisheyeIntrinsicsEstimationErrorsObject for storing standard errors of estimated fisheye camera intrinsics

针孔相机

undistortImageCorrect image for lens distortion
undistortPointsCorrect point coordinates for lens distortion

鱼眼相机

undistortFisheyeImageCorrect fisheye image for lens distortion
undistortFisheyePointsCorrect point coordinates for fisheye lens distortion
pcshowPlot 3-D point cloud
plotCameraPlot camera in 3-D coordinates
showExtrinsicsVisualize extrinsic camera parameters
showReprojectionErrorsVisualize calibration errors
stereoAnaglyphCreate red-cyan anaglyph from stereo pair of images
estimateExtrinsicsCalculate location of calibrated camera (自 R2022b 起)
extr2poseConvert extrinsics to camera pose (自 R2022b 起)
pose2extrConvert camera pose to extrinsics (自 R2022b 起)
estrelposeCalculate relative rotation and translation between camera poses (自 R2022b 起)
rotmat2vec3dConvert 3-D rotation matrix to rotation vector (自 R2022b 起)
rotvec2mat3dConvert 3-D rotation vector to rotation matrix (自 R2022b 起)
cameraIntrinsicsToOpenCVConvert camera intrinsic parameters from MATLAB to OpenCV (自 R2021b 起)
cameraIntrinsicsFromOpenCVConvert camera intrinsic parameters from OpenCV to MATLAB (自 R2021b 起)
stereoParametersToOpenCVConvert stereo camera parameters from MATLAB to OpenCV (自 R2021b 起)
stereoParametersFromOpenCVConvert stereo camera parameters from OpenCV to MATLAB (自 R2021b 起)

主题

精选示例