[mmgshow] [Up] [mmlblshow] Visualization

mmdtshow
Display a distance transform image with an iso-line color table.

Synopsis

y = mmdtshow( f, n = 10 )

Implemented in Python.

Input

f Image Gray-scale (uint8 or uint16) image.

Distance transform.

n Boolean

Number of iso-contours.

Default: 10

Output

y Image Gray-scale (uint8 or uint16) or binary image.

Optionally return RGB uint8 image

Description

Displays the distance transform image f (uint8 or uint16) with a special gray-scale color table with n pseudo-color equaly spaced. The final appearance of this display is similar to an iso-contour image display. The infinity value, which is the maximum level allowed in the image, is displayed as black. The image is displayed in the MATLAB figure only if no output parameter is given.

Examples

>>> f=mmreadgray('blob.tif')

              
>>> fd=mmdist(f)

              
>>> mmshow(fd)

              
>>> mmdtshow(fd)

            
fd fd

Source Code

def mmdtshow(f, n=10):
    import adpil
    if (mmisbinary(f)) or (len(f.shape) != 2):
      print 'Error, mmdtshow: works only for grayscale labeled image'
      return
    y=mmgdtshow(f, n)
    adpil.adshow(y)
    return
    return y
    

See also

mmdist Distance transform.
mmgdist Geodesic Distance Transform.
mmlblshow Display a labeled image assigning a random color for each label.
mmshow Display binary or gray-scale images and optionally overlay it with binary images.
[mmgshow] [Up] [mmlblshow] Python