Help for SIMPLIFY
PURPOSE:
SIMPLIFY is a VICAR applications program used to remove high frequency
information (noise) components from digital images. It is usually used
to remove visually distracting detail from classified or stratified images
such as images derived from the operation of VICAR program FASTCLAS. Such
images usually are composed of a number of regions, where each pixel in a
region has the same DN except possibly for some isolated noise pixels.
SIMPLIFY changes the DNs of these isolated noise pixels to match the DN of
the surrounding pixels and writes the resulting image to an output file.
EXECUTION:
The DNs for the regions in the input image are assumed to lie in the range
from 1 to some upper limit specified by the user through the NCLASS parameter.
No assumptions are made on the DNs of noise pixels. Pixels with a DN of 0
are considered to be unclassified (not associated with any region).
In order to determine which DNs to change, SIMPLIFY applies a test to each
pixel in the input image. The test involves finding the most frequently
occurring DN in a square window centered around the pixel being tested.
The exact form of the test depends on the various parameters specified by the
user, but in order to provide an overview, the test for the case where neither
the REPLACE nor the VALUE option is used is described below. Much of the
description also applies to when REPLACE or VALUE is used. (See under
REPLACE and VALUE.)
For the sake of determining the most frequently occurring DN, only DNs from 1
to the value of the NCLASS parameter are considered. In case of a tie in
determining the most frequent DN, the lowest of the DNs in the tie is used.
Since the window is centered around the pixel being tested, we will refer to
the pixel being tested as the center pixel and will refer to its DN as the
center DN. When the center DN is nonzero it is changed to the most frequent DN
if the most frequent DN occurs more times than the center DN and the number of
times the most frequent DN occurs is greater than or equal to the threshold
(THRESHLD) parameter. (This insures that a nonzero DN is not changed if no DN
occurs a substantial number of times in the window or if the center DN occurs
just as many times as the most frequent DN.) When the center DN is zero it is
changed to the most frequent DN if the number of times the most frequent DN
occurs is greater than or equal to the threshold parameter. When a DN is
changed, the change is not included in the subsequent windows.
TAE COMMAND LINE FORMAT
The following command line formats show the major allowable forms:
SIMPLIFY INP=a OUT=b SIZE=(sl,ss,nl,ns) optional parameters
SIMPLIFY INP=a OUT=b SL=sl SS=ss NL=nl NS=ns optional parameters
SIMPLIFY a b (sl,ss,nl,ns) optional parameters
SIMPLIFY a b optional parameters
Here 'a' represents the input image file name, and
'b' represents the output image file name.
EXAMPLE
SIMPLIFY INP=A OUT=B NCLASS=9 THRESHLD=8 WINDOW=5 'REPLACE
In this example a five by five window is used. The most frequent DN
must occur at least 8 out of 25 times in a window to be used to replace
a center DN. Unclassified pixels will be replaced where possible.
RESTRICTIONS
1. The input and output images must be byte data.
OPERATION:
The operation of SIMPLIFY is similar to the operation of any box-filtering
routine with the exception that surface smoothing DOES NOT take place. In a
pictorial sense, a window is passed over each pixel in the input image. For
each pixel and its surrounding neighborhood, defined by the size of the window,
a histogram is accumulated to identify the most most frequently occurring DN
value. When the center DN is nonzero it is changed to the most frequent DN
if the most frequent DN occurs more times than the center DN and the number of
times the most frequent DN occurs is greater than or equal to the threshold
parameter. When the center DN is zero it is changed to the most frequent
DN if the number of times the most frequent DN occurs is greater than or
equal to the threshold parameter.
In order to accommodate the edges of the image which normally could not be
simplified due to edge overlap of the window, the pixels outside the image
are considered unclassified (DN=0). This action eliminates the need for
special edge processing feature.
The following window operations will demonstrate the operation of SIMPLIFY
on various windows.
Example 1: specifying THRESHLD=4
5 5 5 5 5 5
INPUT: 3 2 5 OUTPUT: 3 5 5
4 3 3 4 3 3
Example 2: specifying THRESHLD=4
5 5 5
INPUT: 3 2 2 OUTPUT: no change
2 2 2
Example 3: specifying THRESHLD=4 and REPLACE
0 0 0 0 0 0
INPUT: 0 0 0 OUTPUT: 0 2 0
2 2 1 2 2 1
WRITTEN BY: Steve Pohorsky 1 Dec 1983
COGNIZANT PROGRAMMER: A. L. Zobrist 14 Sept. 1984
REVISION: 2 21 Feb 1982
PARAMETERS:
INP
Input file name
OUT
Output file name
SIZE
Standard Vicar size field:
(SL,SS,NL,NS)
You can enter SL,SS,NL,
and NS together as SIZE, OR
enter the SL,SS,NL, and NS
parameters separately.
By default, the entire input
image is used if these
parameters are not entered.
SL
Starting line number
SS
Starting sample number
NL
Number of lines
NS
Number of samples
NCLASS
Largest DN other than noise
THRESHLD
Threshold for number of
occurrences of most frequent
DN in window.
WINDOW
Window size
REPLACE
Enter to replace
unclassified pixels where
possible.
VALUE
DN value when only one value
is to be checked for replacement.
See Examples:
Cognizant Programmer: