Optical System¶
This package implements various optical systems, which takes as inputs the scene information and computes the radiance field impinging on the sensor plane. See DNOIS Imaging Model for more information.
The content concerning optical system can be roughly divided into two parts: Modeling optical systems and Image formation. The former refers to the calculation of optical response, such as point spread function (PSF) of the optical system, while the latter means the ways to render the image produced by it given a ground truth image and optical response. Note that optical response is not always specified by PSF. For example, a group of rays can dictate rendering process as well in ray-tracing-based systems.
Modeling optical systems¶
Abstract models¶
TODO
|
Ideal optics model. |
|
|
|
Base class for optical systems that renders images through PSFs. |
Implemented models¶
The optical response of a given system varies when different ways are chosen to model it. Currently, there are two categories of methods to model optical systems: Diffraction and Ray Tracing. The following content implements Abstract models in these two ways.
Paraxial optics¶
Behavior of an optical system under paraxial approximation is modeled by ParaxialSystem
.
It is an abstract class but typically you need only to instantiate it with
ParaxialSystem.from_interface()
rather than explicitly instantiating its subclass.
|
A dataclass to store various features of the conjugate points: |
|
|
|
An implementation of |
|
An implementation of |
Image formation¶
|
Simplest image formation model. |
|
Depth-aware image formation model. |
|
Space-variant image formation model. |
|
Point-wise image formation model. |
Optics¶
Here are some useful functions for optical calculation.
|
Returns the diameter of circle of confusion \(D_\text{COC}\). |
|
Returns image distance \(s'\) given object distance \(s\). |
|
Returns object distance \(s\) given image distance \(s'\). |
|
Normalizes PSF so that all its pixels sum up to 1. |
|
Computes Fresnel's equation for s-polarized transmitted (refractive) wave: |
|
Computes Fresnel's equation for s-polarized reflected wave: |
|
Computes Fresnel's equation for p-polarized transmitted (refractive) wave: |
|
Computes Fresnel's equation for p-polarized reflected wave: |