Processing math: 100%

Function iterative_deconv

Source
pub fn iterative_deconv<T>(
    input: &Array<T>,
    kernel: &Array<f32>,
    iterations: u32,
    relaxation_factor: f32,
    algo: IterativeDeconvAlgo,
) -> Array<T::AbsOutType>
Expand description

Iterative Deconvolution

The following table shows the iteration update equations of the respective deconvolution algorithms.

AlgorithmUpdate Equation
LandWeber ˆIn=ˆIn1+αPT(IPˆIn1)
Richardson-Lucy ˆIn=ˆIn1.(IˆIn1PPT)

where

  • I is the observed(input/blurred) image
  • P is the point spread function
  • PT is the transpose of point spread function
  • ˆIn is the current iteration’s updated image estimate
  • ˆIn1 is the previous iteration’s image estimate
  • α is the relaxation factor
  • indicates the convolution operator

The type of output Array from deconvolution will be of type f64 if the input array type is f64. For other types, output type will be f32 type. Should the caller want to save the image to disk or require the values of output to be in a fixed range, that should be done by the caller explicitly.