Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- info=imaqhwinfo
- vid=videoinput('winvideo')
- %preview(vid)
- get(vid)
- get(getselectedsource(vid))
- set(vid, 'TriggerRepeat', Inf)
- set(gcf, 'doublebuffer', 'on')
- start(vid)
- while(vid.FramesAcquired <=10)
- data=getsnapshot(vid);
- obraz=rgb2gray(data);
- figure(1);
- imshow(obraz);
- end
- figure(2);
- imhist(obraz);
- figure(3);
- histeq(obraz);
- level=graythresh(obraz);
- bin=im2bw(obraz,level);
- figure(4);
- imshow(bin);
- stop(vid)
- delete(vid)
- clear
- close(gfc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement