Created
October 27, 2014 18:44
-
-
Save harrisonhjones/13b45f7be3059cca6982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vid = videoinput('winvideo', 1, 'RGB24_320x240'); %select input device | |
hvpc = vision.VideoPlayer; %create video player object | |
src = getselectedsource(vid); | |
vid.FramesPerTrigger =1; | |
vid.TriggerRepeat = Inf; | |
vid.ReturnedColorspace = 'rgb'; | |
src.FrameRate = '30'; | |
start(vid) | |
%start main loop for image acquisition | |
for t=1:500 | |
imgO=getdata(vid,1,'uint8'); %get image from camera | |
hvpc.step(imgO); %see current image in player | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/8901824/getsnapshot-speedup