A high-performance general-purpose compute library

Inverse Deconvolution. More...

Functions

AFAPI array inverseDeconv (const array &in, const array &psf, const float gamma, const inverseDeconvAlgo algo)
 C++ Interface for Tikhonov deconvolution algorithm. More...
 
AFAPI af_err af_inverse_deconv (af_array *out, const af_array in, const af_array psf, const float gamma, const af_inverse_deconv_algo algo)
 C Interface for Tikhonov deconvolution algorithm. More...
 

Detailed Description

Inverse Deconvolution.

Inverse deconvolution is an linear algorithm i.e. they are non-iterative in nature and usually faster than iterative deconvolution algorithms.

Depending on the values passed on to the enum af_inverse_deconv_algo, different equations are used to compute the final result.

Tikhonov's Deconvolution Method:

The update equation for this algorithm is as follows:

\[ \hat{I}_{\omega} = \frac{ I_{\omega} * P^{*}_{\omega} } { |P_{\omega}|^2 + \gamma } \]

where

Inverse deconvolution function excepts af::array of the following types only:

Note
The type of output af::array from deconvolution will be double if the input array type is double. Otherwise, it will be float in rest of the cases. 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.

Function Documentation

◆ af_inverse_deconv()

AFAPI af_err af_inverse_deconv ( af_array out,
const af_array  in,
const af_array  psf,
const float  gamma,
const af_inverse_deconv_algo  algo 
)

C Interface for Tikhonov deconvolution algorithm.

Parameters
[out]outis the sharp estimate generated from the blurred input
[in]inis the blurred input image
[in]psfis the kernel(point spread function) known to have caused the blur in the system
[in]gammatakes different meaning depending on the algorithm chosen. If algo is AF_INVERSE_DECONV_TIKHONOV, then gamma is a user defined regularization constant.
[in]algotakes value of type enum af_inverse_deconv_algo indicating the inverse deconvolution algorithm to be used
Returns
AF_SUCCESS if the deconvolution is successful, otherwise an appropriate error code is returned.

◆ inverseDeconv()

AFAPI array inverseDeconv ( const array in,
const array psf,
const float  gamma,
const inverseDeconvAlgo  algo 
)

C++ Interface for Tikhonov deconvolution algorithm.

Parameters
[in]inis the blurred input image
[in]psfis the kernel(point spread function) known to have caused the blur in the system
[in]gammais a user defined regularization constant
[in]algotakes different meaning depending on the algorithm chosen. If algo is AF_INVERSE_DECONV_TIKHONOV, then gamma is a user defined regularization constant.
Returns
sharp image estimate generated from the blurred input