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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Grayscale

Grayscale

Photo of conversion

conversion

Related news:

News photo

New method turns CO2 emissions into clean fuels with 100% efficiency | This process allows the use of affordable zinc as a catalyst, making the conversion of CO2 into fuel more economically viable.

News photo

Grayscale wins lawsuit against SEC, while the agency settles first NFT case and Friend.tech hype crashes

News photo

Grayscale’s legal head says bitcoin spot ETF approval is a ‘matter of when, not if’