histogram.m

function h=histogram(f,N)

% histogram - computes a grey level histogram.
% version 1
% Lance Williams 
% Dept. of Computer Science
% Univ. of New Mexico
%

h(1:N) = 0;

rf=size(f,1);
cf=size(f,2);

for i=0:N-1
  h(i+1) = sum(sum(f==i));
end

댓글

  1. call:

    octave:72> hh=histogram(aa, 256);
    octave:73>
    octave:73>
    octave:73> plot(0:255, hh)

    답글삭제

댓글 쓰기

이 블로그의 인기 게시물

Draw Circle on PictureBox when Button Click - Winform

2D FFT of Gray Image by AForge