Can anyone please answer why the pixel value changes from about 90 to about 0.23 when I apply ind2rgb function?
Show older comments
% I have true color image (looks gray though because it is ultrasound image). I read the image.
im = imread('c1d7.JPG');
% converted the image into gray,
I = rgb2gray(im);
imshow(im);
% Then ind2rgb
rgbImage = ind2rgb(I, jet(256));
% This leads the value change as in my question from ~90 to ~0.23
What would be the solution?
Thanks
Surya
Accepted Answer
More Answers (1)
Walter Roberson
on 25 Jan 2017
0 votes
Color tables used with ind2rgb must have entries in the range 0 to 1, which jet() does have. If you want the uint8 version of the colored image apply im2uint8 to it.
Categories
Find more on Green in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!