Transforming Color to Altitude



JPEG is a "lossy" format (as evidenced by the above screen shot). We first smoothed the color bar (downloaded from NASA -- the first of the three color bars shown above) by averaging all rows in a given column to insure that we had unique values with which to work, shown in the second color bar). We then fit piecewise linear functions to the hue, saturation, and brightness values of the color bar. These are shown (and possibly visible!) in the above picture, where the resulting functions are plotted, red for hue, green for saturation and blue for brightness, or value. Using these "smoothed" values, we generated the third color bar, which is very close to the "original".

We observed that as long as HUE is greater than zero, the altitude is completely determined by that parameter. When HUE becomes zero (higher altitudes) we then used the unique (in that range) value of SATURATION.

Reading a pixel from the altimetry data we first transformed the HUE and SAT(uration) parameters to a column number COL in the color bar:

If (HUE > 70.0) then COL = (156/220)(290 - HUE);

If (70.0 >= HUE > 0.0) then COL = 226 - HUE;

If (0.0 = HUE) then COL = (1391.05 - SAT)/2.3537; (SAT >= 0.0)

Finally the COL(umn) parameter is changed int ALT(itude) through the formula

ALT = ( 48.54369 * COL ) - 7961.165.


RETURN