how to convert grayscale image to RGB image
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello,
Plz tell me how can i convert grayscale image to RGB image
0 Commenti
Risposte (3)
Walter Roberson
il 14 Dic 2013
RGBImage = cat(3, GrayImage, GrayImage, GrayImage);
would result in an RGB image with the same visual appearance as the grayscale image.
0 Commenti
Image Analyst
il 14 Dic 2013
Another option to assign colors to certain gray levels is to create a color map that does the mapping and pass it into ind2rgb
rgbImage = ind2rgb(grayImage, jet(256)); % Choose whatever colormap you want instead of jet.
It just depends on what you want and expect the output to look like.
0 Commenti
DGM
il 19 Apr 2022
Depending on what the goals are, there are various ways to interpret the question. The following link includes demonstrations of converting a single-channel image to a 3-channel image via:
- channel replication (like above)
- channel filling/deletion and potential hue adjustment
- uniform and nonuniform colorization methods
- color mapping
I imagine most needs are met with replication or colormapping, but I like generalizable answers to be somewhat comprehensive.
0 Commenti
Vedere anche
Categorie
Scopri di più su Modify Image Colors in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!