next up previous contents
Next: Histograms Up: Image processing Previous: Creating an image mosaic

Basic filtering and thresholding

    

filter Perform a median and average filtering for an image
-in <image> image to be filtered
-out <image> output image
-avg average filtering
-med median filtering
[-rad <n>] radius (in pixels) of the filtering mask (default 1)

This command performs a median and/or average filtering for the image.

threshold Convert a grayscale picture into black and white
-in <image> input image
-out <image> resulting image
-val <n> limit as integer (signed)
[-corr] use correlation method for thresholding

This command converts a grayscale picture into black and white using the value specified with flag -val as a dividing gray level. A negative value switches white and black color use and the absolute value is used in thresholding. If the correlation algorithm is used, then flag -val should be omitted.

balance Calculate the average value of matrix points and balance them
-in <matrix> a two-dimensional input matrix
-out <matrix> output matrix

This command calculates the average value of matrix points and changes all values in such a manner that the average value becomes zero.

negative Convert grayscale image into negative
-in <image> input image
-out <image> output image

This command inverts the specified image into a negative.

Example (ex6.2):

NDA> load fz_sets.dat 
NDA> loadimg i003.gif ball
# Histogramming and filtering
NDA> photohisto pict1
NDA> filter -in pict1 -out pict1avg -avg -rad 2
NDA> threshold -in pict1 -out pict1thresh -corr
NDA> histoeq -in pict1 -out pict1heq
# Convert images into matrix form
NDA> convmatrix -in pict1 -out pict1matr
NDA> balance -in pict1matr.real -out pict1matrbal.real
NDA> convmatrix -in pict1avg -out pict1avgmatr
NDA> convmatrix -in pict1heq -out pict1heqmatr
...


next up previous contents
Next: Histograms Up: Image processing Previous: Creating an image mosaic

Anssi Lensu
Thu May 17 15:00:44 EET DST 2001