yuanming-hu / exposure

Learning infinite-resolution image processing with GAN and RL from unpaired image datasets, using a differentiable photo editing model.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Luminance Calculate Formula

royxue opened this issue · comments

commented

Hi, Yuanming

Regarding to your code, I have few questions towards the formula you are using for calculating luminance,

I noticed that you are using 0.27*R + 0.67*G + 0.06*B(I could only find reference of this formula by http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf), however, I also read some other articles about luminance formula, seems 0.2126*R + 0.7152*G + 0.0722*B is more often used for linear RGB cases, and 0.299*R + 0.587*G + 0.114*B for gamma-corrected RGB cases.

could you give some explanation about your luminance formula? and why you are using the same formula for both cases in your code?

Hi Rox,

I think these coefficients are just empirical values and you are right there are many definitions of luminance. It's hard to say which one is the "best one" but the weights basically follow the same rule: green > red > blue.

commented

Ok, thanks for the explanation ;)