光学系统设计与分析
R2026b使用 Optical Design and Simulation Library for Image Processing Toolbox™ 为光学应用设计和仿真光学系统。该库使您能够创建自定义光学设计,使用来自综合材料库的块状玻璃和镀膜材料,导入块状材料,以及创建自定义光学材料和镀膜。该库提供可视化工具以在二维和三维中可视化光学设计。此外,您还可以通过从 ZMX 文件导入系统来与现有光学设计集成。
您可以通过跟踪射线、执行偏振分析、计算光斑图、分析像差、镜头畸变和场曲来评估光学系统。然后您可以可视化结果。此外,您也可以使用 Optimization Toolbox™ 中提供的优化工具来优化光学系统和光学镀膜。
光学系统设计器为光学和光学系统设计提供了交互式界面。您可以使用该 App 设计自定义光学系统,仿真从 ZMX 文件导入的光学系统,并以交互方式可视化跟踪的射线、光斑图、像差、畸变、场曲和其他分析。
要开始使用 Optical Design and Simulation Library for Image Processing Toolbox,请参阅Get Started with Optical Design and Simulation。
您可以从附加功能资源管理器安装 Optical Design and Simulation Library for Image Processing Toolbox。有关安装附加功能的详细信息,请参阅获取和管理附加功能。


