资源简介

在MATLAB中实现将将灰度图像转换为伪彩色图像。

资源截图

代码片段和文件信息

function res = grs2rgb(img map)

%%Convert grayscale images to RGB using specified colormap.
% IMG is the grayscale image. Must be specified as a name of the image 
% including the directory or the matrix.
% MAP is the M-by-3 matrix of colors.
%
% RES = GRS2RGB(IMG) produces the RGB image RES from the grayscale image IMG 
% using the colormap HOT with 64 colors.
%
% RES = GRS2RGB(IMGMAP) produces the RGB image RES from the grayscale image 
% IMG using the colormap matrix MAP. MAP must contain 3 columns for Red 
% Green and Blue components.  
%
% Example 1:
% open ‘image.tif‘;
% res = grs2rgb(image);
%
% Example 2:
% cmap = colormap(summer);
%  res = grs2rgb(‘image.tif‘cmap);
%
%  See also COLORMAP HOT
%
% Written by 
% Valeriy R. Korostyshevskiy PhD
% Georgetown University Medical

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        4539  2006-12-09 19:27  grs2rgb.html
     文件        1705  2006-12-09 19:48  grs2rgb.m
     文件        5027  2006-12-09 19:27  grs2rgbh.png
     文件       78995  2006-12-09 19:27  grs2rgbh_01.png
     文件       94510  2006-12-09 19:27  grs2rgbh_02.png
     文件       81857  2006-12-09 19:27  grs2rgbh_03.png
     文件        1344  2009-07-28 15:22  license.txt

评论

共有 条评论