Transform a Gray Image to Pseudo-color Image

this function is based on pre-defined color maps in Matlab
Updated 15 May 2012

View License

function rgb = ImGray2Pseudocolor(gim, map, n)
% IMGRAY2PSEUDOCOLOR transform a gray image to pseudocolor image
% GIM is the input gray image data
% MAP is the colormap already defined in MATLAB, for example:
% 'Jet','HSV','Hot','Cool','Spring','Summer','Autumn','Winter','Gray',
% 'Bone','Copper','Pink','Lines'
% N specifies the size of the colormap
% rgb is the output COLOR image data

Cite As

Xiangguo Li (2024). Transform a Gray Image to Pseudo-color Image (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Modify Image Colors in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes