How to change 1 channel image to 3 channel
Mostra commenti meno recenti
I have several grayscale images with channel 1, then I want to convert it to RGB channel 3 image, how do I change it?
Risposta accettata
Più risposte (1)
DGM
il 2 Mag 2022
Alternative to using cat(), the same can also be done a couple other ways.
You can use repmat()
rgbpict = repmat(graypict,[1 1 3]);
... or you can even use basic indexing:
rgbpict = graypict(:,:,[1 1 1]);
Categorie
Scopri di più su Image Processing and Computer Vision in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!