Function iahmax

namespace:morph
page:iahmax

Synopse

Remove peaks with contrast less than h.

  • y = iahmax(f, h=1, Bc=iasecross())
    • y: Image
    • f: Image
    • h: Double Contrast parameter.
    • Bc: Structuring Element Structuring element ( connectivity).

Description

iahmax inf-reconstructs the gray-scale image f from the marker created by the subtraction of the positive integer value h from f, using connectivity Bc. This operator removes connected peaks with contrast less than h.

Examples

Example 1

1. from ia870 import iahmax
2. from ia870 import iasebox
3. 
4. a = array([
5.     [4,   3,   6,  1,  3,  5,  2],
6.     [2,   9,   6,  1,  6,  7,  3],
7.     [8,   9,   3,  2,  4,  9,  4],
8.     [3,   1,   2,  1,  2,  4,  2]],uint8)
9. print iahmax(a,2)
[[3 3 6 1 3 5 2]
 [2 7 6 1 6 7 3]
 [7 7 3 2 4 7 4]
 [3 1 2 1 2 4 2]]

Example 2

1. from ia870 import iaregmax
2. 
3. 
4. f = mmreadgray('r4x2_256.tif')
5. adshow(f)
6. fb = iahmax(f,50)
7. adshow(fb)
8. adshow( iaregmax(fb))

Equation