#include "BIFILTER.H"
HANDLE CALLBACK FreqDIBInverse( HANDLE hSrcDIB,
HANDLE hDFDIB,
BOOL bFFTMethod,
int SpectMul)
Description
This function will inverse filter the input DIB by the degradation function DIB in the frequency domain. It works with 4, 8 or 24 bits/pixel images. Inverse filtering of an image is processed by dividing the input image by the degradation function image to obtain the original noiseless image. The noise must be characterizable by a Fourier spectrum (typically linear motion blur). The input is the degraded image and the image of the degradation function. The filter will first process the spectras of both images, after computing a complex division using the transformed images, and finally returns with the inverse transformed, filtered image. The degradation spectra is multiplied by the SpectMul parameter, so normalization problems can be solved by tuning this parameter. In case of 4 or 8 bits/pixel, the source DIB must contain grayscale images and the palette values in the source DIB must be monotone increasing. It makes no sense to use this function in case of 1 bits/pixel. If the source DIB size is not power of two, zero padding is used.
Examples
The 256 x 256 sized blurred image, the inverse filtered image with a horizontal, linear motion blur degradation function and SpectMul = 2000, and the nonlinear maximum and after minimum filtered image of the inverse filtered image.
Parameters
HANDLE |
HSrcDIB |
Source DIB |
HANDLE |
HDFDIB |
Degradation Function DIB |
BOOL |
bFFTMethod |
There are two ways realized to process the power spectra of an image. One uses trigonometrical sinus and cosinus functions and the other one uses square root functions. There can be different between the two ways only at the processing time. Available values: TRUE (1) - The power spectra will be processed by sinus and cosinus functions. FALSE (0) - The power spectra will be processed by square root functions. |
int |
SpectMul |
Degradation function multiplying factor. |
Return values
Handle of the newly created DIB on success or NULL on failure.
Requirements
Header : Declared in BIFilter.h; include BIFilter.h.
Library : Use BIFilter.lib.
DLLs : BIFilter.dll.