SHARE
TWEET

Leno_Paleno

pabloducato Oct 22nd, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2.  
  3. vid=videoinput('winvideo') %obiekt kamerki
  4. preview(vid) %podglad z kamery
  5. for i=1:500
  6.     obraz=getsnapshot(vid);
  7.    
  8.     figure(2);
  9.    
  10.     obraz_sz=rgb2gray(obraz);
  11.     subplot(3,2,1);;imshow(obraz_sz);title('szary')
  12.     subplot(3,2,2);imhist(obraz_sz);title('histogram')
  13.    
  14.    
  15.     obraz_wh=histeq(obraz_sz);
  16.     subplot(3,2,3);imshow(obraz_wh);title('wyrownanie histogramu')
  17.     subplot(3,2,4);imhist(obraz_wh);title('hist. wyr')
  18.    
  19.     prog=graythresh(obraz_sz);
  20.     obraz_czb=im2bw(obraz_sz,prog);
  21.     subplot(3,2,5);imshow(obraz_czb);title('czarno & bialu');
  22.     subplot(3,2,6);imhist(obraz_czb);title('hist. czarno & bialu')
  23.    
  24. end
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