1

I have a (geographic) raster-image in RGB. I also have an external legend displaying the heights according to a certain color. In below figure, I have sampled this legend, hopefully revealing its RGB-characteristics. I have plotted these values to their actual height values on the X-axis.

Now, is it possible to directly derive height from the pixel's RGB-value? Ultimately, I'm looking for a simple formula which is able to translate my RGB values into one height value (e.g. H = aR + bG + c*B) Any hint or tips? Is it even possible at all?

rgbdiagram

Willem van Opstal
  • 303
  • 1
  • 3
  • 13
  • see [Reverse complex 2D lookup table](https://stackoverflow.com/a/29227551/2521214) also if you want better spectra see [RGB values of visible spectrum](https://stackoverflow.com/a/22681410/2521214) – Spektre Aug 18 '17 at 09:09

0 Answers0