A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
inverseDeconv
ArrayFire Functions | ArrayFire Functions by Category » Image Processing » Filters

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.
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.

## 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

- \( I_{\omega} \) is the observed(input/blurred) image in frequency domain
- \( P_{\omega} \) is the point spread function in frequency domain
- \( \gamma \) is a user defined regularization constant

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

- f32
- s16
- u16
- u8

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] | out | is the sharp estimate generated from the blurred input
  [in] | in | is the blurred input image
  [in] | psf | is the kernel(point spread function) known to have caused the blur in the system
  [in] | gamma | takes different meaning depending on the algorithm chosen. If `algo` is AF_INVERSE_DECONV_TIKHONOV, then `gamma` is a user defined regularization constant.
  [in] | algo | takes 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] | in | is the blurred input image
  [in] | psf | is the kernel(point spread function) known to have caused the blur in the system
  [in] | gamma | is a user defined regularization constant
  [in] | algo | takes 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