Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- clc
- close all
- A=imread('./images/wdg4.gif');
- subplot(2,2,1)
- imshow(A,[0,255])
- H_A = imhist(A);
- subplot(2,2,2)
- bar(H_A)
- PROG = 40;
- B=A;
- [a,b]=size(B);
- pole=0;
- for i=1:a
- for j=1:b
- if B(i,j) <= PROG
- B(i,j)=1;
- pole = pole + 1;
- else
- B(i,j)=0;
- end
- end
- end
- subplot(2,2,3)
- imshow(B,[0,1]);
- pole/(a*b)
- pole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement