Welcome, Guest. Please login or register.

Author Topic: RGB<->YUV Formulas?  (Read 3198 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JetRacer

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 501
    • Show all replies
Re: RGB<->YUV Formulas?
« on: April 29, 2003, 10:10:10 AM »
Unrelated, but if anyone want to convert color graphics to grey:

R 0.299
G 0.587
B 0.114

R+G+B = 1.0

I found this out when I wrote a Floyd-Steinberg dithering routine. Without evaluating the error of the color selection properly, the dithered image would become slightly green toned.

Another issue was that a 50% b/w pattern would become 70.7% grey (1/sqrt(2)), not 50% grey. So I had to correct that too. AFAIK, I'm the only one that have adressed that issue (that statement includes Photoshop, GIMP and NetPBM).
*Zap! Zap!* Ha! Take that! *Kabooom!* Hey, that\'s not fair!