⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adjgamma.m

📁 精确定位 虹膜的内外边缘
💻 M
字号:
% ADJGAMMA - Adjusts image gamma.%% function g = adjgamma(im, g)%% Arguments:%            im     - image to be processed.%            g      - image gamma value.%                     Values in the range 0-1 enhance contrast of bright%                     regions, values > 1 enhance contrast in dark%                     regions. % Author: Peter Kovesi% Department of Computer Science & Software Engineering% The University of Western Australia% pk@cs.uwa.edu.au     www.cs.uwa.edu.au/~pk% July 2001function newim = adjgamma(im, g)    if g <= 0	error('Gamma value must be > 0');    end    if isa(im,'uint8');	newim = double(im);    else 	newim = im;    end    	    % rescale range 0-1    newim = newim-min(min(newim));    newim = newim./max(max(newim));        newim =  newim.^(1/g);   % Apply gamma function

⌨️ 快捷键说明

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