how to convert grayscale image to rgb image

1 次查看(过去 30 天)
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.

采纳的回答

Image Analyst
Image Analyst 2013-11-1
First convert to an indexed image with uint8(). Then choose a colormap, then call ind2rgb().
  2 个评论
mohd akmal masud
mohd akmal masud 2021-1-22
hi sir, can you show the coding. let saya my coding is
B = dicomread('TRANSA001_CT025.dcm');
Image Analyst
Image Analyst 2021-1-22
% 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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by