User's Guide

LOWCAL

Performs selected local sliding-window operations on an image

Function:

LOWCAL performs a selected sliding-window local operation on an input image. The following operations are supported with the use of the TAE subcommand feature:

     -MEAN:     Mean window
     -STDEV:    Standard deviation window
     -VARIANCE: Variance window
     -QUANT:    Quantized mode window
     -MINIMUM:  Minimum window
     -MAXIMUM:  Maximum window
     -MEDIAN:   Median window
     -MABS:     Median absolute-deviation window
     -SHARP:    Sharp window
     -KNN:      K nearest-neighbor average
     -SELECT:   Selective average
     -MSUB:     Mean subtraction window
     -CONV:     Separable convolution

Each of the available operations may be iterated a number of times as specified by the user. The output image has the same dimensions as the input image.

Parameters:

Subcommand -MEAN:
Mean window: The pixel value of the center pixel of the window is replaced by the mean of the pixel values of all pixels within the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -STDEV:
Standard deviation window: The pixel value of the center pixel of the window is replaced by the standard deviation of the pixel values of all pixels within the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(R*4)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -VARIANCE:
Variance window: The pixel value of the center pixel of the window is replaced by the variance of the pixel values of all pixels within the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(R*4)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -QUANT:
Quantized mode window: The pixel value of the center pixel of the window is replaced by the statistical mode of all pixels in the window including the center window, provided that the bin occupancy for the mode pixel value is greater than or equal to the threshold value MINVAL. If the mode does not pass the threshold test, or if there is no unique single mode, then the pixel value of the center pixel is replaced by the center pixel value of its bin. Pixel value quantization is used to reduce the number of histogram bins from one per pixel value to a user-specified number, NBINS.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4

NBINS(0)
Number of bins. Number of bins in which to accumulate values. Pixel value quantization is used to reduce the number of histogram bins from one per pixel value to a user-specified number, NBINS. NBINS must be specified nonnegative and at most 256. If NBINS = 0 (the default) is specified, then NBINS is set equal to KERNDIM(1)*KERNDIM(2).

MINVAL(0)
Minimum bin occupancy required for mode values. The value of the center pixel is replaced by the mode of all pixels in the window, including the center pixel, provided that the mode is greater than or equal to MINVAL. MINVAL must be specified non-negative and at most KERNDIM(1)*KERNDIM(2). If MINVAL = 0 (the default) is specified, then MINVAL is set equal to the closest integer to the square root of KERNDIM(1)*KERNDIM(2).
Subcommand -MINIMUM:
Minimum window: The pixel value of the center pixel of the window is replaced by the minimum of the pixel values of all pixels in the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -MAXIMUM:
Maximum window: The pixel value of the center pixel of the window is replaced by the maximum of the pixel values of all pixels in the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -MEDIAN:
Median window: The pixel value of the center pixel of the window is replaced by the median of the pixel values of all pixels in the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -MABS:
Median absolute deviation window: The pixel value of the center pixel of the window is replaced by the median absolute deviation (MAD) of the pixel values of all pixels in the window, including the center pixel. The median for the window is first computed. Then the absolute difference between this median and the pixel value of each pixel in the window is found. The median of all these absolute differences is then the MAD.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -SHARP:
Sharp window: The pixel value of the center pixel of the window is replaced by whichever of the two extrema values (minimum or maximum) is closer in pixel value to the center pixel. The extrema values are found from among the pixel values of all pixels in the window, including the center pixel.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -KNN:
K nearest neighbor average: The pixel value of the center pixel in the window is replaced by the average of the pixel values of a user-specified number of pixels whose pixel values are closest to that of the center pixel. The center pixel is not considered in the average.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4

NNN(0)
Number of nearest neighbors that are closest in value to that of the center pixel. NNN must be specified non-negative and less than KERNDIM(1)*KERNDIM(2). If NNN = 0 (the default) is specified, then NNN is set equal to the nearest integer to the square root of KERNDIM(1)*KERNDIM(2). Note that for LOWCAL, "nearest neighbor" means nearest in pixel value, not nearest spatially.
Subcommand -SELECT:
Selective average: The pixel values of the center pixel in the window is replaced by the average of the pixel values of all neighbors excluding the center pixel, provided that at least a user-specified number, NNTHR, of neighbors have pixel values values which differ in absolute value from that of the center pixel by an amount greater than or equal to a user-specified threshold value, THRVAL.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4

NNTHR(0)
Number of neighbor pixels which must differ in absolute value from the center pixel by an amount equal to or greater than THRVAL. NNTHR must be specified non-negative and less than KERNDIM(1)*KERNDIM(2). If NNTHR=0 (the default) is specified, then NNTHR is set equal to the nearest integer to the square root of KERNDIM(1)*KERNDIM(2).

