Main Content

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) configures the fisheyeParams object properties using one or more Name,Value pair arguments. Enclose the property name in single quotes. Unspecified properties have their 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

Camera rotations, specified as an M-by-3 matrix. The matrix contains rotation vectors for M images, where each image contains the calibration pattern that estimates the calibration parameters. Each row of the matrix contains a vector that describes the 3-D rotation of the camera relative to the corresponding pattern.

Each vector specifies the 3-D axis about which the camera is rotated. The magnitude of the vector represents the angle of rotation in radians. You can convert any rotation vector to a 3-by-3 rotation matrix using the Rodrigues formula.

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

Reprojection errors, specified as an M-by-2-by-P array of [x,y] pairs. The [x,y] pairs represent the translation in x and y between the reprojected pattern keypoints and the detected pattern keypoints.

World points reprojected onto calibration images, specified as an M-by-2-by-P array of [x y] coordinates. P is the number of pattern images and M is the number of keypoints in each image. Missing points in the pattern's detected keypoints are denoted as [NaN,NaN].

Detected keypoints in the calibration pattern, specified as a logical M-by-P array. M is the number of keypoints in the entire calibration pattern and P specifies the number of calibration images.

Settings Used to Estimate Camera Parameters

Number of calibration patterns used to estimate camera extrinsics, specified as an integer. The number of calibration patterns must equal the number of translation and rotation vectors.

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

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

Version History

Introduced in R2017b