IRAF help page for package images, program mode

from NOAO mode -- modal filter a set of imagesUSAGEPARAMETERSDESCRIPTIONEXAMPLESTIME REQUIREMENTSBUGSSEE ALSO

mode -- modal filter a set of images


USAGE

mode input output xwindow ywindow


PARAMETERS

input

List of input images.

output

List of filtered images. The number of input images must be the same as the number of output images. If the input image name is the same as the output image name the original image is replaced by the filtered image.

xwindow, ywindow

The size of the modal filter where both xwindow and ywindow are odd integers. If either x window or ywindow are even they will be rounded up to the nearest odd integer. The filter kernel must be less than 65 * 65 pixels in length.

boundary = nearest

The type of boundary extension. The options are:

nearest

Use the value of the nearest boundary pixel.

constant

Use a constant value.

reflect

Reflect pixel values around the boundary.

wrap

Wrap pixel values around the boundary.

constant = 0.

The value for constant value boundary extension.


DESCRIPTION

MODE takes a set of IRAF images input and produces a set of filtered images output. The modal filter consists of a sliding rectangular window of dimensions xwindow by ywindow in which the center pixel of the window is replaced by the mode of all the pixels in the window where the mode of a sequence of numbers is defined as follows.

		mode = 3. * median - 2. * mean

Out of bounds pixel references are handled by setting the parameter boundary.


EXAMPLES

1. Modal filter an image using a 5 by 5 window and nearest pixel boundary extension.

cl> mode m74 m74.5by5 5 5

2. Modal filter an image using a 3 by 3 window and constant boundary extension.

cl> mode m74 m74.5by5 3 3 boun=const const=0.


TIME REQUIREMENTS

Mode requires approximately 330 and 600 cpu seconds to filter a 512 by 512 real image using a 5 by 5 and 7 by 7 filter window respectively (Vax 11/750 fpa).


BUGS

The filter kernel has been restricted to 65 by 65 pixels. This permits the use of static arrays and improves the running time of the program by approximately 30%.

The sort routine for the smaller kernels has been optimized. It may be desirable to optimize higher order kernels in future.

The IRAF task FMODE is significantly more efficient than MODE and should be used if the data can be quantized.


SEE ALSO

fmode,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu