ArrayFire: iterativeDeconv (original) (raw)
Iterative Deconvolution. More...
| Functions | |
|---|---|
| AFAPI array | iterativeDeconv (const array &in, const array &ker, const unsigned iterations, const float relaxFactor, const iterativeDeconvAlgo algo) |
| C++ Interface for Iterative deconvolution algorithm. More... | |
| AFAPI af_err | af_iterative_deconv (af_array *out, const af_array in, const af_array ker, const unsigned iterations, const float relax_factor, const af_iterative_deconv_algo algo) |
| C Interface for Iterative deconvolution algorithm. More... | |
Iterative Deconvolution.
The following table shows the iteration update equations of the respective deconvolution algorithms.
| Algorithm | Update Equation |
|---|---|
| LandWeber | \( \hat{I}_{n} = \hat{I}_{n-1} + \alpha * P^T \otimes (I - P \otimes \hat{I}_{n-1}) \) |
| Richardson-Lucy | \( \hat{I}_{n} = \hat{I}_{n-1} . ( \frac{I}{\hat{I}_{n-1} \otimes P} \otimes P^T ) \) |
where
- \( I \) is the observed(input/blurred) image
- \( P \) is the point spread function
- \( P^T \) is the transpose of point spread function
- \( \hat{I}_{n} \) is the current iteration's updated image estimate
- \( \hat{I}_{n-1} \) is the previous iteration's image estimate
- \( \alpha \) is the relaxation factor
- \( \otimes \) indicates the convolution operator
Iterative 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. For other types, output type will be float. 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.
◆ af_iterative_deconv()
C Interface for Iterative deconvolution algorithm.
Parameters
| [out] | out | is the sharp estimate generated from the blurred input |
|---|---|---|
| [in] | in | is the blurred input image |
| [in] | ker | is the kernel(point spread function) known to have caused the blur in the system |
| [in] | iterations | is the number of iterations the algorithm will run |
| [in] | relax_factor | is the relaxation factor multiplied with distance of estimate from observed image. |
| [in] | algo | takes value of type enum af_iterative_deconv_algo indicating the iterative deconvolution algorithm to be used |
Returns
AF_SUCCESS if the deconvolution is successful, otherwise an appropriate error code is returned.
Note
relax_factor argument is ignore when it AF_ITERATIVE_DECONV_RICHARDSONLUCY algorithm is used.
C++ Interface for Iterative deconvolution algorithm.
Parameters
| [in] | in | is the blurred input image |
|---|---|---|
| [in] | ker | is the kernel(point spread function) known to have caused the blur in the system |
| [in] | iterations | is the number of iterations the algorithm will run |
| [in] | relaxFactor | is the relaxation factor multiplied with distance of estimate from observed image. |
| [in] | algo | takes value of type enum af_iterative_deconv_algo indicating the iterative deconvolution algorithm to be used |
Returns
sharp image estimate generated from the blurred input
Note
relax_factor argument is ignore when it AF_ITERATIVE_DECONV_RICHARDSONLUCY algorithm is used.