Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GEo

YUV stuff

This topic is 6580 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you convert from YUV to RGB and back? (YUV = Hue, Saturation, Brightness, I believe) George. "Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"

Share this post


Link to post
Share on other sites
Advertisement
To convert from YUV to RGB, use the following equations:

R = 1.00Y + .000U + 1.403V
G = 1.00Y - .344U - .714V
B = 1.00Y + 1.773U + .000V

To convert from RGB to YUV, you can use the following equations:

Y = .299R + .587G + .114B
U = -.147R - .289G + .437B
V = .615R - .515G - .100B

Erik

Share this post


Link to post
Share on other sites
Nice one, I''m gonna go home (at 4pm) and do lots of cool stuff with these formula, ta.

George.

"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!