SHARE
TWEET

Untitled

a guest May 19th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2. vid=videoinput('winvideo')
  3. %preview(vid)
  4.  
  5. for i=1:100
  6.     obraz = getsnapshot(vid);obraz_sz=rgb2gray(obraz);
  7.     figure(2)
  8.     subplot(2,2,1);imshow(obraz_sz);title('Obraz Szary');
  9.     subplot(2,2,2);imhist(obraz_sz);title('Histogram');
  10.     obraz_wh=histeq(obraz_sz);
  11.     subplot(2,2,3);imshow(obraz_wh);title('Wyr obraz')
  12.     subplot(2,2,4);imhist(obraz_wh);title('Wyr Histogram')
  13.     prog = graythresh(obraz_sz);
  14.     obraz_bwauto = im2bw(obraz_sz, prog);
  15.     obraz_bwman  = im2bw(obraz_sz,0.7);
  16.     figure(3)
  17.     subplot(1,2,1);imshow(obraz_bwauto);title('Auto')
  18.     subplot(1,2,2);imshow(obraz_bwman);title('Man')
  19.    
  20. end
  21. pause
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34. close all
  35. delete vid
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top