MSG Natural Colors Enhanced product
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 335
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 10
Description
Dear all
I think it would be beneficial to all users if a “natural colors enhanced” RGB product could be created. After contacting EUMETSAT I provide the algorithm for that product. You can see the product hosted in EUMESAT Image Gallery (https://eumetview.eumetsat.int/mapviewer/).
The recipe for the product follows.
Kind regards
Sakis
------>RECIPE<-----
The Natural Colour Enhanced RGB (Red, Green, Blue) makes use of three solar channels: NIR1.6, VIS0.8 and VIS0.6.
It is derived from Natural Colour RGB but mitigates the effect of the unnatural cyanish colour of white snow and ice clouds by tuned gamma correction values for the principal inputs as well as by modifying the red and blue channels. In a first step a virtual cyan channel is calculated by taking the minimum of the green and blue contribution to a pixel. This channel is mapped again by a hand tuned non-liner mapping before being used for the following modification:
• in each pixel, where the red component value is less than both the green and blue value, red is increased to the minimum of the green and blue value.
• Besides, for the same pixels, the blue value is increased to the green value, if the latter is higher.
The first modification has the effect of desaturating cyan areas (i.e. making them look more greyish/whitish) while the second step reduces a greenish colour cast in the modified areas in favour of a bluish one, which appears to look more natural.
For each pixel the following is done:
• Let R, G, B be the red, green, blue colour component values of the pixel after gamma correction, i.e.:
R := gamma( albedo( NIR1.6 ) )
G := gamma( albedo( VIS0.8 ) )
B := gamma( albedo( VIS0.6 ) )
• A virtual cyan colour component is defined as:
C = min(G, B)
• Then the algorithm is implemented as follows:
if R < C then {
# desaturate cyanish pixel by raising the red component
let R := C
if B < G then {
# get rid of greenish colour cast by raising blue value to the green value
let B := G
}
}
The gamma values are manually tweaked to give a visually pleasing result, as well as an additional non-linear mapping of the virtual cyan component before using it for desaturation, as showed in the following table (Table 6), which maps values in the range from 0 to 225 (cyan) to 8-bit values (RGBA tuples). Between these stop points, linear interpolation is performed.
Input Cyan Value | Output RGBA Value
255 | 255,255,255,255
211.2 | 233,233,233,255
157.2 | 160,160,160,255
85.2 | 66,66,66,255
20 | 0,0,0,255
0 | 0,0,0,255
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue supplies the Natural Colour Enhanced RGB recipe and links to the EUMETSAT Image Gallery, but names no Satpy files or tests. Start by finding the existing Natural Colour RGB product implementation and compare its inputs and processing with the supplied algorithm. Done means the requested product is available and its output follows the stated gamma, cyan mapping, and pixel adjustments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100