THRVAL(0)
Threshold value for selective mean. THRVAL must be non-negative.
Subcommand -MSUB:
Mean subtraction window: The pixel value of the center pixel in the window is replaced by the difference between the pixel values of the center pixel and the mean of the pixel values of all pixels in the window, provided that this difference is nonnegative. If the difference is negative, then the pixel value of the center pixel is set to zero.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(SAME)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4
Subcommand -CONV:
Separable convolution: The pixel value of the center pixel in the window is replaced by the separable convolution of the pixel values of all entries in the window with a user-specified set of weights. The convolution is accomplished in two stages. First, a one-dimensional row convolution is performed using the LINECOEF values against every row in the window. Then a one-dimensional column convolution is performed using the SAMPCOEF values against the single column resulting from the previous convolution.

IN
Input image. Input image on which selected sliding window operations will be performed. Permissible data types are: BYTE, INTEGER*2, INTEGER*4, and REAL*4.

OUT
Output image. The output image will be the same size as the input image. It will contain a border of unprocessed pixels (filled with zeros) because in order for a pixel to be processed, it must be far enough from the edge of the image to be the center of some local window.

KERNDIM(3,3)
Kernel dimensions. Size of the local window. Valid size range is 1 through 15 in each dimension. Both dimensions must be odd numbers. (1,1) is not allowed, because it would result in an output which is identical to the input.

NITER(1)
Number of iterations. Number of times that the local window operation will be applied to the input image. Multiple iterations are handled as follows: For each iteration, the entire image is processed (that is, the local window calculation takes place for all positions of the local window within the image). The subsequent iteration uses the output of the previous iteration as its input, and performs the local window calculation over again for all positions of the local window.

ODTYPE(R*4)
Output data type. Specifying an output data type having a smaller potential range of values than that of the input image may result in data truncation.

  = SAME: Same as input
  = BYTE: BYTE
  = I*2:  INTEGER*2
  = I*4:  INTEGER*4
  = R*4:  REAL*4

LINECOEF
Convolution coefficients to be used on rows. A one-dimensional row convolution is first performed using the LINECOEF values against every row in the window. The number of entries given for LINECOEF must match the value of KERNDIM(2).

SAMPCOEF
Convolution coefficients to be used on columns. The SAMPCOEF values are used to perform a one-dimensional column convolution on the single column resulting from the LINECOEF convolution. The number of SAMPCOEF entries must match the value of KERNDIM(1).

Examples:

  1. LAS> lowcal-mean in="boston.gdf(1,1,256,256:1,2)" out=boston.me-an

    A sliding window of size 3 x 3 is applied to the indicated portion of each of the indicated bands of the input image. Only one iteration is performed. The output consists of two bands and has the same data type as the input. At each successive position of the 3 x 3 sliding window, the value of the center pixel of the window is replaced by the mean of the values of all nine pixels of the window.

  2. LAS> lowcal-quant in=washdc.b1 out=washdc.quant kerndim=(5,5) nbins=10 minval=7

    A sliding window of size 5 x 5 is applied. At each successive position of the window, the pixel value of the center pixel is replaced by the statistical mode of all pixels in the window, provided that the bin occupancy for that bin occupied by the mode pixel value is at least 7. Pixel values are quantized into 10 bins.

  3. LAS> lowcal-knn in=area1.img out=area1.knn niter=3 odtype=4 nnn=4

    A sliding window of size 3 x 3 is applied. At each successive position of the window, the value of the center pixel of the window is replaced by the average of the pixel values of the four other pixels in the win dow whose pixel values are closest to that of the center pixel. This entire process is carried out three times in succession. The output data type is REAL*4.

  4. LAS> lowcal-select in=w015032.b2.p out=w.sm nnthr=4 thrval=5

    A sliding window of size 3 x 3 is applied. At each successive position of the window, the value of the center pixel of the window is replaced by the average pixel value of the eight pixels excluding the center pixel, provided that at least four of these eight pixels have pixel values that differ (in absolute value) from that of the center pixel by at least five.

  5. LAS> lowcal-conv in="an.img(:1-3)" out=an.img.cnv linecoef=(1.5,1,1.5) sampcoef=(0.5,1,0.5)

    A sliding window of size 3 x 3 is applied. At each successive position of the window, the value of the center pixel of the window is replaced by the separable convolution of all entries in the window using the specified weights. For further details, see the Description/Algorithm section.

Description/Algorithm:

Mean Window-The pixel value of the center pixel in the window is replaced by the mean of all pixels within the window, including the center pixel,

                             N                            
                         1                                  
                   M =   -  SUM X                          
                         N       i
                            i=1                               

where N = KERNDIM(1)*KERNDIM(2).

Standard Deviation Window-The pixel value of the center pixel in the window is replaced by the standard deviation of all pixels in the window including the center pixel.

                          N                              
                                    2                   
          sigma =  SQRT [SUM (X - M)  / N - 1]
                               i
                         i=1         

Variance Window-The pixel value of the center pixel in the window is replaced by the variance (sigma**2) of all pixels in the window, including the center pixel.

Quantized Mode Window-The pixel value of the center pixel in the window is replaced by the mode of all pixels in the window, including the center pixel, provided the bin occupancy for the mode pixel value is greater than or equal to a threshold. If the mode does not pass this threshold test, or if there is no unique single mode, then the pixel value of the center pixel is replaced by the center pixel value of its bin. pixel value quantization is used to assign each pixel value to a histogram bin (parameter NBINS). The width of each bin is based on the range of the entire input image or image window divided by NBINS. Each bin is inclusive of the lowest pixel value in its interval, but exclusive of the highest, except for the last bin, which includes values at both ends of its interval.

