-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Currently the conversion to grayscale is using the formula:
Uint8 grayedColor=(rr+gg+bb)/3
This is wrong. When converting to grayscale, perceptual weighing must be applied (for example the eye is much less sensitive to blue than to green, so blue appears much darker when converted to grayscale). The most common formula used is that specified in CCIR 601, which is approximately:
0.30 * rr + 0.59 * gg + 0.11 * bb
or if you prefer to do it all in integers:
(30 * rr + 59 * gg + 11 * bb) / 100
There is much more detail available at Stack Overflow.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog