Akzeptierte Antwort

David Young
David Young am 18 Feb. 2011

0 Stimmen

A greyscale image has no colour information, but you can still represent it as ycbcr if you wish - though it's not clear why you'd want to, since the chrominance planes will be constants. Anyway, this will convert, assuming you're starting from a 2D greyscale image:
rgbimage(:,:,1) = greyimage;
rgbimage(:,:,2) = greyimage;
rgbimage(:,:,3) = greyimage;
ycbcrimage = rgb2ycbcr(rgbimage);
You can also convert a colormap using the same function, if that's what you want to do.

1 Kommentar

Christin Panjaitan
Christin Panjaitan am 5 Sep. 2014
How is about grayscale High Dynamic Range (12-bit) ? How to convert grayscale High Dynamic Range into Ycbcr ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Modify Image Colors finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by