Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function YUV=rgb2yuv(RGB)
- R = RGB(:,:,1);
- G = RGB(:,:,2);
- B = RGB(:,:,3);
- Y = 0.299 * R + 0.587 * G + 0.114 * B;
- U = 0.5 - 0.168736 * R - 0.331264 * G + 0.5 * B;
- V = 0.5 + 0.5 * R - 0.418688 * G - 0.081312 * B;
- % ^^^ I tried to use 0.0 as well, but SSIM values are identical
- YUV=cat(3,Y,U,V);
- end
Add Comment
Please, Sign In to add comment