App
| 光学系统设计器 | 设计和分析光学系统 (自 R2026a 起) |
函数
创建和操作系统组件
opticalSystem | Model components of optical system (自 R2026a 起) |
addDiaphragm | Add physical diaphragm component to optical system (自 R2026a 起) |
addImagePlane | Add image plane component to optical system (自 R2026a 起) |
addImageSensor | Add image sensor to optical system (自 R2026b 起) |
addMirror | Add mirror component to optical system (自 R2026a 起) |
addRefractiveSurface | Add refractive surface component to optical system (自 R2026a 起) |
addGap | Add gap between optical components (自 R2026a 起) |
add | Add optical component to optical system (自 R2026a 起) |
changeGap | Change gap between components in optical system (自 R2026a 起) |
distanceAfter | Query distance after optical component (自 R2026a 起) |
distanceBefore | Query distance before optical component (自 R2026a 起) |
insert | Insert optical component into optical system (自 R2026a 起) |
remove | Remove component from optical system (自 R2026a 起) |
resolveMaterials | Resolve component materials in optical system against glass library (自 R2026a 起) |
setConstructionFrame | Set coordinate break for all subsequent components in optical system (自 R2026a 起) |
调节光学系统
focus | Position image plane of optical system to minimize RMS spot size (自 R2026a 起) |
updateSemiDiameters | Update semi-diameters of surfaces in optical system (自 R2026a 起) |
二维可视化
view2d | Visualize optical system in 2-D (自 R2026a 起) |
OpticalSystemViewer2D | Customize 2-D visualization of optical system (自 R2026a 起) |
三维可视化
view3d | Visualize optical system in 3-D (自 R2026a 起) |
OpticalSystemViewer3D | Customize 3-D visualization of optical system (自 R2026a 起) |
射线追踪
fieldPoint | Create field point representation of light source (自 R2026a 起) |
samplingGrid | Create ray sampling grid for entrance surface of optical system (自 R2026a 起) |
traceChiefRay | Trace chief ray through optical system (自 R2026a 起) |
traceMarginalRays | Trace marginal rays through optical system (自 R2026a 起) |
traceRays | Perform ray tracing through optical system (自 R2026a 起) |
traceDirectedRays | Trace rays from specific origins along specific directions through optical system (自 R2026b 起) |
traceAimedRay | Trace ray aimed at specific point on target optical surface (自 R2026b 起) |
图像质量和像差分析
chromaticAberration | Compute lateral and longitudinal chromatic aberration of optical system (自 R2026a 起) |
fieldCurvature | Compute tangential and sagittal field curvature (自 R2026a 起) |
lensDistortion | Compute geometric lens distortion for optical system (自 R2026a 起) |
rayAberration | Compute tangential and sagittal ray aberration of optical system (自 R2026a 起) |
spot | Compute spot at which rays converge in image plane (自 R2026a 起) |
airyDiskRadius | Compute Airy disk radius of diffraction-limited optical system (自 R2026b 起) |
psf | Compute point spread function of optical system (自 R2026b 起) |
centroid | Compute centroid of point spread function (自 R2026b 起) |
ellipticity | Compute ellipticity of point spread function (自 R2026b 起) |
encircledEnergyAtRadius | Compute encircled energy of point spread function (自 R2026b 起) |
radiusAtEncircledEnergy | Compute radius at encircled PSF energy (自 R2026b 起) |
strehlRatio | Compute Strehl ratio of Huygens PSF (自 R2026b 起) |
mtf | Compute modulation transfer function of optical system (自 R2026b 起) |
contrastAtFrequency | Compute MTF contrast at spatial frequencies (自 R2026b 起) |
frequencyAtContrast | Compute spatial frequency at MTF contrast level (自 R2026b 起) |
测试图渲染
SimulatedESFRChart | Simulated edge spatial frequency response (eSFR) test chart (自 R2026b 起) |
SimulatedColorCheckerChart | Simulated ColorChecker test chart (自 R2026b 起) |
renderChart | Render test chart in optical system (自 R2026b 起) |
displayChart | Display test chart with overlaid regions of interest |
refreshImage | Apply postprocess gain to rendered test chart (自 R2026b 起) |
OPD 和波前误差分析
opd | Optical path difference for optical system (自 R2026b 起) |
addWavefrontRMS | Add RMS wavefront error metric to merit function (自 R2026b 起) |
addWavefrontPeakToValley | Add peak‑to‑valley wavefront error metric to merit function (自 R2026b 起) |
分析可视化
spotDiagram | Chart displaying spot diagram of optical system (自 R2026a 起) |
show | Plot analysis result (自 R2026a 起) |
showEncircledEnergy | Plot encircled energy of point spread function (自 R2026b 起) |
光学系统设定
halfFieldOfView | Compute half field of view of optical system (自 R2026a 起) |
paraxialInfo | Compute paraxial information, including cardinal points, for optical system (自 R2026a 起) |
管理镜片库
glassLibrary | Glass material library for optical system components (自 R2026a 起) |
changePriority | Change priority of glass material catalog in glass library (自 R2026a 起) |
addGlassCatalog | Add new glass catalog to glass library (自 R2026a 起) |
removeGlassCatalog | Remove glass material catalog from glass library (自 R2026a 起) |
restoreDefaultGlassLibrary | Restore glass library to default settings (自 R2026a 起) |
选择和使用玻璃材料
pickGlass | Pick named glass material from glass library (自 R2026a 起) |
searchGlassLibrary | Search glass library for glass material (自 R2026a 起) |
refractiveIndex | Compute complex refractive index for optical material (自 R2026a 起) |
resolveMaterials | Resolve component materials in optical system against glass library (自 R2026a 起) |
opticalMaterialPicker | Optical material picker UI component (自 R2026a 起) |
创建自定义玻璃材料
opticalMaterial | Create optical material (自 R2026a 起) |
refractiveIndex | Compute complex refractive index for optical material (自 R2026a 起) |
选择镀膜材料
pickCoatingMaterial | Pick optical coating material from coating material library (自 R2026a 起) |
coatingMaterialLibrary | Optical coating material library (自 R2026a 起) |
addCoatingMaterial | Add new optical coating material to optical coating material library (自 R2026a 起) |
removeCoatingMaterial | Remove optical coating material from optical coating material library (自 R2026a 起) |
restoreDefaultCoatingMaterialLibrary | Restore optical coating material library to default (自 R2026a 起) |
创建自定义镀膜材料
opticalMaterial | Create optical material (自 R2026a 起) |
设计和应用光学镀膜
opticalCoating | Create optical coating for optical system surfaces (自 R2026a 起) |
fresnelCoefficients | Compute Fresnel coefficients for optical coating (自 R2026a 起) |
addCoating | Add optical coating to lens surfaces in optical system (自 R2026a 起) |
removeCoating | Remove optical coatings from lens surfaces in optical system (自 R2026a 起) |
opticalCoatingEditor | Optical coating editor UI component (自 R2026a 起) |
管理光学镀膜库
coatingLibrary | Optical coating library for optical system components (自 R2026a 起) |
addCoating | Add optical coating to optical coating library (自 R2026a 起) |
removeCoating | Remove optical coating from optical coating library (自 R2026a 起) |
restoreDefaultCoatingLibrary | Restore coating library to default (自 R2026a 起) |
浏览光学镀膜
pickCoating | Pick optical coating from optical coating library (自 R2026a 起) |
opticalCoatingPicker | Optical coating picker UI component (自 R2026a 起) |
光学灵敏度和容差分析
opticalSensitivity | Analyze sensitivity of optical system (自 R2026b 起) |
OpticalSensitivity | Sensitivity analysis results of optical system (自 R2026b 起) |
opticalTolerance | Monte Carlo tolerance analysis of optical system (自 R2026b 起) |
OpticalTolerance | Monte Carlo tolerance analysis results of optical system (自 R2026b 起) |
applyPerturbation | Apply perturbation from sensitivity or tolerance analysis results (自 R2026b 起) |
光学容差
opticalToleranceSet | Optical tolerances for sensitivity and Monte Carlo analysis (自 R2026b 起) |
addSurfaceRadiusTolerance | Add tolerance for surface radius of curvature (自 R2026b 起) |
addSurfaceConicConstantTolerance | Add tolerance for surface conic constant (自 R2026b 起) |
addSurfacePositionTolerance | Add tolerance for surface position (自 R2026b 起) |
addSurfaceTiltTolerance | Add tolerance for surface tilt (自 R2026b 起) |
addSurfaceAsphericTolerance | Add tolerance for surface aspheric coefficients (自 R2026b 起) |
addComponentPositionTolerance | Add tolerance for component position (自 R2026b 起) |
addComponentTiltTolerance | Add tolerance for component tilt (自 R2026b 起) |
addComponentMaterialTolerance | Add tolerance for component material property (自 R2026b 起) |
addCustomTolerance | Add custom tolerance (自 R2026b 起) |
SurfaceRadiusTolerance | Tolerance for surface radius of curvature (自 R2026b 起) |
SurfaceConicConstantTolerance | Tolerance for surface conic constant (自 R2026b 起) |
SurfacePositionTolerance | Tolerance for surface position (自 R2026b 起) |
SurfaceTiltTolerance | Tolerance for surface tilt (自 R2026b 起) |
SurfaceAsphericTolerance | Tolerance for surface aspheric coefficient (自 R2026b 起) |
ComponentPositionTolerance | Tolerance for component position (自 R2026b 起) |
ComponentTiltTolerance | Tolerance for component tilt (自 R2026b 起) |
ComponentMaterialTolerance | Tolerance for component material property (自 R2026b 起) |
CustomTolerance | Custom tolerance (自 R2026b 起) |
apply | Apply tolerance perturbation to optical system (自 R2026b 起) |
光学优化
opticalOptimizationSet | Optical tuning parameters for compensator optimization (自 R2026b 起) |
addSurfacePositionTuning | Add tuning parameters for surface position (自 R2026b 起) |
addSurfaceTiltTuning | Add tuning parameters for surface tilt (自 R2026b 起) |
addComponentPositionTuning | Add tuning parameters for component position (自 R2026b 起) |
addComponentTiltTuning | Add tuning parameters for component tilt (自 R2026b 起) |
addCustomTuning | Add custom tuning parameter (自 R2026b 起) |
SurfacePositionTuning | Tuning parameter for surface position (自 R2026b 起) |
SurfaceTiltTuning | Tuning parameter for surface tilt (自 R2026b 起) |
ComponentPositionTuning | Tuning parameter for component position (自 R2026b 起) |
ComponentTiltTuning | Tuning parameter for component tilt (自 R2026b 起) |
CustomTuning | Custom tuning parameter (自 R2026b 起) |
光学评价函数
opticalMeritFunction | Optical merit function (自 R2026b 起) |
addSpot | Add spot RMS metric to merit function (自 R2026b 起) |
addWavefrontPeakToValley | Add peak‑to‑valley wavefront error metric to merit function (自 R2026b 起) |
addWavefrontRMS | Add RMS wavefront error metric to merit function (自 R2026b 起) |
addCustomMetric | Add custom metric to merit function (自 R2026b 起) |
evaluate | Evaluate merit function (自 R2026b 起) |
SpotRMS | Spot RMS metric function (自 R2026b 起) |
WavefrontPeakToValley | Peak-to-valley wavefront error metric for optical system merit function (自 R2026b 起) |
WavefrontRMS | RMS wavefront error metric for optical system merit function (自 R2026b 起) |
CustomMetric | Custom metric function (自 R2026b 起) |
evaluateMetric | Evaluate metric function (自 R2026b 起) |
主题
快速入门
- Get Started with Optical Design and Simulation
Use optical design and analysis tools to simulate and tune optical system performance for optics applications. - Coordinate Systems in Optics
Understand optics coordinate systems to manipulate positions and orientation of optical systems and their components.
光学系统分析
- Analyze Optical System Using Optical System Designer
This example shows how to analyze an optical system that you have designed or imported into the 光学系统设计器 app. - Create Field Points
Create field point representations of light sources for an optical system. - Configure Ray Sampling in Optical System
Configure ray sampling surface and sampling grid for ray tracing in optics. - Optimize Photographic Zoom Lens Component Positions
This example demonstrates how to use numerical optimization techniques to optimize the positions of zoom groups and achieve a target focal length.
光学镀膜和材料
- Apply Optical Coatings
Design, edit, and apply optical coating to optical surfaces. - Load, Create, and Use Optical Materials
Use materials from optical coating and glass libraries, or create custom optical materials. - Analyze Optical Coatings Using Optical System Designer
This example shows how to design and apply anti-reflective optical coatings to an optical system by using the 光学系统设计器 app. (自 R2026b 起) - Select Optical Material for Optical System
This example shows how to select optical materials from the glass library and from optical materials in the workspace based on criteria such as refractive index, Abbe number, and supported wavelengths.
精选示例
Design Cooke Triplet
Design a Cooke triplet lens system. This example requires the Optical Design and Simulation Library for Image Processing Toolbox™. You can install the Optical Design and Simulation Library for Image Processing Toolbox from Add-On Explorer. For more information about installing add-ons, see 获取和管理附加功能.
Design Optical System Using Optical System Designer
Design an optical system using the 光学系统设计器 app. The Optical System Designer app enables you to design, modify, simulate, and analyze optical systems. Using the app, you can:
Optimize Monochromatic Camera Lens System for Type 2/3 Sensor
Demonstrates how to design and optimize a general purpose monochromatic 25 mm F/4 camera lens system for a 2/3'' sensor. A 25 mm focal length provides a moderate field of view, while an F/4 aperture helps balance light and depth of field. The monochromatic assumption simplifies the design for optical systems that use narrowband light sources such as narrowband LED.
Optimize Coating Design for Longpass Optical Filter
Demonstrates how to design a 550 nm longpass optical filter, accounting for material properties and manufacturing limits using the Optimization Explorer (Optimization Toolbox) app. The method can be extended to more complex multi-band filters.
Find Manufacturing Tolerances Using Inverse Sensitivity Analysis
Demonstrates how to determine the maximum allowable manufacturing tolerances for an optical system using inverse sensitivity analysis. Given a target image quality specification, inverse sensitivity finds the largest tolerance for each parameter that keeps the total error within budget. Use inverse sensitivity analysis to determine what tolerance values to provide on the manufacturing drawing during fabrication.
- 自 R2026b 起
- 打开实时脚本
Improve Manufacturing Yield Using Monte Carlo Analysis
Demonstrates how to use Monte Carlo simulation to evaluate and improve the manufacturing yield of an optical system. Manufacturing yield is the percentage of fabricated lenses that meet a target image quality specification after accounting for random variations in surface radii, element thicknesses, air gaps, and glass properties that occur during production. A high yield indicates fewer rejected lenses and lower per-unit cost.
- 自 R2026b 起
- 打开实时脚本
Create Human Eye Model Schematic
Create a parametric human eye model and trace rays to evaluate optical performance.
- 自 R2026b 起
- 打开实时脚本
Model Shack-Hartmann Wavefront Sensor
Model a Shack-Hartmann wavefront sensor and use it to measure wavefront aberration of an optical system.
- 自 R2026b 起
- 打开实时脚本
Model Dynamic Optical Systems with Scanning Elements
Model dynamic optical systems by coupling ray tracing and optical analysis with Simulink control loops. The example uses a laser etching system as a motivating application – a class of systems where mechanical motion and optical behavior are tightly coupled. You control mirror angles to steer the beam through the optical system and realize a specified etch pattern on the image plane. At each simulation timestep, ray tracing computes the resulting spot position from the current mirror angles. This closes the loop between control inputs, mechanical motion, and optical response, enabling accurate pattern tracing while revealing effects such as cross-axis coupling and showing how to correct it by using a calibration lookup table.
- 自 R2026b 起
- 打开实时脚本
Simulate Image Using Spatially Variant PSF
Simulate the image that a lens system forms of a flat scene. The simulation reproduces geometric distortion, lateral chromatic aberration, and spatially varying aberration blur. The approach separates geometry from blur: you warp the scene per wavelength to apply distortion and lateral color, then convolve with chief-ray-centered point spread functions (PSFs) that carry only residual blur [1].
- 自 R2026b 起
- 打开实时脚本
Model Human Eye Diopters, Accommodation, and Refractive Errors
Model optical power, accommodation, and refractive errors in the human eye.
- 自 R2026b 起
- 打开实时脚本
Simulate Human Eye Changes with Age
Simulate the effects of aging on the human crystalline lens and its optical performance.
- 自 R2026b 起
- 打开实时脚本
Model Progressive Addition Lens Using Presbyopic Eye Model
Model a progressive addition lens and evaluate its optical performance on a presbyopic eye.
- 自 R2026b 起
- 打开实时脚本
Perform Sensitivity and Yield Analysis of Optical Coating Using Monte Carlo
Demonstrates how to calculate the sensitivity of optical coating layers in a Bragg reflector. To estimate the expected manufacturing yield, you then implement Monte Carlo simulation that incorporates material-specific tolerances in layer thickness and refractive index. Monte Carlo (MC) simulation is a statistical method that estimates system performance by repeatedly evaluating the design with randomized variations in its parameters. Each MC trial represents one possible manufactured coating, created by sampling all layer thicknesses and refractive indices according to their specified tolerances. This approach quantifies how sensitive the coating’s optical performance is to real-world process variations, and predicts the proportion of manufactured parts, or the yield, expected to meet the required specifications.
Apply Configurations to Optical System Imported from ZMX File
To apply preset configurations from a ZMX file to the optical design stored in the ZMX file.
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)














