Get the latest tech news
Conversion to Grayscale
Suppose you have a color image: and you want to convert it to a grayscale image. At first, you might think you you can simply add up the red, green, and blue color values, and divide by 3: Gray = (Red + Green + Blue)/3 If you do that, this is what you’ll get: That doesn’t look very good.
At first, you might think you you can simply add up the red, green, and blue color values, and divide by 3: For correct results, you need a more complicated formula: first convert to a linear colorspace, then use different weights: If your convert-to-grayscale algorithm needs to run as quickly as possible, while still giving good results, you may have to use techniques such as lookup tables to improve the speed.
Or read this on Hacker News