Gamma DISP: Reference Manual


ras24_float

ANSI-C program: ras24_float.c

NAME
ras24_float - Converts three real valued input data files (float) to one (24-bit) output SUN raster or BMP format image using user specified scaling and color models.

SYNOPSIS
ras24_float <f1> <f2> <f3> <width> <rasf> [color_model] [h0] [hrange] [imin] [imax] [sat_min] [sat_max] [sc1] [A1] [B1] [cyclic1] [sc2] [A2] [B2] [sc3] [A3] [B3] [start_f1] [start_f2] [start_f3] [nlines] [pixavr] [pixavaz] [LR]
 

<f1> input file 1 (float, red,hue, enter - if not available)
<f2> input file 2 (float, green,brightness, enter - if not available)
<f3> input file 3 (float, blue,saturation, enter - if not available)
<width> samples per row of f1 and f2
<rasf> (output) 24-bit rasterfile (*.ras: SUN raster format, *.bmp: BMP format)
[color_model] color model selection flag: (default=1)
0: RGB color model
1: HLS (double hexagon color model)
2: HSV (single hexagon color model)
[h0] starting hue (color for starting value, default=0.0)
[hrange] range of hue values in degrees (-360. ... 360., default=360.)
[imin] minimum brightness value (0.0 ... 1.0, default=0.15)
[imax] maximum brightness value (0.0 ... 1.0, default=0.85)
[sat_min] minimum color saturation value (0.0 ... 1.0, default=0.0)
[sat_max] maximum color saturation value (0.0 ... 1.0, default=1.0)
[sc1] Scaling model flag (default=0: lin, 1: log, 2: power-law)
[A1] Scaling parameter A (minimum or scale; default=0.0)
[B1] Scaling parameter B (maximum or exponent; default=6.2832)
[cyclic1] Cyclic scaling model (default=1; 0: no 1: yes)
[sc2] Scaling model flag (default=2: lin, 1: log, 2: power-law)
[A2] Scaling parameter A (minimum or scale; default=1.0)
[B2] Scaling parameter B (maximum or exponent; default=0.35)
[sc3] Scaling model flag (default=0: lin, 1: log, 2: power-law)
[A3] Scaling parameter A (minimum or scale; default=0.0)
[B3] Scaling parameter B (maximum or exponent; default=6.2832)
[start_f1] starting line of f1 (default=1)
[start_f2] starting line of f2 (default=1)
[start_f3] starting line of f3 (default=1)
[nlines] number of lines to process (default=0: to end of file)
[pixavr] number of pixels to average in range (default=1)
[pixavaz] number of pixels to average in azimuth (default=1)
[LR] left/right flipping flag, (default=1: normal, -1: mirror image)


EXAMPLE
ras24_float 8059_8560.unw 8059_8560.pwr1 8059_8560.cc 750 8059_8560.unw.ras 1 0. 360. 0.15 0.85 0.2 0.8 0 0.0 12.566 1 2 1. 0.35 0 0.0 1.0

Generates a (24-bit) SUN raster of the unwrapped interferometric phase (color) using the backscatter intensity as image brightness (power-law scaling) and the coherence as color saturation (linear scaling). The HLS (double hexagon) color model with hues between 0. and 360., lightness values between 0.15 and 0.85, and saturation values between 0.2 and 0.8 are used. For the unwrapped phase linear scaling between 0. and 4xPI (cyclic) is used.

ras24_float dv.pwr1 dv.pwr2 dv.pwr3 750 dv.rgb.ras 0 - - - - - - 1 -22. 3.5 0 2 1 -22. 3.5 1 -22. 3.5

Generates a (24-bit) SUN raster of the unwrapped interferometric phase (color). The RGB color model with red corresponding to the first input image intensity (logarithmic dB scaling between -22.0 and 3.5), green corresponding to the second input image intensity (logarithmic dB scaling between -22.0 and 3.5), and blue corresponding to the third input image intensity (logarithmic dB scaling between -22.0 and 3.5).

DESCRIPTION
ras24_float generates a 24-bit SUN raster or BMP format file from one, two, or 3 real valued input data files (float). Color model and scaling parameters for the input data are user specified to offer a wide functionality for image data display.

The following color models can be selected:

RGB: red-green-blue color model
HLS: Double hexagon cone
HSV: Single hexagon cone


Each color model is further specified by the color model parameters: starting hue value (h0), hue range (hrange), minimum brightness (imin), maximum brightness (imax), minimum saturation (sat_min), and maximum saturation (sat_max). In the case of the RGB color model the color model parameters are ignored.

One or more input data files can be avoided by indicating "-" instead of a valid file name. In such a case the corresponding data is replaced by the mean value of the indicated value range of the corresponding channel. Avoiding input image 3, for example, sets the saturation values to (sat_min+sat_max)/2.

For each input file 255 different values are distinguished. 0 (NULL) is reserved to indicate missing data, respectivly NULL values (0.0) in the input data.

The full color circle corresponds to a hue range of 360.0 degrees. Therefore, a hue range of 360.0 degrees is usually used when working with a cyclic scaling for input image 1. In the case of non-cyclic scaling a reduced hue range (300. degrees or smaller) might be preferred for the better discrimination between very low and very high image 1 values.

Indicating negative hue range values allows to invert the rotation sense on the color circle.

The selected starting hue value determines where on the color cycle the color scale starts. Especially for non-cyclic scaling a change in the starting hue value has a very significant effect on the result.

The following table contains a summery of the hue - color relationship for the HLS and HSV color models:

hue value:
[deg.]
HLS HSV
0.0 red red
60.0 yellow yellow
120.0 green green
180.0 cyan cyan
240.0 blue blue
300.0 magenta magenta
360.0 red red


The RGB model ignors the indicated color model parameters (h0, hrange, imin, imax, sat_min, and sat_max).

The scaling of the real valued input data file(s) can be specified on the command line. Linear, logarithmic (dB scale), and power-law scaling are supported. For the linear and logarithmic scaling the indicated minimum and maximum values define the scaling. For the power-law scaling a scale factor and the exponent can be indicated.

Cyclic and non-cyclic scaling is supported for the first input data file. In the case of linear scaling between 100.0 and 500.0, an input value of 600.0 will be displayed in the same color as 500.0 in the case on non-cyclic scaling and with the same color as 200.0 in the case of cyclic scaling.

The NULL value of the input data files is 0.0. This value is not interpereted but considered as missing data. Non-zero values smaller than or equal to the minimum value are treated differently than the NULL value 0.0.

The program ras8_color_scale allows to generate a small rasterfile containing a color scale corresponding to an 8-bit color rasterfile. Such a color scale can also be used for the 24-bit rasterfile, when using the HLS or HSV color models.

OPTIONS
Multi-looking and the selection of a reduced number of lines may be applied. Left/right flipping of the output rasterfile may be applied.

DIAGNOSTICS
All messages are generally self-explanatory.

SEE ALSO
ras8_color_scale, ras8_float


© Copyrights for Documentation, and Reference Manual by Gamma Remote Sensing, 2001.
UW, CW, last change 27-Mar-2001.