[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] SDC Morphology Toolbox V1.1 15Jan02

mmdarea - Remove objects with small areas in binary images.


Description
In this example, the image of an electric circuit diagram is processed. The circuit diagram image is composed of two kinds of objects: the circuit itself, that has a large area, and the letters, that have small areas. Eliminating all the objects that have area less than 200, we get the image that contains only the circuit diagram.

Reading

The binary image to be processed is read.

a = mmreadgray('circuit_bw.tif');
mmshow(a);
image
(a)

Filtering

The procedure areaopen removes the objects with area less than the specified parameter (i.e., 200).

b = mmareaopen(a,200);
mmshow(b);
image
(b)

Final display

For displaying purposes the filtered image is superposed over the original image.

mmshow(a,b);
image
(a,b)

[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] Valid XHTML 1.0!
Copyright (c) 1998-2002 by SDC Information Systems