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.
댓글 수: 0
채택된 답변
Image Analyst
2013년 11월 1일
First convert to an indexed image with uint8(). Then choose a colormap, then call ind2rgb().
댓글 수: 2
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
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 Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!