![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity. More...
| IPSDKIPLFILTERING_API image::ImagePtr | ipsdk::imaproc::filter::despeckleFilter2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY, const ipReal64 inFactor) |
| wrapper function for Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity More... | |
| IPSDKIPLFILTERING_API void | ipsdk::imaproc::filter::despeckleFilter2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inHalfKnlSizeX, const ipUInt32 inHalfKnlSizeY, const ipReal64 inFactor, const image::ImagePtr &pOutRealImg) |
| wrapper function for Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity More... | |
Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity.
This algorithm is inspired from the sigma filter proposed by Lee in 1983 [1]. The sigma filter is based on the idea that impulse noise intensity differs from the local intensity according to a given standard deviation. Hence, it smooths the image impulse noise by averaging only the pixels in the current neighbourhood having their intensities within a fixed range.
The DespeckleFilter2dImg algorithm uses the same hypothesis that a noisy pixel will differ from the neighbourhood mean intensity, according to a range given by the local standard deviation. It suppresses the impulse noise in the input image replacing aberrant values by the mean intensity of the neighourhood defined by
and
(the central pixel is not taken into account).
For each pixel
, the local mean
and the local standard deviation
are calculated. The filtered resulting image is then given by:
Where
is a weight factor on the distance between the current pixel and the local mean. A high value of
yields to a strong blur whereas a too low value of
will not suppress all noisy pixels. Moreover, calculating the local mean on a too large neighbourhood will take into account more noisy pixels, degrading the quality of the smoothed image.
Here is an example of an image with salt and pepper noise and the result of the despeckle filter algorithm. In this example,
,
and
were set to 1:
[1] "Digital image smoothing and the sigma filter", J.-S. Lee, Computer Vision, Graphics, and Image Processing, Vol. 24, pp. 255 - 269, 1983.
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InImg | [Input] image for processing operation | X |
| ipsdk::imaproc::attr::InHalfKnlSizeX | [Input] half kernel size along X axis for operation | X |
| ipsdk::imaproc::attr::InHalfKnlSizeY | [Input] half kernel size along Y axis for operation | X |
| ipsdk::imaproc::attr::InFactor | [Input] Multiplying factor. Used for instance by shading correction algorithm | X |
| ipsdk::imaproc::attr::OutImg | [Output] image for processing operation | ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg) |
Global rule description for algorithm :
ipsdk::imaproc::matchSizeAndType (_pInImg,_pOutImg)
| IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::despeckleFilter2dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | inHalfKnlSizeX, | ||
| const ipUInt32 | inHalfKnlSizeY, | ||
| const ipReal64 | inFactor | ||
| ) |
wrapper function for Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::despeckleFilter2dImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | inHalfKnlSizeX, | ||
| const ipUInt32 | inHalfKnlSizeY, | ||
| const ipReal64 | inFactor, | ||
| const image::ImagePtr & | pOutRealImg | ||
| ) |
wrapper function for Smoothes the input image replacing aberrant values by the neighbourhood's mean intensity
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14