how to convert grayscale image to rgb image

In my problem i have taken a colored image & converted it to grayscale(double).After processing now i want the colored image back.plz tell me how to do this.

 Accepted Answer

First convert to an indexed image with uint8(). Then choose a colormap, then call ind2rgb().

2 Comments

hi sir, can you show the coding. let saya my coding is
B = dicomread('TRANSA001_CT025.dcm');
% Convert RGB image to gray scale
grayImage = rgb2gray(B);
% Get color image "back":
% Nothing to do - you still have B (the original RGB image) so you're all set.

Sign in to comment.

More Answers (0)

Categories

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

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!