从RGB到YCbCr的转换公式 [英] Conversion formula from RGB to YCbCr
问题描述
真正的转换公式是什么,因为我发现了很多转换方法,所以我不知道哪一个是真实的
来自维基百科:
从Microsoft :
和Microsoft与此转换站点相同
有人可以解释公式的区别吗?
如果仍然是实际的,它们几乎是相同的.差异是您将在结果中获得的值范围.
从Wiki的矩阵(R',G',B'= 0..1)中,值将为: Y = 0..219, Cb = -112..112,铬 = -112..112.您可以将其用Y公式除以219,将Cb,Cr fomulas除以224,将其应用于其他矩阵.
从Microsoft的(R,G,B = 0..255)中,您将得到 Y = 0..255, Cb ≈-127.5 .. 127.5, Cr ≈-127.5 .. 127.5
第三个矩阵通过将负数加128来解决负数的问题.与Microsoft矩阵的区别在于矩阵乘法.
Whats the real conversion formula for this because I found so many ways on how to convert I don't know which one is real
From wikipedia:
From microsoft :
and microsoft is the same with this conversion site http://www.equasys.de/colorconversion.html:
Can anybody explain the difference of the formula?
If it still actual they are almost the same. Differences are what value ranges you'll get in the result.
From Wiki's matrix (R',G',B' = 0..1) values will be: Y = 0..219, Cb = -112..112, Cr = -112..112. You can bring it to other matrices with dividing Y formula by 219, and Cb, Cr fomulas by 224.
From Microsoft's one (R,G,B = 0..255) you'll get Y = 0..255, Cb ≈ -127.5 .. 127.5, Cr ≈ -127.5 .. 127.5
The third matrix solves problems with negative numbers by adding 128 to them. The difference from Microsoft's matrix lies in the matrices multiplication.
这篇关于从RGB到YCbCr的转换公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!