% comparahist: compares histograms; S. Mann % see also Contrast Limited Adaptive Histogram Specification (local stats...?) frame1=13 frame2=16 eval(sprintf('image1=loadpnm(''s%03d.pgm'');',frame1)); eval(sprintf('image2=loadpnm(''s%03d.pgm'');',frame2)); h1=hist256(image1); h2=hist256(image2); x=0:255; subplot(221); plot(x,h1,x,h2); H1=cumsum(h1); H2=cumsum(h2); subplot(222); plot(x,H1,x,H2);