May i know is it possible to convert an image from 101 x 101 uint8 to 101 x 101 x 3 unit8
Show older comments
Accepted Answer
More Answers (1)
Image Analyst
on 18 Dec 2015
Yes. Let's call your gray scale image grayImage. Then, to get a 3-D RGB image from it, use cat():
rgbImage = cat(3, grayImage, grayImage, grayImage);
If you want to do it while applying a colormap at the same time (which I don't think you do), then use ind2rgb():
rgbImage = ind2rgb(grayImage, yourColorMap);
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!