Open martinber opened 4 years ago
Here's an idea I had for making false color a little bit more accurate. Based on the map boundaries, could hard coded coloration values be set? That then can be modified based on data received from the satellites. That way instead of the program trying to determine from scratch what colors go where, you can use the default coloration to set a baseline. This way also when the different values are adjusted, they are working between B/W and the base color map, which should prevent the wild colors you can get from playing with the color levels.
I am not overly familiar with Rust, or else I would try and code this change myself. I just thought I'd suggest it here as an alternative to the current system and proposed solutions above in case it turned out to be a better way of creating a colored image.
Yes, that would work really well when the map overlay is correctly aligned with the image. Right now, to draw the map lines the code calculates the mapping between (latitude, longitude) -> (x, y) in the image, for this to work we need to do the inverse, that is to go from each (x, y) -> (latitude, longitude) to see if each pixel is water or not.
Also I don't remember which program went even further and colorized the image according to a color image of the earth like this one. In that case one can get the latitude and longitude of each pixel and set a hue or color according to that image
Now there are two more projects from where ideas can be stolen:
I implemented color palettes as in https://github.com/Xerbo/aptdec. In conclusion, now the possible ways to improve the false color are:
I'm leaving information about how to improve false color images, in case someone (or me) decides to improve it someday
This page explains the methods available in WXtoImg
xwxapt (GPLv3) by Neoklis Kyriazis (5B4AZ) has a false color method similar to #25 implementation. This is the relevant part of the configuration file:
SatSignal uses a different approach: color look-up tables, where the x axis is temperature (from -40 to 60) and the y axis is pixel brightness (see https://www.satsignal.eu/software/satsignal_clut.zip). I don't know how it calculates the temperature, and we should be a little careful with licensing issues ideas are taken from there