This function performs image restoration using Wiener filtering in the frequency domain.
Declaration:
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 ); |
Arguments:
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. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
Grayscale - 8 bpp.
Sample:
FreqIP
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* Handle of the input image */
AT_DOUBLE psfVector[11];
...
IG_FIP_restore_wiener(hIGear, NULL, psfVector, 11, 0.005);
...
|
Remarks:
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.