Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- vid=videoinput('winvideo')
- %preview(vid)
- for i=1:100
- obraz = getsnapshot(vid);obraz_sz=rgb2gray(obraz);
- figure(2)
- subplot(2,2,1);imshow(obraz_sz);title('Obraz Szary');
- subplot(2,2,2);imhist(obraz_sz);title('Histogram');
- obraz_wh=histeq(obraz_sz);
- subplot(2,2,3);imshow(obraz_wh);title('Wyr obraz')
- subplot(2,2,4);imhist(obraz_wh);title('Wyr Histogram')
- prog = graythresh(obraz_sz);
- obraz_bwauto = im2bw(obraz_sz, prog);
- obraz_bwman = im2bw(obraz_sz,0.7);
- figure(3)
- subplot(1,2,1);imshow(obraz_bwauto);title('Auto')
- subplot(1,2,2);imshow(obraz_bwman);title('Man')
- end
- pause
- close all
- delete vid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement