ImageGear .NET v25.2 - Updated
Erode Method (ImGearRasterProcessing)




ImageGear.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class : Erode Method
Page class object to apply effect to.

Matrix specifying a structuring element (sometimes called the kernel) used to probe the input image. It consists of only 0's and 1's that can have any arbitrary shape and size. The pixels with values of 1 define the neighborhood.

Two-dimensional, or flat, structuring elements are typically much smaller than the image being processed. The center pixel of the structuring element, called the origin, identifies the pixel of interest - the pixel being processed. The pixels in the structuring element containing 1's define the neighborhood of the structuring element. These pixels are also considered in dilation or erosion processing.

You typically choose a structuring element the same size and shape as the objects you want to process in the input image. For example, to find lines in an image, create a linear structuring element.

Applies erosion effect to provided raster page using the specified structuring element.
Syntax
'Declaration
 
Public Shared Sub Erode( _
   ByVal page As ImGearRasterPage, _
   ByVal matrix(,) As Integer _
) 
'Usage
 
Dim page As ImGearRasterPage
Dim matrix() As Integer
 
ImGearRasterProcessing.Erode(page, matrix)
public static void Erode( 
   ImGearRasterPage page,
   int[,] matrix
)
public: static void Erode( 
   ImGearRasterPage* page,
   int[,]* matrix
) 
public:
static void Erode( 
   ImGearRasterPage^ page,
   array<int>^ matrix
) 

Parameters

page
Page class object to apply effect to.
matrix

Matrix specifying a structuring element (sometimes called the kernel) used to probe the input image. It consists of only 0's and 1's that can have any arbitrary shape and size. The pixels with values of 1 define the neighborhood.

Two-dimensional, or flat, structuring elements are typically much smaller than the image being processed. The center pixel of the structuring element, called the origin, identifies the pixel of interest - the pixel being processed. The pixels in the structuring element containing 1's define the neighborhood of the structuring element. These pixels are also considered in dilation or erosion processing.

You typically choose a structuring element the same size and shape as the objects you want to process in the input image. For example, to find lines in an image, create a linear structuring element.

Remarks
This method is applicable to:

Erosion operation removes pixels on object boundaries. The number of pixels added or removed from the objects in an image depends on the size and shape of the matrix structuring element, used to process the image.

In the morphological dilation and erosion operations, the state of any given pixel in the output image is determined by applying a rule to the corresponding pixel and its neighbors in the input image. The rule for erosion operation is following:

The value of the output pixel is the minimum value of all the pixels in the input pixel's neighborhood. In a binary image, if any of the pixels is set to the value 0, the output pixel is set to 0.

See Also

Reference

ImGearRasterProcessing Class
ImGearRasterProcessing Members
ImGearColorSpaceIDs Enumeration
ImGearRasterPage Class

Is this page helpful?
Yes No
Thanks for your feedback.