ANSI-C program: frame.c
NAME
frame - generates a frame with specified widtharound data. This
frame position may either be specified or be added to the
existing image contour.
SYNOPSIS
frame <data_in> <data_out> <width>
<format_flag> <dx1> <dx2> <dy1>
<dy2> [nflag] [null_value] [frame_value]
<data_in> | input data file |
<data_out> | output data file |
<width> | line width (samples/row) |
<format_flag> | input/output data format flag 0: float (REAL*4), 1: fcomplex, 2: int (INTEGER*4), 3: short (INTEGER*2), 4: unsigned char, 5: SUN raster or BMP format image (8, or 24 bit). |
<dx1> | left side frame width (pixels) |
<dx2> | right side frame width (pixels) |
<dy1> | top side frame width (lines) |
<dy2> | bottom side frame width (lines) |
[nflag] | flag indicating if already existing NULL values should be added to frame width (default: 0=no, 1=yes) |
[null_value] | NULL value (of input data, default = 0.0); for fcomplex two values, and for SUN raster or BMP format images, 3 values should be provided. |
[frame_value] | Value to use for frame (default = 0.0), for fcomplex two values, and for SUN raster or BMP format images, 3 values should be provided. |
EXAMPLE
frame 1352_1610.pwr1 1352_1610.pwr1_frame 2500 0 16 16 24
24 0 0.0 0.0
frame 1352_1610.rgb.ras 1352_1610.rgb.ras_frame 2500 5 4 4 6 6 1 0 0 0 255 255 255
In the second example already existing black border plus the specified additional pixels are set to white.
INSTALLATION
Source code frame.c in ./src. For compilation adjust and use
Makefile: Executable version frame in ../bin
AVAILABILITY
Uses display programs definition file display.h, SUN raster file definition file
rasterfile.h, and BMP format
definition file, bmp_image.h
DESCRIPTION
Frame allows to set the values around the borders on the four
sides of an image data set to a NULL value. This is of interest
in cases where the data along the edges are not well defined, for
example,as a consequence of filtering etc. Frame allows to remove
unwanted data along the image borders after processing . Borders
can either be defined by a fixed width, or as the width with NULL
values plus a fixed width. The second option is useful in the
case of geocoded data (with non-vertical/horizontal data
bounds).
The program can be applied to images with the following data formats:
ID Number | Format |
0 | float (REAL*4) |
1 | fcomplex (pairs of REAL*4) |
2 | int (INTEGER*4) |
3 | short (INTEGER*2) |
4 | unsigned char (8-bit) |
5 | SUN raster or BMP format image files (8 or 24 bit depth) |
In the case of fcomplex, SUN raster, or BMP format images, where pixels are characterized by 2 and 3 values, respectively, only one of the values has to be equal to the NULL value in order to interpret the value as NULL This excludes data where one of the channels has no data.
OPTIONS
The frame width can be individually selected for each side of the
image.
The value assigned as NULL value (used for the frame) can be defined by the user. In the case of SUN raster or BMP format iamges, the border can be set to white (255 255 255), instead of black (0 0 0).
SEE ALSO
LAT_file_formats, display.h, rasterfile.h, bmp_image.h .
DIAGNOSTICS
All messages are generally self-explanatory.
NOTES
none.
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2000.
UW, CW, last change 24-Jan-2000.