| [Top] [Up] [Prev] [Next] | [Up] [Tutorial] | mmtutor V1.0 30abr2001 |
mm025dilat There are three main geometrical interpretations of the dilation: the paint brush or stamp, translating and stamping the whole image, and walking on the contour.
The translation invariant dilation can be written as the union of translated structuring elements. This is the paint brush or stamping interpretation. The white image pixels coordinates are the center where the structuring element is stamped. So the image gives the information for the pen stroke, and the SE gives the shape of the brush.

A=imread('linha.tif');
mmshow(A);
B=mmsedisk(10);
C=mmdil(A,B);
B=mmseshow(B);
mmshow(B);
mmshow(C);
|
The translation invariant dilation is commutative and as such, the same equation used for the paint brush interpretation can be used here, but swapping the image with the SE. In this case the image is the stamp and the points of the SE are the coordinates to translate the image stamp.

In the example below, Ba are the randomly selected points of the SE Bt that is used to translate the contour of the image, which is stored in Q.
Another equivalent equation of the dilation has the interpretation of touching the SE around the white image pixels and making the SE center as the new image border. In this case, it is necessary to reflect the SE around the origin. The dilated image is formed by all pixels given by the center of the reflected SE such that the intersection of this SE and the image is not empty.

In the example below, Br is the reflected SE. P is built for illustrative purpose to select randomly some points in the contour of the dilated image. In the final image, the dilated image is white, Q is the image where the reflected SE is stamped on the contour of the dilated image, illustrating this geometric interpretation.
A=imread('scissors.tif');
mmshow(A);
B=mmimg2se(imread('blob1.tif'));
C=mmdil(A,B);
Br=mmimg2se(rot90(rot90(imread('blob1.tif'))));
mmshow(mmseshow(B));
mmshow(mmseshow(Br));
mmshow(C);
P=mmintersec(mmgradm(C), uint8(rand(size(C))>0.99));
Q=mmunion(mmgradm(mmdil(P,Br)),mmdil(P));
mmshow(C,Q,mmgradm(A));
|
In this demonstration, an image with blobs is labeled and its label number is drawn at each blob center. To implement this, a SE is created for each number and stamped at the blob center using the dilation.
| [Top] [Up] [Prev] [Next] | [Up] [Tutorial] |
|
| Copyright (c) 1998-20001 by SDC Information SystemsCopyright (c) 1998-20001 by SDC Information Systems | ||