HOME MFC C++ MICROSOFT .NET ASP .NET WIN32
You are here: Microsoft .Net > C# - Image Processing > Erosion Operation on Binary and Graylevel images Register | Login
Erosion Operation on Binary &Graylevel images in C#
Overview
Erosion is one of the two basic operators in the area of mathematical morphology. The basic effect of the operator on a
binary image is to erode away the boundaries of regions of foreground pixels (i.e. white pixels, typically). Thus areas of
foreground pixels shrink in size, and holes within those areas become larger.
General Working:
The erosion operator takes two pieces of data as inputs. The first is the image which is to be erosion. The second is a
set of coordinate points known as a Structuring Element. It is this structuring element that determines the precise effect of
the erosion on the input image. The mathematical definition of grayscale erosion is identical except for the way in which the
set of coordinates associated with the input image is derived. In addition, these coordinates are 3-D rather than 2-D. The
brief procedure for implementing the erosion in the binary image, and in the graylevel image are explained below.
The erosion is applied on the binary image in a single pass. During the pass, if the pixel in hand is equal to binary 0, then
apply the structuring element on the image by starting from that particular pixel as the origin. The sample project supposes
that, in the threshold image, the background is white and the foreground is black. If the sample image is not so, then you
have to adjust accordingly.
The erosion can also be applied on the graylevel images also in a single pass. During the passing through the image, the
structuring element is applied on each pixel of the image, such that the origin of the structuring element is applied on that
particular pixel. In this case the corresponding pixel of the output image contains the minimum of the pixels surrounding it.
In this case, only those pixels are compared with each other, where the structuring element contains.
Explanation
Let us take the example of the following image:
, and the following Structuring Element:
0 1 0
1 1 1
Google Search
Web codersource.net
- 1
- 2
前往页