Gamma DISP: Reference Manual


ras8_float

ANSI-C program: ras8_float.c

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

SYNOPSIS
ras8_float <f1> <f2> <width> <rasf> [color_model] [h0] [hrange] [imin] [imax] [sat] [sc1] [A1] [B1] [cyclic1] [sc2] [A2] [B2] [start_f1] [start_f2] [nlines] [pixavr] [pixavaz] [LR]
 

<f1> input file 1 (float, enter - if not available --> 8-bit color image for f2)
<f2> input file 2 (float, enter - if not available --> greyscale image for f1)
<width> samples per row of f1 and f2
<rasf> (output) 8-bit rasterfile (*.ras: SUN raster format, *.bmp: BMP format)
[color_model] color model selection flag: (default=0)
0: OLD color model used in Gamma Software
1: HLS (double hexagon color model)
2: HSV (single hexagon color model)
3: SIN (sinus color model)
4: GREY (grey-scale 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] color saturation value (0.0 ... 1.0, default=0.75)
[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=0: lin, 1: log, 2: power-law)
[A2] Scaling parameter A (minimum or scale; default=0.0)
[B2] 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)
[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

ras8_float 8059_8560.unw 8059_8560.pwr1 750 8059_8560.unw.ras 1 0. 360. 0.15 0.85 .75 0 0.0 6.2832 1

Generates an (8-bit) SUN raster or BMP format file  of the unwrapped interferometric phase (color) and the backscatter intensity (brightness). The HLS (double hexagon) color model with hues between 0. and 360., lightness values between 0.15 and 0.85, and a saturation of 0.75 is used. For the unwrapped phase linear scaling between 0. and 6.2832 (cyclic) is used. For the backscatter image the default scaling parameters (power-law, scale 1.0, exponent 0.35) is used. 4 bytes are used for the display of the hue and 4 bytes for the brightness.

ras8_float 8059_8560.unw - 750 8059_8560.unw.ras 1 0. 360. 0.15 0.85 .75 0 0.0 6.2832 1

Generates an (8-bit) SUN raster or BMP format file  of the unwrapped interferometric phase (color). The HLS (double hexagon) color model with hues between 0. and 360., using a constant lightness ((0.15+0.85)/2), and saturation (0.75). For the unwrapped phase linear scaling between 0. and 6.2832 (cyclic) is used. 8 bytes are used for the display of the hue.

ras8_float 8059_8560.hgt 8059_8560.pwr1 750 8059_8560.hgt.ras 0 0. 300. 0.15 1. .75 0 -100. 300. 0 2 1. .35 1 1 0

Generates an (8-bit) SUN raster or BMP format file  of the height image (color) and the backscatter intensity (brightness). The OLD color model (old color model used in GAMMA Software) with hues between 0. and 300., lightness values between 0.15 and 1.0, and a saturation of 0.75 is used. For the height linear scaling between -100. and 300. (not-cyclic) is used. For the backscatter image the scaling parameters (power-law, scale 1.0, exponent 0.35) are used. 4 bytes are used for the display of the hue and 4 bytes for the brightness.

ras8_float 8059_8560.hgt 8059_8560.pwr1 750 8059_8560.hgt.ras 2 0. 360. 0.15 1. .75 0 0. 200. 0 2 1. .35 1 1 0

Generates an (8-bit) SUN raster or BMP format file  of the height image (color) and the backscatter intensity (brightness). The HSV (single hexagon) color model with hues between 0. and 360., lightness values between 0.15 and 1.0, and a saturation of 0.75 is used. For the height cyclic linear scaling with 200. meter per cycle is used. For the backscatter image the scaling parameters (power-law, scale 1.0, exponent 0.35) are used. 4 bytes are used for the display of the hue and 4 bytes for the brightness.

ras8_float 8059_8560.cc 8059_8560.pwr1 750 8059_8560.cc.ras 0 0. 300. 0.15 1. .75 0 -100. 300. 0 2 1. .35 1 1 0

Generates an (8-bit) SUN raster or BMP format file  of the coherence image (color) and the backscatter intensity (brightness). The OLD color model (old color model used in GAMMA Software) with hues between 0. and 300., lightness values between 0.15 and 1.0, and a saturation of 0.75 is used. For the coherence linear scaling between 0.1 and 0.9 (not-cyclic) is used. For the backscatter image the scaling parameters (power-law, scale 1.0, exponent 0.35) are used. 4 bytes are used for the display of the hue and 4 bytes for the brightness.

DESCRIPTION
ras8_float generates an 8-bit SUN raster or BMP format file from one or two 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:

OLD: old color model used in GAMMA software
HLS: Double hexagon cone
HSV: Single hexagon cone
SIN: Sine based color model

Each color model is further specified by the color model parameters: starting hue value (h0), hue range (hrange), minimum brightness (imin), maximum brightness (imax) and saturation (sat). Based on the color model type and the indicated parameters the corresponding color table is determined.

If only the first input file is provided 255 different hue values are distinguished. One color (black) is reserved to indicate missing data, respectivly NULL values (0.0) in the input data. Constant brightness (calculated as (imin+imax)/2) and saturation values are used in this case.

If only the second input file is provided 255 different grey values are distinguished. Black is again reserved to indicate missing data, respectivly NULL values (0.0) in the input data.

If both input files are provided 16 different hue values and 15 different brightness values are distinguished. In addition, black is again reserved to indicate missing data, respectivly NULL values (0.0) in the input data, and 15 grey scale values are reserved to display the input image 2 intensity in the case of missing (NULL) input image 1 values.

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 different color models (colors as blue(-red) indicate two parts blue, one part red):

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

The OLD and SIN models ignore the indicated saturation value.

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. 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 the corresponding color scale.

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.

SEE ALSO
ras8_color_scale, ras24_float


© Copyrights for Documentation, and Reference Manual by Gamma Remote Sensing, 2022.
UW, CW, last change 7-Jun-2012.