Closed royxue closed 6 years ago
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.
Ok, thanks for the explanation ;)
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, seems0.2126*R + 0.7152*G + 0.0722*B
is more often used for linear RGB cases, and0.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?