ANSI-C program: multi_stat.c
NAME
Sort MLI image values in a stack and support selection of output
image based on average, rank, or percentile
SYNOPSIS
multi_stat <im_list> <width> <im_out>
<mode> <rank> [nmin]
<im_list> | (input) text file with names of co-registered float format images including path |
<width> | number of samples/line |
<im_out> | (output) output filtered image (float) |
<mode> | data selection mode: 0: average 1: median 2: rank relative to minimum, rank=1 for minimum 3: rank relative to maximum, rank=1 for maximum 4: percentile, 0 (minimum) --> 100 (maximum) |
<rank> |
rank value in modes 2 and 3, percentile in mode 4
(0-->100), ignored for average or median |
[nmin] |
minimum number of valid
image values required to sort (default: nfiles/2) |
EXAMPLE
multi_stat lost_hills.tab 600 lh.ave 0
For the files listed in lost_hills.tab, calculate the temporal average and write the output to lh.ave
multi_stat lost_hills.tab 600 lh.median 1
For the files listed in lost_hills.tab, use a temporal median filter and write the output to lh.median
multi_stat lost_hills.tab 600 lh.rank12 2 12
of the files listed in lost_hills.tab, rank the values
at each location for all the images in the stack. Select the 12th
largest value
DESCRIPTION
multi_stat is a temporal
filter for all the images listed in an input table called the
im_list. Each line of
the im_list is name of an float format image file. All the images
in the stack listed in the im_list have the same image width as
specified by the width
command-line parameter. The mode parameter used to specify
the type of filter according to the value:
data selection mode:
0: average
1: median
2: rank relative to minimum, rank=1 for minimum
3: rank relative to maximum, rank=1 for maximum
4: percentile, 0 (minimum) --> 100 (maximum)
The rank parameter is
used to specify the desired rank of the output pixel if the
modeis set to 2 or
3. If the input file has a value of 0.0 for a pixel, it is
not considered in the value ranking or in calculating an average.
In mode 2 the rank is relative to the minimum, hence rank = 1 is
the smallest. In mode 3 the rank is relative to the largest,
hence 1 is the largest of the set.if the number of available
image values at one point is less than the specified rank number,
depending on the mode, either the miximum of minimum value is
written to the outpu file.
In the case of mode 4 the rank is determined by the percentile
value that lies in the range 0 to 100. In this mode, the rank for
each pixel to select is based on the number of samples available
for that particular location in the image. The rank is given
by
rank = nearest_int(pcnt/100.*(N-1)) +
1,
where N is the number of valid image values for that point in
the scene.
The user can specify that minimum number of valid images required to perform the ranking or average operation for points in the images. Median filtering an an image stack is robust in the presense of non-gaussian noise statistics.
SEE ALSO
temp_filt