Creating a pseudo-color image from a grayscale image
Show older comments
How would I create a pseudo-color image from a grayscale image? I need to use the attached formulas to map the intensity to three color channels R, G, B. Then, I need to merge the channels to get the pseudocolor image.
I am very lost so any help would be appreciated!
Accepted Answer
More Answers (2)
Sulaymon Eshkabilov
on 25 Sep 2021
1 vote
(1) Embed these three equations for variable x and c1, c2, c3, c4 values
(2) Concatenate R, G, B that becomes the pseudocolor image.
1 Comment
Walter Roberson
on 25 Sep 2021
In particular,
RGB = cat(3, R, G, B);
Depending on the range of values of R, G, B, and the data type, you might need to normalize the matrix.
Image Analyst
on 25 Sep 2021
R = .....
G = .....
B = .....
cmap = [R(:), G(:), B(:)]
coloredImage = ind2rgb(grayImage, cmap);
Categories
Find more on Blocked Images 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!