[Top] [Up] [Prev] [Next] [Up] [Tutorial] mmtutor V1.0 30abr2001

mm070connectedfilter - Connected Filters.


Synopsis
mm070connectedfilter
Description

Connected Operators

A connected operator is an important class of operators that has the property of never introduce a border. The borders of the output operator always come from the input image. The connected operator works both for binary and gray scale images.

equation is a connected filter

Flat-zone

A Flat-zone is a connected region with pixels with the same gray-scale value. It is the gray scale extension of the binary connected component. If a pixel has no neighboring pixel with the same gray level, then this pixel is a flat zone of a single pixel.

A connected operator can only merge (simplify or extend) flat-zones. The filtered flat zones contain the flat zones of the original image.

Binary Area-open: Example of a binary connected operator

An intuitive example of a connected operator, which in this case in also a connected filter, is the binary area open. This filter removes connected objects which have area less than a specified value. In the example below all the connected objects of area less than 1300 are removed. One can notice that the effect of the filter was to remove entirely the smaller objects: the pencil and the disk. In this case the flat zones of these two objects were merged to the background flat zone.

A=imread('tools.tif');
mmshow(A);
B=mmareaopen(A,1300,mmsebox);
mmshow(B);
image
(A)
image
(B)

Gray-scale area-open

The binary area-open can be extended to gray scale using the threshold decomposition as it is an increasing filter.

In the example below the gray scale area open is applied to the negation of a bar code image. The effect of the gray scale area open is to cut-off the domes of the image until their area reach the specified area. The numbers in the filtered image below have area less than 400, which is the parameter used, so that they almost disappear from the image.

A=mmneg(imread('n2538.tif'));
mmshow(A);
B=mmareaopen(A,400);
mmshow(B);
mmshow(mmsurf(A));
mmshow(mmsurf(B));
image
(A)
image
(B)
image
(mmsurf(A))
image
(mmsurf(B))

Edge Preserving Smoothing Filter: Connected Open and Close

Sometimes we want to smooth an image without removing the edges. The linear smoothing filters are not appropriated for this. It is desirable to design edge preserving smoothing filters to cope with this problem. One of the most known filter in this class is the median filter. The connected filters goes a further step in this direction, not only preserving the edges, but if an edge appears in the filtered image, this edge was present in the original image at the same position. The simplest connected filters suitable for this are the area open and the connected open, connected close, and connected alternating sequential filtering, where the latter is built from compositions of connected open and connected closing filters.

Connected Open

The connected open filter, also called open by reconstruction, is the reconstruction of the input image where the marker is its erosion (or equivalently its opening). The geometric interpretation for the binary connected open is the following. If the structuring element can fit anywhere in a connected component in the image, then this connected component will appear in the filtered image. We can say that the connected open removes all connected components that does not meet the shape criteria of fitting the structuring element. Note that this filter requires two structuring elements: the one used for the open (or erosion), responsible for the shape criteria; and a second, required by the reconstruction, responsible for the connectivity criteria. This second one is normally the elementary cross SE (mmsecross) for 4-connected, or the elementary square SE (mmsebox) for 8-connected reconstruction.

In the example below, we use a vertical line structuring element of length 25 pixels. The input image has three connected components representing three numbers. The result of the connected open gives only the object with a portion where the vertical line can fit: the number four. This is the principle of designing a classification filter based on shape.

A=imread('numbers.tif');
mmshow(A);
B=mmopen(A,mmseline(25,90));
mmshow(A,B);
C=mmopenrec(A,mmseline(25,90));
mmshow(C);
image
(A)
image
(A,B)
image
(C)

Example of Image Simplification

The demonstration below illustrates the application of alternating connected opening and closing filters to simplify a gray scale image by sucessive flat-zone merging. An important propertie of this family of filters is their ability to create a pyramid of different flat-zone resolutions from the sequence of sucessive mergings.

Exercises


[Top] [Up] [Prev] [Next] [Up] [Tutorial] Valid XHTML 1.0!
Copyright (c) 1998-20001 by SDC Information SystemsCopyright (c) 1998-20001 by SDC Information Systems