pipe your color image through a color ramp / gradient with the stops set as you need. Dark blue being black, red-brownish being white, stops inbetween as you need.
Is this a software, a type of software?
Any recommendations?
I tried a couple of modules for CPython3 to get the number of colors and the actual colors, but if the image is not of a very good quality the number of colors becomes too high and the output is ‘None’
There are equations for greyscale and there isn’t one right way to do it. There is typically 4 common schemes. I have a Grayscale Color component in Pufferfish with them but since I assume you want some code, check out the section of this page called “Luma Coding in Video Systems” for the different common weighted average schemes: https://en.m.wikipedia.org/wiki/Grayscale
Grayscale isn’t what is really needed. One needs to map the different colors to the different height values. Color ramp / multistop gradient can help you interpolate.
Hi Ivelin; As colors could be transformed to point in a cube with {-1,-1,-1,} and {1,1,1} extremities, you could first draw a curve representing the gradiant and then at each parameter of the curve affect a greyscale. If not precise you could use GraphMapper.
See there
while this looks like an interesting problem, why not just use other sources?
your map seems to be simple elevation data… here is a nice 16 bit grayscale tiff source: http://www.shadedrelief.com/natural3/pages/extra.html
and if you need better data get an account (free) for: https://earthexplorer.usgs.gov/
there you can download all kinds of high res raw satellite data
even if you would manage to convert your color map, the loss of precision will be so great, not sure it is worth it
The reason I want to do this is because all already grayscaled images about elevations I found contain only data for the land, not the underwater topography.
The sea is always the same level. And if you try to create a 3d model it doesn’t look ok.
Hi Graham,
How would this file look like? Is there specific format that contains this kind of data?
here is a full map with ocean floor: http://naciscdn.org/data/cleantopo/Full.zip
be sure to run some image filters like auto-level on it before using it - image samplers in grasshopper / rhino only work on 8bit precision
its not. it is Plate Carree aka Geographic or LatLong
with a bit of math (wikipedia!) you can make it any projection you want
regarding the shadows - also no.
Ivelin, I encouter the same ptoblem as you. I ended using a, image similar to the one from Atair.
For projecting on an earth with unit in kilometer I do that. In order to have good longitude, a rotation of 180° is necessary. The 0 of longitude is on the middle.