ImageGear .NET - Updated
EnhanceLocal(ImGearRasterPage,Int32,Int32,Double,Double) Method
Example 




ImageGear23.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class : EnhanceLocal(ImGearRasterPage,Int32,Int32,Double,Double) Method
An ImageGear.Core.ImGearRasterPage class object to enhance.
Width of the local window.
Height of the local window.
Scaling factor.
Minimum allowed standard deviation.
Enhances an image using the local standard deviation and mean.
Syntax
'Declaration
 
Public Shared Sub EnhanceLocal( _
   ByVal page As ImGearRasterPage, _
   ByVal windowWidth As Integer, _
   ByVal windowHeight As Integer, _
   ByVal scaleFactor As Double, _
   ByVal minStandardDeviation As Double _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim windowWidth As Integer
Dim windowHeight As Integer
Dim scaleFactor As Double
Dim minStandardDeviation As Double
 
ImGearRasterProcessing.EnhanceLocal(page, windowWidth, windowHeight, scaleFactor, minStandardDeviation)
public static void EnhanceLocal( 
   ImGearRasterPage page,
   int windowWidth,
   int windowHeight,
   double scaleFactor,
   double minStandardDeviation
)
public: static void EnhanceLocal( 
   ImGearRasterPage* page,
   int windowWidth,
   int windowHeight,
   double scaleFactor,
   double minStandardDeviation
) 
public:
static void EnhanceLocal( 
   ImGearRasterPage^ page,
   int windowWidth,
   int windowHeight,
   double scaleFactor,
   double minStandardDeviation
) 

Parameters

page
An ImageGear.Core.ImGearRasterPage class object to enhance.
windowWidth
Width of the local window.
windowHeight
Height of the local window.
scaleFactor
Scaling factor.
minStandardDeviation
Minimum allowed standard deviation.
Remarks
This method transforms the input image f(x, y) to a new image g(x, y) based on the following formula:

g(x, y) = A(x, y) * [f(x, y) - m(x, y)] + m(x, y)

where A(x, y) = k * M / sigma(x, y), with k being a scaling factor within the range [0, 1], m(x, y) and sigma(x, y) being the local mean and local standard deviation, and M being the global mean of the input image.

To avoid the problem of spikes caused by too small local standard deviation, a check against the minimum allowed standard deviation is performed. If the local standard deviation is too small, the minimum allowed instead will be used in the calculation.

Can be applied only to 8bit grayscale images with one channel.

Example
// Enhance the image using EnhanceLocal using a 3x3 window,
//  0.5 scale factor, and 1.0 minimum standard deviation.
ImGearRasterProcessing.EnhanceLocal(igRasterPage, 3, 3, 0.5, 1.0);
' Enhance the image using EnhanceLocal using a 3x3 window,
'  0.5 scale factor, and 1.0 minimum standard deviation.
ImGearRasterProcessing.EnhanceLocal(igRasterPage, 3, 3, 0.5, 1)
See Also

Reference

ImGearRasterProcessing Class
ImGearRasterProcessing Members
ImGearRasterPage Class