image thumbnail

RGB to YUV format

version (1.97 KB) by Santhana Raj
Converts an image in RGB to YUV with 4:2:2 chroma sampling


Updated 10 Sep 2014

View License

The function rgb2yuv converts the RGB matrix of an image to an YUV format matrix for the image. It plots the images, if Plot Flag is equal to 1.
It uses the RGB conversion formula available in Wikipedia. It gives the YUV format in 4:2:2 chroma sampling
file=('<image file path>');
RGB = imread(file);

Author:Santhana Raj.A

Cite As

Santhana Raj (2022). RGB to YUV format (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!