Name

fbscanplot — plot the intensities of a framebuffer scanline

Synopsis

fbscanplot [-H ] [-v ] [-o ] [-c ] [-r ] [-W scr_width] [-F outframebuffer] yline

DESCRIPTION

fbscanplot will plot the red, green, and blue, pixel intensities of a selected scanline of a framebuffer. The line to be plotted has a first quadrant y coordinate of yline, i.e. a value of zero indicates the bottom line of the display. The environment variable FB_FILE is used to select the input display device (see brlcad(1)). If this variable is not set, the default device for your system will be used. The output will appear on this same device unless a -F outframebuffer flag is given to redirect the output.

If no size is specified, the selected device(s) will be opened at its/their default size (usually the full screen). The flag -W scr_width can be used to set a screen width (scanline length) other than this default. The -H flag is a shorthand for a size of 1024x1024.

Either the bottom 256 or top 256 scanlines will be used to output the plot; whichever will not cover the selected line. A black background is drawn with horizontal grey lines at intervals of 16 and 64 scanlines in order to provide a scale. The intensities of the selected line are then plotted, the bottom of the graph being intensity zero; the top 255.

The -o flag will plot the scanline in overlay mode. With this flag, no background or grid lines are drawn, and the output always appears in the bottom 256 scanlines of the display. Using this option, more of the image will remain visible, and multiple scanlines can be plotted on top of each other for comparison. The image may make the plot harder to see, however.

If the -r flag is given, a reverse image of the selected scanline is drawn, i.e. the intensities from 0->255 become 255->0. This is simply to highlight the line selected. The plot will still be of the non-reversed values.

The -v flag causes the pixel values to be output to the terminal as well as displayed.

The -c flag causes the current colormap of the framebuffer to be applied to the pixel values ("crunched") before plotting them. This allows the effects of the color map to be readily viewed.

EXAMPLES

fbscanplot -r 37 will plot the intensities of the scanline 37 up from the bottom. This line will be highlighted by replacing it with its negative. The output will appear in the top 256 scanlines so as not to cover the selected line.

fbscanplot -v -W512 -o `fbpoint -y` > scan.out will use fbpoint to select a y scanline, then plot 512 pixel values in overlay mode. These values will also be saved in the file scan.out for closer examination.

A handy C-shell alias is:

alias fbsp 'fbscanplot -r `fbpoint -y`'

SEE ALSO

brlcad(1), fbgrid(1), fbzoom(1)

AUTHOR

BRL-CAD Team

COPYRIGHT

This software is Copyright (c) 1989-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>.