Optics
The PyColibri optics module encompasses a collection of optical systems extensively employed in the computational imaging research for spectral, depth, phase and other imaging applications. This module facilitates the simulation of optical propagation and the design of optical elements inside the systems, offering researchers and developers a powerful toolkit for advancing imaging technologies.
Mathematically, all implemented optical systems are of the form
where \(\mathbf{x}\in\xset\) is the input optical field, \(\mathbf{y}\in\yset\) are the acquired signal, \(\forwardLinear:\xset\mapsto \yset\) is a deterministic (linear or non-linear) optics model of the acquisition system, \(\learnedOptics\) is a set of learnable parameters characterizing the optical system, and \(\noise\) is a stochastic mapping which characterizes the noise affecting the measurements.
Spectral Imaging systems
Single Disperser Coded Aperture Snapshot Spectral Imager (SD-CASSI) |
|
Dual Disperser Coded Aperture Snapshot Spectral Imager (DD-CASSI) |
|
Color Coded Aperture Snapshot Spectral Imager (C-CASSI) |
|
Single Pixel Camera (SPC). |
|
Single Diffractive Optical Element for Spectral Imaging |
Functional operators of the optical systems
Forward operator of color coded aperture snapshot spectral imager (Color-CASSI) |
|
Backward operator of color coded aperture snapshot spectral imager (Color-CASSI) |
|
Forward operator of dual disperser coded aperture snapshot spectral imager (DD-CASSI) |
|
Backward operator of dual disperser coded aperture snapshot spectral imager (DD-CASSI) |
|
Forward operator of single disperser coded aperture snapshot spectral imager (SD-CASSI) |
|
Backward operator of single disperser coded aperture snapshot spectral imager (SD-CASSI) |
|
Forward propagation through the Single Pixel Camera (SPC) model. |
|
Inverse operation to reconstruct the image from measurements. |
|
Calculate the point spread function (PSF) of an optical system comprising a diffractive optical element (DOE) for spectral imaging. |
|
Simulate the convolutional sensing model of an optical system, using either Fourier or spatial domain methods. |
|
Apply Fourier convolution theorem to simulate the effect of a linear system characterized by a point spread function (PSF). |
|
This function applies the convolution of an image with a Point Spread Function (PSF) in the signal domain. |
|
This function applies the Wiener filter to an image. |
|
Add Gaussian noise to an image based on a specified signal-to-noise ratio (SNR). |
Functional operators of optical elements
Prism operator, shifts linearly the input tensor x in the spectral dimension. |
|
Create a circular aperture mask of a given radius and pixel_size of size (M, N). |
|
Convert height map to phase modulation. |
|
Simulate the response of an ideal panchromatic sensor by averaging the spectral channels. |
|
Wavenumber |
|
Generate the spatial coordinates for wave optics simulations in a specific coordinate system. |
Functional operators of light propagation
Compute the optical field propagation using a scalar diffraction theory model which is given by the specific approximation selected. |
|
|
The transfer function for the angular spectrum propagation can be written as follows: |
The transfer function for the Fresnel propagation can be written as follows: |
|
The Fraunhofer approximation of \(U_0(x',y')\) is its Fourier transform, \(\mathcal{F}\{U_0\}\) with an additional phase factor that depends on the distance of propagation, \(z\). |
|
The inverse Fraunhofer approximation (to reconstruct the field at the source from the field at the sensor) is given by the following equation: |
state-of-the-art optical elements
Code to generate a conventional lens with a given focal length and radius following the equation |
|
Code to generate a spiral DOE with a given number of spirals, radius, focal length and wavelength range. |
utils
Add zero padding to a tensor. |
|
Unpad a tensor. |
|
Fast Fourier Transform of an optical field |
|
Inverse Fast Fourier Transform of an optical field |