MAXFILT

Purpose:

Performs 2D maximum filtering on an image matrix.

Syntax:

MAXFILT(image, ksize)

image

-

Any image table or expression evaluating to a table.

ksize

-

Optional. An integer. Kernel size, must be odd. Defaults to 3.

Returns:

An array the filtered image.

Example:

W1: density(ravel(readb("baboon.dat", ubyte), 128));gray

W2: maxfilt(w1)

 

W1 reads and shapes a 128x256 raw binary image. W2 contains the 3x3 maximum filtered output.

Example:

W1: readimage(gethome + "data\mandrill.bmp")

W2: maxfilt(w1, 5)

 

W1 reads a 250x240 bitmap image.  The result is a 24 bit RGB image. W2 contains the 5x5 maximum filtered output.

Remarks:

For 24 bit RGB images, MAXFILT automatically performs filtering on each R, G, B component.

 

If the filter kernel is even, the size is incremented to make it odd.

See Also:

CONV2D

IMINTERP

MEDFILT

MINFILT

NONLIN2D

SOBEL