Answer the question
In order to leave comments, you need to log in
How to extract elevation data from such a heightmap?
All that is known: the blue areas are the lowest elevations, then comes red, then green, and after green even higher (in the lower left corner) comes red
Answer the question
In order to leave comments, you need to log in
Everything turned out to be simple, after visually evaluating the channels separately.
It turns out that the green channel is responsible for the total height from the bottom to the top, while the red channel represents the remainder for the green. At the same time, the green channel has several levels .
The formula is
: elevation = level*256 + green+red/256
But there is one moment, in the left corner there is again a countdown from 0, but the height increases, how to determine it programmatically is still unknown
-1 -1 -1
-1 8 -1
-1 -1 -1
0 0 0
0 1 -1
0 0 0
0 0 0
-1 1 0
0 0 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question