Minimum Window-The pixel value of the center pixel in the window is replaced by the minimum value of all pixels in the window, including the center pixel.

Maximum Window-The pixel value of the center pixel in the window is replaced by the maximum value of all pixels in the window, including the center pixel.

Median Window-The pixel value of the center pixel in the window is replaced by the median of all pixels in the window, including the center pixel.

Median Absolute Deviation Window-The pixel value of the center pixel in the window is replaced by the median absolute deviation (MAD) of all pixels in the window, including the center pixel. The median in the window is computed first. Then, the absolute difference between this median and each pixel in the window is found. The median of all these absolute differences is the MAD.

MAD = MEDIAN (|Xi-MEDIAN(X)|) for all i=1 to N

Sharp Window-The pixel value of the center pixel in the window is replaced by the pixel value of whichever of the two extreme values (minimum or maximum) is closest in pixel value to the center pixel. The extreme values are found from among all pixels in the window, including the center pixel. If the absolute difference between the center pixel value and the maximum pixel value in the window is equal to the absolute difference between the center pixel value and the minimum pixel value in the window, then the center pixel value will be replaced by the minimum pixel value.

K Nearest Neighbor Average-The pixel value of the center pixel in the window is replaced by the pixel value of the average of a user-specified number of neighbor pixels whose pixel values are closest to that of the center pixel. The center pixel is not considered in the average.

Selective Average-The pixel value of the center pixel in the window is replaced by the average pixel value of all neighbors, excluding the center pixel, provided that at least a user-specified number of neighbors have pixel values that differ (in absolute value) from the center pixel by an amount greater than or equal to a user-specified threshold value.

Mean Subtraction Window-The pixel value of the center pixel in the window is replaced by the difference between the center pixel and the mean pixel value of all pixels in the window (X-M), provided that this difference is nonnegative. If the difference is negative, the center pixel pixel value is set to zero.

Separable Convolution-The pixel value of the center pixel in the window is replaced by the separable convolution of all entries in the window. The convolution is accomplished in two stages. First, a one-dimensional row convolution is performed using the LINECOEF value against every row in the window. Then, a one-dimensional column convolution is performed using the SAMPCOEF value against the resulting column from the previous convolution.

The following description applies to all subcommands:

When more than one iteration is performed, intermediate results from one iteration are placed in a temporary file that then serves as input to the next iteration. Following the last iteration, any temporary files are deleted.

When the sliding window extends beyond the image, the center pixels are unchanged during intermediate iterations and are filled with zeros after the final iteration.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [lowcal-mkimg] Problem in creating temporary image file

    The temporary file cannot be created by the image i/o routines. Make sure that there is enough disk space before trying again.

  2. [lowcal-window] Local window dimensions cannot be 1 by 1

    Window size of 1 by 1 is not allowed because it would result in an output which is identical to the input. Retry with different KERNDIM values.

  3. [lowcal-check] Threshold value exceeds limit

    Threshold value must be at most KERNDIM(1)*KERNDIM(2). Retry with a smaller threshold value.

  4. [lowcal-check] Nearest neighbor value exceeds limit

    The nearest neighbor value must be at most KERNDIM(1)* KERNDIM(2). Retry with a smaller NNN value.

  5. [lowcal-check] Number of neighbors exceeds limit

    The number of neighbors must be at most KERNDIM(1)*KERNDIM(2). Retry with a smaller NNTHR value.

  6. [lowcal-check] Dimension of LINECOEF, must match KERNDIM(1)

    Retry with the appropriate number of convolution coefficients.

  7. [lowcal-check] Dimension of SAMPCOEF, must match KERNDIM(2)

    Retry with the appropriate number of convolution coefficients.

  8. [lowcal-pixels] Image window must be at least as large as the local window in the number of pixels

    Specify larger input image window or smaller local window.

  9. [lowcal-lines] Image window must be at least as large as the local window in the number of lines.

    Specify larger input image window or smaller local window

  10. [lowcal-getin] Cannot access input file names

    Check spelling of the input image file name before retrying.

  11. [lowcal-gettyp] Unreadable ddr or data types of images are different

    Check input image file names and types before retrying.

  12. [lowcal-getout] Cannot open output image file

    Overwriting an existing image is not allowed. Retry with a different output image file name.

User Notes:

  1. The user's disk quota must be sufficient to accommodate any temporary files generated by LOWCAL in addition to the permanent output file.

  2. The mean subtraction window operator has two notable applications: iterative edge operator and local thresholding operator for gradient images.

          o   Iterative edge operator.  Use a small window 
              (typically 5 x 5) on the pixel value input image and 
              perform several iterations (typically two), then 
              threshold the resultant image into binary form.
    
          o   Local edge thresholding operator.  Use a large window 
              (typically 9 x 9) on the gradient input image, perform 
              one iteration, and threshold the result to binary form.