Link to home
Start Free TrialLog in
Avatar of neural
neural

asked on

RGB to Grey/Black White

What is the correct mathmatics of converting a colored RGB image into a Black White one?
Avatar of ozo
ozo
Flag of United States of America image

Depends on gamma, among other things, but Rec 601-1 suggests
Y=  0.2989*Red+0.5867*Green+0.1144*Blue
or if you prefer the Rec 709 values:
Y = 0.2126*R+0.7152*G+0.0722*B
or ITU:
Y = 0.2220*R+0.7067*G+0.0713*B
Avatar of ckayter
ckayter

Depending on the software you are using, you may be able to simplify the process by selecting a gray scale palette...

Colleen

ASKER CERTIFIED SOLUTION
Avatar of ckayter
ckayter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of neural

ASKER

ckayter, thank you for trying to help with my problem. I need to convert colored images to black/ white ones by writing VB codes. And I could convert them into codes but failed to find the relations between then. Say I have R, G, and B values of one pixel, now I need to convert them into single value for further use of puting them back as black/white pixel. There are a thousand way of doing this, but I need the correct one.
Avatar of neural

ASKER

Collen, sorry I didn't reply right away, I don't check this e-mail account quite often. Anyway, smart move!