メインコンテンツ

LensDistortion

Lens distortion analysis result

Since R2026a

    Description

    Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

    A LensDistortion object stores a lens distortion analysis result. To display a 2-D visualization of the lens distortion, use the show object function.

    Creation

    Create a LensDistortion object when you perform lens distortion analysis for an optical system using the lensDistortion object function.

    Properties

    expand all

    This property is read-only.

    y-coordinate position data, represented as an N-by-1 vector. N is the number of the corresponding evenly spaced x-coordinate points, specified using the NumSamples name-value argument of the lensDistortion function. The value of each element of the vector depends on the computation space specified to the ComputationSpace name-value argument of lensDistortion.

    ComputationSpace ValueYData Value

    "ObjectSpace"

    Each element of the vector represents a field angle in the range [0, F], where F is the maximum field angle, in degrees, specified using the MaxFieldAngle name-value argument of lensDistortion.

    "ImageSpace"

    Each element of the vector represents the height of the image plane, or sensor, in millimeters.

    This property is read-only.

    Lens distortion result, represented as an N-by-M numeric matrix. N is the number of evenly spaced points, specified using the NumSamples name-value argument of lensDistortion, and M is the number of wavelengths, specified using the Wavelengths name-value argument of lensDistortion.

    This property is read-only.

    Wavelengths for which to compute the lens distortion, represented as an M-element numeric vector. M is the number of wavelengths, specified using the Wavelengths name-value argument of lensDistortion.

    This property is read-only.

    Type of lens distortion, represented as one of these options.

    • "FTanTheta" — The image height is proportional to the tangent of the angle of the incoming light ray with respect to the optical axis. Use this model to approximate the lens distortion of real lenses, especially wide-angle lenses, when projecting images. The radial distance r from the image center is given by

      r=f·tan(θ)

      where f is the focal length and θ is the angle of the incoming light ray with respect to the optical axis.

    • "FTheta" — The image height is directly proportional to the angle from the optical axis. Use this model to compute the lens distortion for fisheye lenses, to capture a wide field of view with a characteristic distortion pattern. The radial distance r from the image center is given by

      r=f·θ

      The linear relationship between the angle and the radial distance leads to the distinctive fisheye effect.

    To set this property, use the Type name-value argument of the lensDistortion function.

    This property is read-only.

    Space in which to compute the lens distortion, represented as one of these options.

    • "ObjectSpace" — Compute lens distortion effects from the perspective of the object being imaged. Use this option to examine how the optical system alters the perceived geometry and positions of objects in the scene.

    • "ImageSpace" — Compute lens distortion effects observed in the image plane, where the sensor or film captures the image. Specify this option to analyze the effect of distortion on how the final image appears.

    To set this property, use the ComputationSpace name-value argument of the lensDistortion function.

    This property is read-only.

    Option to use a uniform paraxial scale across all wavelengths, represented as a logical 1 (true) or 0 (false).

    • 1 (true) — Compute the paraxial scale for the reference wavelength, and use it to compute lens distortion for each wavelength.

    • 0 (false) — Compute the paraxial scale, and therefore lens distortion, separately for each wavelength.

    The paraxial scale is the scale factor that relates the size of the image in the paraxial approximation, or the ideal image, to the size of the actual image formed by the optical system. To set this property, use the UseSameScaleForAllWavelengths name-value argument of the lensDistortion function.

    This property is read-only.

    Index of the reference wavelength, represented as a positive integer. The reference wavelength is the wavelength at which to compute the paraxial scale used to compute lens distortion at all wavelengths when SameScaleForAllWavelengths is true. To set this property, use the ReferenceWavelengthIndex name-value argument of the lensDistortion function.

    This property is read-only.

    Maximum field angle, or angle from the optical axis, at which to compute the lens distortion, represented as a numeric scalar in the range [0, 180]. To compute the half field of view, or half-angle, use the halfFieldOfView function. By default, MaxFieldAngle value is 0.9 times the value of the half-angle of the optical system opsys specified to the lensDistortion function.

    To set this property, use the MaxFieldAngle name-value argument of the lensDistortion function.

    This property is read-only.

    Distance between the object and the first surface in the optical system, represented as a positive numeric scalar. By default, the object is located at an infinite distance from the first surface in the optical system opsys specified to the lensDistortion function.

    To set this property, use the ObjectDistance name-value argument of the lensDistortion function.

    Object Functions

    showPlot analysis result

    Version History

    Introduced in R2026a