Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img=imread('mars_moon.png');
- [lin, col] = size(img);
- N = lin * col; % numero total de pixels
- hist = imhist(img) / N; %calcula o hist.norm
- f1 = cumsum(hist)'; % hist. acum.
- href=load('histograma.txt');
- f2=cumsum(href);
- nimg=img;
- for i=1: fil
- for j=1:col
- nimg(i,j)=min(abs(f1(img(i,j)+1)-f2(img(i,j)+1)));
- end
- end
- m=abs(f1(img+1)-f2(img+1));
- nimg = f1(img+1);
- nimg = uint8(nimg*255);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement