write a gray scale image to a color image and keep the intensities unchanged
1 次查看(过去 30 天)
显示 更早的评论
Hi All
I am pretty new in matlab. I have a set of images that are "uint16" and gray sclae. I am going to convert the images to a different colormap, say jet or hot, and write them. But I do not want the pixel intensity changes. Is it possible at all? Or as soon as I change the colormap ever pixel intensity is changed? Many thanks in advance!
0 个评论
回答(1 个)
Image Analyst
2019-12-15
How are you defining intensity? If the color goes from gray to some vivid hue, obviously something has changed in the display. But it's only the image as displayed that is changed. You can apply whatever colormap you want with imshow() or colormap() and the underlying gray scale image variable does not change -- it's only how it looks that is different. So if you did anything with the gray scale image like filtered it, thresholded it, saved it to disk, or whatever, it will be the same regardless of what it looks like in the axes on the figure window.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Red 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!