how to convert RGB image into YCuCv model by using reversible colour transform ?

1 view (last 30 days)
I need to perform the above asked method in my project.
  1 Comment
PRIYANKA
PRIYANKA on 17 Dec 2014
But in one of project pdf's I studied that RGB to YCbCr transform may be the most frequently used one for the lossy compression of colour image .But I need to perform it for lossless compression.

Sign in to comment.

Answers (1)

Thorsten
Thorsten on 17 Dec 2014
See https://en.wikipedia.org/wiki/JPEG_2000#Color_components_transformation
I = imread('peppers.png');
R = I(:,:,1); G = I(:,:,2); B = I(:,:,3);
Y = floor((R + 2*G + B)/4);
Cb = B - G;
Cr = R - G;
  6 Comments
Thorsten
Thorsten on 17 Dec 2014
Reversible color tranformation means lossless here. Please check the link I provided to see how to convert back to RGB.
Image Analyst
Image Analyst on 20 Dec 2014
Just use imwrite() to create a PNG file. I don't know what it does internally, but it's the lossless compression method that is the most commonly used.

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!