Performs an edge-preserving average filter on the image.
#include "ltwrappr.h"
L_INT LBitmap::SigmaFilter(nSize, nSigma, nThreshhold, bOutline, uFlags = 0)
Size of the averaging neighborhood. It is the length, in pixels, of one side of a square.
Number of standard deviations of the kernel calculated pixels must be within. If low values such as 1 or 2 are used, the filter acts more as a noise filtering function that preserves functions.
Minimum percentage of pixels included to the number of pixels in the kernel. If the percentage is not met, then all the pixels are automatically included. More noise is suppressed with higher threshold values.
The higher the threshold the more noise is suppressed.
Boolean flag that indicates whether the central pixel is included in the calculation of the filter. Possible values are:
Value | Meaning |
---|---|
TRUE | Central pixel is included. |
FALSE | Central pixel is excluded. |
Reserved for future use. Must be 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The amount of blur is controlled by specifying the size of the neighborhood.
This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available in the Document and Medical Imaging toolkits.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Sigma Function - Before
Sigma Function - After
View additional platform support for this Sigma function.
Win32, x64.
L_INT LBitmap__SigmaFilterExample()
{
L_INT nRet;
LBitmap LeadBitmap;
nRet = LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("sample5.cmp")), 0,ORDER_BGR);
if(nRet !=SUCCESS)
return nRet;
nRet = LeadBitmap.SigmaFilter(5, 2, 0.2f, FALSE, 0);;
if(nRet !=SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document