ImageGear Professional v18.2 > API Reference Guide > FreqIP Component API Reference > FreqIP Component Functions Reference > Filter Functions > IG_FIP_restore_wiener |
This function performs image restoration using Wiener filtering in the frequency domain.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_FIP_restore_wiener( HIGEAR hIGear, const LPAT_RECT lpRect, LPAT_DOUBLE lpPSFVector, const AT_INT nPSFSize, const AT_DOUBLE dWienerConstant ); |
Name | Type | Description |
hIGear | HIGEAR | Handle of the input image, also pass out the restored image. |
lpRect | const LPAT_RECT | Far pointer to an AT_RECT structure specifying the rectangular portion of the image on which to operate. If NULL, this operation will be performed on the entire image. |
lpPSFVector | LPAT_DOUBLE | Pointer to the vector which represents the Point Spread Function (PSF) in spatial domain, also called Degradation Function. |
nPSFSize | const AT_INT | Size of PSF passed in lpPSFVector. |
dWienerConstant | const AT_DOUBLE | The constant for Wiener Filtering. |
Returns the number of ImageGear errors that occurred during this function call.
Grayscale - 8 bpp.
FreqIP
Copy Code
|
|
---|---|
HIGEAR hIGear; /* Handle of the input image */
AT_DOUBLE psfVector[11];
...
IG_FIP_restore_wiener(hIGear, NULL, psfVector, 11, 0.005);
...
|
This filter is also commonly referred to as the minimum mean square error filter or the least square error filter.
Generally speaking, Wiener filtering can produce better results than inverse filtering.