Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSG Natural Colors Enhanced product #995

Open
athakarag opened this issue Dec 4, 2019 · 1 comment
Open

MSG Natural Colors Enhanced product #995

athakarag opened this issue Dec 4, 2019 · 1 comment
Labels
component:compositors enhancement code enhancements, features, improvements help wanted

Comments

@athakarag
Copy link

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

@mraspaud
Copy link
Member

mraspaud commented Dec 4, 2019

@athakarag Thanks a lot for providing the recipe !

@mraspaud mraspaud added component:compositors enhancement code enhancements, features, improvements help wanted labels Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:compositors enhancement code enhancements, features, improvements help wanted
Projects
None yet
Development

No branches or pull requests

2 participants