LoginSignup
0
0

YUVとRGBの違い

Posted at

YUVとは

YUVとはRGBを変換したFormatである。
Y(luminance): Gray Scale画像のIntensity
U(Chrominance Blue): Blueの成分
V(Chrominance Red): Redの成分

RGBからYUVへの変換の例

Y = 0.299 * R + 0.587 * G + 0.114 * B
U = 0.492 * (B - Y)
V = 0.877 * (R - Y)

なぜYUVを使うの?

data sizeを小さくできるから。そうするとデータを転送する時に軽くなる。
luminance(輝度)の変化が重要でChrominance(色度)の変化が重要で無い場合、UとVのデータを削る事が出来る。
例えば人間の目はluminanceの変化に敏感らしい。

UとVのデータ量削減の例

Cb(Chrominance Blue): 青色の成分(U)
Cr(Chrominance Red): 赤色の成分(V)

RGBからYUVに変化させるとそれぞれのPixelにY,Cb,Crの値が存在する
image.png

CrとCbを減らすと以下の図のようにデータを減らせる。完全には復元出来ないが、4:4:4のYUV画像に変換出来て、RGBにも戻せる。
image.png

Reference

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0