Name

ssamp-bw — convert spectral sample data into a monochrome image

Synopsis

ssamp-bw [-v ] [-s squarefilesize] [-w file_width] [-n file_height] [-l lower_wavelen] [-u upper_wavelen] [-m minval] [-M maxval] file.ssamp

DESCRIPTION

ssamp-bw(1) reads a ssamp(5) format file of spectral samples for the named file, and produces a monochrome image in bw(5) format. The spectral definition is read from a second file named file.ssamp.spect

Using the -l and -u parameters, a filter is constructed to select the energy collected over a portion of the spectrum. This filter is convolved with each pixel of the two-dimensional input file and the power levels are summed into a two-dimensional array of scalor results.

The scalor array is scanned to compute the maximum and minimum power levels encountered in this image. These are used to drive an "automatic gain control" algorithm which maximizes the use of the limited 0..255 intensity output range. Using the -m and -M options, either the minimum or maximum values (or both) may be over-ridden from the command line. This is particularly useful when processing a series of ssamp files (e.g. for an animation sequence) and you don't want the gain control settings changing from frame to frame.

The -v option sets "verbose" mode, causing the spectral sampling definition and the filter kernel to be printed on standard error.

EXAMPLE

ssamp-bw -s512 -M0.3 -l3000 -u5000 moss.ssamp | bw-fb -s512

This converts the energy received in the 3-5 micron ("mid-IR") band into a monochrome image, clamping any power greater than 0.3 to a value of 255 in the output, and displays this monochrome image on the current framebuffer.

SEE ALSO

rttherm(1), bw-fb(1), dpix-pix(1), pix(5)

DIAGNOSTICS

If the pix file is shorter than expected, or the size parameters are given incorrectly, an error is printed.

If the spectral range specified for the filter is outside the spectral range sampled in the input file, the program aborts with an error.

AUTHOR

BRL-CAD Team

COPYRIGHT

This software is Copyright (c) 2000-2016 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>.