how to convert grayscale image to rgb image

조회 수: 1 (최근 30일)
tawheed jan
tawheed jan 2013년 11월 1일
댓글: Image Analyst 2021년 1월 22일
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