LensDistortion
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
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
name-value argument of the
NumSampleslensDistortion function. The value of each element of the vector
depends on the computation space specified to the name-value argument of
ComputationSpacelensDistortion.
ComputationSpace Value | YData Value |
|---|---|
| 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 name-value argument of
lensDistortion. |
| 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 name-value argument of
NumSampleslensDistortion, and M is the number of
wavelengths, specified using the name-value argument of
WavelengthslensDistortion.
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 name-value argument of
WavelengthslensDistortion.
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 bywhere 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 byThe linear relationship between the angle and the radial distance leads to the distinctive fisheye effect.
To set this property, use the name-value argument of the
TypelensDistortion 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 name-value argument of the
UseSameScaleForAllWavelengthslensDistortion 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 name-value argument of the
ReferenceWavelengthIndexlensDistortion 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 name-value argument of the
MaxFieldAnglelensDistortion 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 name-value argument of the
ObjectDistancelensDistortion function.
Object Functions
show | Plot analysis result |
Version History
Introduced in R2026a
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)