Converting image from RGB to YUV

Hello guys, I’ve been given a kinda confusing task. It is converting RGB image to YUV. As far as I’m aware I was told to use nodes : Combine RGBA and Comebine YUVA. There’s formula written for each lette

π‘Œ = 0,299𝑅 + 0,587𝐺 + 0,114𝐡
π‘ˆ = 0,492 (𝐡 βˆ’ π‘Œ)
𝑉 = 0,877 (𝑅 βˆ’ π‘Œ)

The first one Y, I did very easily just by putting these numbers into Combine RGBA node and connecting it to Combine YUVA Y. However, I have no idea how to do the other ones. What I currently have is

In terms of math, your forumulas is this:

Be sure that your conversion formulas are correct tho cause I haven’t checked.

1 Like