multiCameraParameters
Description
The multiCameraParameters
object stores the intrinsic and
extrinsic parameters of a multi-camera system estimated during multi-camera
calibration.
Creation
Create a multiCameraParameters
object using the
estimateMultiCameraParameters
function.
Properties
Extrinsic Parameters
Pose of each camera relative to the origin camera
ReferenceCameraIndex
, specified as a
numCameras-element vector of rigidtform3d
objects. numCameras
represents the number of cameras.
Index of the origin camera, specified as an integer. This camera
defines the reference coordinate system, and all other camera poses are
defined relative to this reference camera. The pose of the reference
camera is represented as rigidtform3d(eye(4))
.
Number of cameras in the system, specified as an integer.
Intrinsic Parameters
Intrinsic parameters for all cameras in the multi-camera system,
specified as a numCameras-element cell array
containing cameraIntrinsics
objects,
fisheyeIntrinsics
objects, or a combination of both.
numCameras is the number of cameras.
Accuracy of Estimated Parameters
Average Euclidean distance between reprojected points and detected points over all image pairs, specified as an integer in pixels.
Average reprojection error for each camera, specified a numCameras-element vector. numCameras is the number of cameras.
Settings Used to Estimate Multi-Camera Parameters
Number of pattern views to estimate camera poses, specified as an integer.
Covisibility of cameras based on the calibration images, specified as a numCameras-by-numCameras logical matrix. numCameras is the number of cameras.
World coordinates of pattern keypoints in the calibration pattern, specified as a numKeyPoints-by-2 matrix. numKeyPoints is the number of keypoints in the pattern.
Units of world points, specified as a character vector or string scalar. This value describes the unit of measure.
Examples
Estimate the relative position and orientation of six cameras with overlapping fields of view by using calibration images that contain a single ChArUco board.
Download the calibration images.
calibImagesURL = "https://www.mathworks.com/supportfiles/vision/data/overlapping-cameras-charuco.zip"; calibImagesDir = fullfile(pwd,"overlapping-cameras-charuco"); calibImagesZip = fullfile(pwd,"overlapping-cameras-charuco.zip"); if ~exist(calibImagesZip,"file") disp("Downloading calibration images (52 MB)...") websave(calibImagesZip,calibImagesURL); end if ~exist(calibImagesDir,"dir") unzip(calibImagesZip,pwd) end
Specify calibration image filenames for each camera.
numCameras = 6; camDirPrefix = "Cam00"; imageFiles = cell(1,numCameras); for i = 1:numCameras camDir = fullfile(calibImagesDir,camDirPrefix+i); imds = imageDatastore(camDir); imageFiles{i} = imds.Files; end imageFiles = [imageFiles{:}];
Define the ChArUco board properties. Specify checker size and marker size in centimeters.
markerFamily = "DICT_6X6_1000"; patternDims = [5 5]; markerSize = 6.8; % in cm checkerSize = 9.15; % in cm numKeyPoints = prod(patternDims - 1);
Create a function handle for detectCharucoBoardPoints
that specifies the non-zero minimum marker ID of the board.
minMarkerId = 144;
funcHandle = @(image) detectCharucoBoardPoints(image,patternDims, ...
markerFamily,checkerSize,markerSize,MinMarkerID=minMarkerId);
Detect the key points of the ChArUco board in the calibration images.
imagePoints = detectPatternPoints(imageFiles,funcHandle,numKeyPoints);
[==================================================] 100% Elapsed time: 00:00:04 Estimated time remaining: 00:00:00
Generate the world points for the pattern.
worldPoints = patternWorldPoints("charuco-board",patternDims,checkerSize);
Load the intrinsic parameters of the six cameras. These parameters have been estimated using the Using the Single Camera Calibrator App.
ld = load("sixCameraIntrinsics.mat");
Perform multi-camera calibration.
params = estimateMultiCameraParameters(imagePoints,worldPoints,ld.intrinsics,WorldUnits="cm");
Visualize the calibration accuracy.
figure(Position=[100,100,1000,400]) showReprojectionErrors(params)
Visualize the camera extrinsic parameters.
figure showExtrinsics(params) view(2)
Version History
Introduced in R2025a
See Also
Apps
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)