Differences between revisions 11 and 12
Revision 11 as of 2008-03-20 20:23:35
Size: 1340
Editor: penczek
Comment:
Revision 12 as of 2008-03-28 19:41:47
Size: 1398
Editor: penczek
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
output = dilation(input, mask, "morph_type") output = dilation(input, mask, morphtype = "morph_type")
Line 9: Line 9:
    mask:: The second input image used as the mask.     mask:: The second input image used as the mask (default: image of size 3^n filled with ones).

Name

dilation - Calculate the dilated image (for both binary and graylevel image).

Usage

output = dilation(input, mask, morphtype = "morph_type")

Input

input
The first input image
mask
The second input image used as the mask (default: image of size 3^n filled with ones).
  • The size of the mask has to be odd so that the center of mask can be well defined.
  • The size of the mask should be smaller than the size of the first input image.
morph_type
Type of the dilation
  • BINARY is for binary dilation;
  • GRAYLEVEL is for graylevel dilation.

Output

output
dilated image

Method

  1. For dilation binary, the output image is defined as the Minkowski addition of the two input images $A\oplusB={t\inZ^2; t=a+b, a\inA, b\inB}$
  2. For dilation graylevel, the output image is defined as $A\oplusB=\max[A(x+i,y+j)+B(i,j)]$

Reference

H. R. Myler and A. R. Weeks, "The Pocket Handbook of Image Processing Algorithms in C," Prentice Hall: Upper Saddle River, New Jersey, 1993.

Author / Maintainer

Pawel A. Penczek

Keywords

category 1
MORPHOLOGY
category 2
SPATIAL, NONLINEAR

Files

morphology.py

See also

Maturity

stable
works for most people, has been tested; test cases/examples available.

Bugs

None. It is perfect.

dilation (last edited 2013-07-01 13:12:49 by localhost)