sexta-feira, 26 de setembro de 2008

Mathematical morphology

One of most important areas in digital image processing is mathematical morphology.

It consists in max and min filters on the input image, changing the structural element (filter's mask).

Some applications of mathematical morphology are:
  • Filtering of binary images;
  • Objects resize;
  • Enhancement of specific areas.
The next images are showing the results of mathematical morphology:
Image 1: original image.

Image 2: result of original image's dilatation (max filter).

Image 3: result of original image's erosion (min filter).

The GIMP (GNU Image Manipulation Program) does these mathematical morphology operations, as showed.

Before all, I want explain the structural element. It's a sub-set from input image and its form may change depeding on the application.

For example, given a image F(x,y) and a structural element which is a squad with 3 columns and 3 rows. The cited sub-set is Struc{F(x,y)} = {F(x-1,y-1), F(x-1,y), F(x-1,y+1), F(x,y-1), F(x,y), F(x,y+1), F(x+1,y-1), F(x+1,y), F(x+1,y+1)}. The structural element defines the neighborhood for each point (x,y) on the image.

The most common forms are:
  • Squad;
  • Circle;
  • Cross;
  • Dash (diagonal, vertical or horizontal);
  • Diamond.
The max and min filters are used in dilation and erosion, respectively. But they may be used in sequence with equals or diferents structural elements, proving the opening and closing operations.

Nenhum comentário: