vstats(1)

PROGRAM
vstats - vstats computes statistics of an input xviff image.

SYNTAX

vstats

-i  input image

[-m]
    statistics operation masking image

[-f]
    output ASCII file

[-o]
    VIFF format output file

[-all]
    if yes, all stats saved

[-mu]
    if yes, mean is a band of output

[-var]
    if yes, variance is a band of output

[-sd]
    if yes, std deviation is a band of output

[-rms]
    if yes, rms is a band of output

[-vmax]
    if yes, maximum value is a band of output

[-xmax]
    if yes, x coord of max value is a band of output

[-ymax]
    if yes, y coord of max value is a band of output

[-vmin]
    if yes, minimum value is a band of output

[-xmin]
    if yes, x coord of min value is a band of output

[-ymin]
    if yes, y coord of min value is a band of output

[-in]
    if yes, integral value is a band of output

[-pin]
    if yes, pos part of integral is a band of output

[-nin]
    if yes, neg part of integral is a band of output

[-pts]
    if yes, num contributing pts is a band of output

[-ppts]
    if yes, num positive pts is a band of output

[-npts]
    if yes, num negative pts is a band of output

[-sk]
    if yes, skewness is a band of output

[-kur]
    if yes, kurtosis is a band of output

[-ent]
    if yes, entropy is a band of output

[-con]
    if yes, contrast is a band of output

[-b]
    if yes, Compute each data band statistics separately

[-V]
    Gives the version for vstats

[-U]
    Gives the usage for vstats

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vstats.ans or file1

[-a [file1]]
    Uses vstats.ans or file1 as the answer file

DESCRIPTION
vstats computes the mean, variance, standard deviation, RMS level, peaks with locations, integral, skew, kurtosis, entropy, and contrast for an input xviff image. Descriptions of how these statistics are calculated are given in the lvstats man page.

Masking Image
    A masking image can be specified (-m option) which will allow specified pixels of the imput image to NOT be included in the statistics calculations. The Statistics will be calculated by using only those pixel values which have a corresponding mask value not equal to zero.

Output ASCII File
    The ASCII output device or file is specified after the -f option, a filename of # will send the output to stderr.

VIFF Output File
    If the -o, VIFF output file, option is selected, the user must specify a file name and at least one statistic to be recorded in the file. Each statistic will be stored as a band of the output image. For example if the -mu and -var statistics options are selected, band 0 will contain the mean values of each band of the input image and band 1 will contain the variance values. The vector corresponding to x=0, y=0 is the statisitcal vector of the first band of the input image, vector x=1, y=0 is the statistical vector of the second band, etc.

    All of the calculated statistics can be stored in the VIFF output file by setting the -all flag to 1. If any other statistics flag is TRUE though, the all flag is overridden and only those statistics specified are stored in the output VIFF file. (-all defaults to TRUE, all other statistic flags default to FALSE)

Compute Each Data Band Separately?
    If the -b option is set to 1 (the default), statistics for each band will be computed and printed separately. If the -b option is set to 0, then statistics will be computed for all bands combined. In other words, vstats will treat a multiband image as single band image with the same number of columns and rows = rows*num_bands. Each subsequent band of the image is "appended" to the bottom of the image band prior to it, and minimum/maximum position information will reflect this convention.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image

OPTIONAL ARGUMENTS

-m  type: infile
    desc: statistics operation masking image

-f  type: outfile
    desc: output ASCII file

-o  type: outfile
    desc: VIFF format output file

-all
    type: boolean
    desc: if yes, all stats saved
    default: true

-mu type: boolean
    desc: if yes, mean is a band of output
    default: false

-var
    type: boolean
    desc: if yes, variance is a band of output
    default: false

-sd type: boolean
    desc: if yes, std deviation is a band of output
    default: false

-rms
    type: boolean
    desc: if yes, rms is a band of output
    default: false

-vmax
    type: boolean
    desc: if yes, maximum value is a band of output
    default: false

-xmax
    type: boolean
    desc: if yes, x coord of max value is a band of output
    default: false

-ymax
    type: boolean
    desc: if yes, y coord of max value is a band of output
    default: false

-vmin
    type: boolean
    desc: if yes, minimum value is a band of output
    default: false

-xmin
    type: boolean
    desc: if yes, x coord of min value is a band of output
    default: false

-ymin
    type: boolean
    desc: if yes, y coord of min value is a band of output
    default: false

-in type: boolean
    desc: if yes, integral value is a band of output
    default: false

-pin
    type: boolean
    desc: if yes, pos part of integral is a band of output
    default: false

-nin
    type: boolean
    desc: if yes, neg part of integral is a band of output
    default: false

-pts
    type: boolean
    desc: if yes, num contributing pts is a band of output
    default: false

-ppts
    type: boolean
    desc: if yes, num positive pts is a band of output
    default: false

-npts
    type: boolean
    desc: if yes, num negative pts is a band of output
    default: false

-sk type: boolean
    desc: if yes, skewness is a band of output
    default: false

-kur
    type: boolean
    desc: if yes, kurtosis is a band of output
    default: false

-ent
    type: boolean
    desc: if yes, entropy is a band of output
    default: false

-con
    type: boolean
    desc: if yes, contrast is a band of output
    default: false

-b  type: boolean
    desc: if yes, Compute each data band statistics separately
    default: true

EXAMPLES
vstats -i image.xv -f ascii -o stat.xv -all 1

Will create an ascii stat file and a VIFF stat file. The VIFF stat file will contain all 20 statistic parameters and will therefore be 20 bands, one for each stat. Since the -b option is not specified, vstats defaults to calculating statistical information for each band separately.

vstats -i image.xv -f ascii -o stat.xv -var 1 -sd 1

Will create an ascii stat file and a VIFF stat file. The VIFF stat file will contain 2 statistic parameters and will therefore be 2 bands, one for variance and one for standard deviation. Since the -b option is not specified, vstats defaults to calculating statistical information for each band separately.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvstats(3)

RESTRICTIONS
vstats cannot work on VFF_TYP_BIT.

If the -o (output VIFF file) option is specified, at least one statistic must be specified to be put in the output file.

If -all is true for the output VIFF file, but any other of the statistics flags is set, the -all flag is ignored.

Entropy and contrast are calculated only on VFF_TYP_BYTE files. For all other valid data types, entropy and contrast values are not computed and 0.0 is returned.

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.