Help for BOXFLT2

PURPOSE:
BOXFLT2 applies a low-pass filter to an input image by taking the local
mean of all pixels contained within a prescribed window centered at
each pixel of the input image.  This mean then replaces the input value.
A highpass option is available which replaces each input value with the
difference between the input and the local mean, plus a constant DC-level
offset.

EXECUTION:

Examples
	BOXFLT2  INP  OUT  NLW=21  NSW=451

	This example performs a lowpass filter of size 451 samples by 21
	lines on the input. Reflection is performed at image boundaries.

	BOXFLT2  INP  OUT  NLW=101  NSW=1  'HIGHPASS  DCLEVEL=90  'CYCLE

	This examples performs a highpass filter of size 101 lines by 1
	sample with an output DCLEVEL of 90, performing cycling at the
	image boundaries.  (The omitted keywords are FILTER and EDGE,
	respectively.)

Modes of handling boundaries:
		a = pixel (1,1)		b = pixel (1,NS)
		c = pixel (NL,1)	d = pixel (NL,NS)

	+-------+-------+-------+	+-------+-------+------- 	| d   c | c   d | d   c |	| a   b | a   b | a   b |
	|       |       |       |	|       |       |       |
	| b   a | a   b | b   a |	| c   d | c   d | c   d |
	|-------|-------|-------|	|-------|-------|-------|
	| b   a | a   b | b   a |	| a   b | a   b | a   b |
	|       |       |       |	|       |       |       |
	| d   c | c   d | d   c |	| c   d | c   d | c   d |
	|-------|-------|-------|	|-------|-------|-------|
	| d   c | c   d | d   c |	| a   b | a   b | a   b |
	|       |       |       |	|       |       |       |
	| b   a | a   b | b   a |	| c   d | c   d | c   d |
	+-------+-------+-------+	+-------+-------+------- 		REFLECTING			 CYCLING

	+-------+-------+------- 	| a   a | a   b | b   b |
	|       |       |       |
	| a   a | a   b | b   b |
	|-------|-------|-------|
	| a   a | a   b | b   b |
	|       |       |       |
	| c   c | c   d | d   d |
	|-------|-------|-------|
	| c   c | c   d | d   d |
	|       |       |       |
	| c   c | c   d | d   d |
	+-------+-------+------- 		EXTENDING
OPERATION:
BOXFLT2 performs a lowpass filter operation by taking the local mean of
all pixels contained within a prescribed window of NLW by NSW dimensions
centered at each pixel of the input image.  This mean then replaces the 
input value.  If the HIGHPASS option is specified, then the difference
between the input and the local mean plus a constant DC-level offset
replaces the input value. 

BOXFLT2 provides the user with the choice of using "reflection", "cycling"
(wrap-around), or "extending" (repeat the edge pixel) at image boundaries.
In the default case, image reflection is used, and may be depicted as above
in the EXECUTION section.  If cycling is desired, where the left boundary of
the image is equivalent to the right boundary, and the upper boundary is
equivalent to the lower boundary.

WRITTEN BY:  W. D. Benton, 1 June 1976
COGNIZANT PROGRAMMER:  Ron Alley
REVISION:  Version 2.1  April 4, 2003

PARAMETERS:


INP

Input dataset

OUT

Output dataset

SIZE

Standard VICAR size field

SL

Starting line

SS

Starting sample

NS

Number of lines

NL

Number of samples

NSW

Filter width in pixels

NLW

Filter length in pixels

FILTER

Selects type of filtering Valid: LOWPASS, HIGHPASS

DCLEVEL

Highpass constant

EDGE

Method of handling edges REFLECT, EXTEND, CYCLE, LCYCLE, SCYCLE

See Examples:


Cognizant Programmer: