メインコンテンツ

fisheyeParameters

Object for storing fisheye camera parameters

Description

The fisheyeParameters object is used to store fisheye camera parameters. Use estimateFisheyeParameters to estimate parameters using calibration images.

Creation

Description

fisheyeParams = fisheyeParameters(intrinsics) returns an object that contains intrinsic and extrinsic parameters of a fisheye camera. intrinsics must be a fisheyeIntrinsics object. This syntax sets the Intrinsics property of the object.

example

fisheyeParams = fisheyeParameters(intrinsics,Name=Value) sets properties of the cameraParameters object by using one or more name-value arguments. Unspecified properties use default values. For example, WorldUnits='m' sets the world units to 'm'.

Properties

expand all

Intrinsic Camera Parameters

Fisheye intrinsic camera parameters, specified as a fisheyeIntrinsics object.

Extrinsic Camera Parameters

3-D camera rotation vectors, specified as an R-by-3 matrix or an R-by-3-by-P array, containing R rotation vectors, where P is the number of calibration patterns. Each vector describes the 3-D rotation of the camera's image plane relative to the corresponding calibration pattern.

Each vector specifies the axis of rotation in 3-D space, with its magnitude indicating the rotation angle in radians. The corresponding 3-D rotation matrices are specified by the PatternExtrinsics property, specifically in the form of tform.R, where tform is a rigidtform3d object. The PatternExtrinsics property specifies geometric transformation objects with the corresponding 3-D rotation matrices.

For single-pattern calibration, specify RotationVectors as an R-by-3 matrix. For multiple patterns, use an R-by-3-by-P array.

To ensure that the number of rotation vectors equals the number of translation vectors, you must set the RotationVectors and TranslationVectors properties together when creating the object. Setting only one property results in an error.

Camera translations, specified as an M-by-3 matrix. This matrix contains translation vectors for M images. The vectors contain the calibration pattern that estimates the calibration parameters. Each row of the matrix contains a vector that describes the translation of the camera relative to the corresponding pattern, expressed in world units.

To ensure that the number of rotation vectors equals the number of translation vectors, you must set the RotationVectors and TranslationVectors properties together when creating the object. Setting only one property results in an error.

Accuracy of Estimated Camera Parameters

Estimated camera parameters accuracy, specified as a K-by-2-by-V or K-by-2-by-V-by-P array, of [x y] pairs. The pairs represent the translation in x and y between the reprojected pattern keypoints K, and the detected pattern keypoints. The values of this property represent the accuracy of the estimated camera parameters. V is the number of pattern views used to estimate camera parameters and P is the number of calibration patterns. K is the number of keypoints in each image.

For single-pattern calibration, specify ReprojectionErrors as anK-by-2-by-V array. For multiple patterns, use anK-by-2-by-V-by-P array.

This property is read-only.

World points reprojected onto calibration images, specified as a K-by-2-by-V or K-by-2-by-V-by-P array of [x y] coordinates. The coordinates represent world points reprojected onto calibration images. The number of keypoints in each image is represented by K. The number of pattern views is denoted by V, and P represents the number of calibration patterns. Missing points in the detected keypoints of the pattern are denoted as [NaN,NaN].

For single-pattern calibration, specify ReprojectedPoints as a K-by-2-by-V array. For multiple patterns, use anK-by-2-by-V-by-P array.

Detected keypoints in the calibration pattern, specified as a logical K-by-V or K-by-V-by-P array. The number of keypoints in each image is represented by K. The number of pattern views is denoted by V, and P represents the number of calibration patterns.

For single-pattern calibration, specify DetectedKeypoints as a K-by-V array. For multiple patterns, use anK-by-V-by-P array.

Settings Used to Estimate Camera Parameters

This property is read-only.

Number of patterns to estimate camera extrinsics, specified as an scalar integer.

This property is read-only.

Number of pattern views used to estimate camera extrinsics, specified as an scalar integer. A view is the perspective from which a camera captures a scene.

World coordinates of key points on the calibration pattern, specified as an M-by-2 matrix. M represents the number of key points in the pattern.

World point units, specified as the comma-separated pair consisting of 'WorldUnits' and a character vector or string scalar. This argument is used simply to store the unit type and does not affect any calculations.

Estimate axes alignment, specified as false or true. Set to true if the optical axis of the fisheye lens is not perpendicular to the image plane.

Examples

collapse all

Create a fisheye parameters object by specifying the properties manually. Alternatively, you can create this object using the estimateFisheyeParameters function.

Specify fisheye intrinsics.

 mappingCoefficients = rand(1,4);
 distortionCenter = [320 240];
 imageSize = [480 640];
 intrinsics = fisheyeIntrinsics(mappingCoefficients,imageSize,distortionCenter);

Create a fisheyeParameters object using the specified intrinsics.

 params = fisheyeParameters(intrinsics);

References

[1] Scaramuzza, D., A. Martinelli, and R. Siegwart. "A Toolbox for Easy Calibrating Omnidirectional Cameras." Proceedings to IEEE International Conference on Intelligent Robots and Systems (IROS 2006). Beijing, China, October 7–15, 2006.

[2] Urban, S., J. Leitloff, and S. Hinz. "Improved Wide-Angle, Fisheye and Omnidirectional Camera Calibration." ISPRS Journal of Photogrammetry and Remove Sensing. Vol. 108, 2015, pp.72–79.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Version History

Introduced in R2017b

expand all