Why does rgb2gray use these weights for the weighted sum?
50 views (last 30 days)
From the documentation I find: "rgb2gray converts RGB values to grayscale values by forming a weighted sum of the R, G, and B components:
0.2989 * R + 0.5870 * G + 0.1140 * B"
Depending on which format you have it is sometimes more correct to use 0.2126 * R + 0.7156 * G + 0.0722 * B. Maybe the weights which rgb2gray.m uses apply more often (in a standard case where the user is not so specific about how precisely the conversion is done)? I am this 'lazy' kind of user but I would have choosen the alternative weights. But I guess matlab knows better than I - so I would like to know why they prefere their choise.