RGB to YUV format
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
Example
file=('<image file path>');
plotflag=1;
RGB = imread(file);
imshow(RGB);
YUV=rgb2yuv(RGB,plot_flag);
Author:Santhana Raj.A
https://sites.google.com/site/santhanarajarunachalam/
Cite As
Santhana Raj (2024). RGB to YUV format (https://www.mathworks.com/matlabcentral/fileexchange/47786-rgb-to-yuv-format), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |