mapcontrast.m

来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 39 行

M
39
字号
function newmap=mapcontrast(map, c)%MAPCONTRAST Contrast the colormap%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu,    mark@alice.uoregon.edu%global MapSizeif nargin>2  error('Too many input arguments.');endif nargin<1  c=0;endif c<0 | c>10  error('Input argument must be between 0 and 10');endab=round(MapSize*(1-c*0.09));bc=MapSize-ab;x=1:(MapSize/ab):MapSize;abmap=map(x,:);last=abmap(length(abmap),:);bcmap=[zeros(bc,1)+last(1) zeros(bc,1)+last(2) zeros(bc,1)+last(3)];newmap=[abmap;bcmap];return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?