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

📄 imgpdf.m

📁 matlab图象增强代码集合。多个代码。英文。
💻 M
字号:
function pdfhist = imgpdf(img)
% Author: Javier Montoya (jmontoyaz@gmail.com).
%         http://www.lis.ic.unicamp.br/~jmontoya
%
% IMGPDF normalizes a given histogram ('hist').
% Input parameters:
%    img: image I (passed as a bidimensional matrix).
% Ouput parameters:
%    pdfhist: normalized histogram => pdf.
%
% See also: IMGHIST
%
% Usage:
%    I       = imread('tire.tif');
%    pdfhist = imgpdf(I);
%    figure; stem(pdfhist); title('Normalized Histogram (PDF)');

   if exist('img', 'var') == 0
      error('Error: Specify an input image.');
  else
   ihist       = imghist(img);
   [rows,cols] = size(img);
   pdfhist     = ihist/rows/cols;
  end

⌨️ 快捷键说明

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