Prev: Problems saving a simple mat file
Next: GA code
From: Michael on 6 Aug 2010 20:50 help snapshot "Bluebird " <wlouis(a)ryerson.ca> wrote in message <i3hq7i$232$1(a)fred.mathworks.com>... > I need to extract and process images from a webcam. The follwoing code does work however it is very slow (i.e. takes 0.67 to retrieve an image from the camera), the code which i found online is : > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%% > vid = videoinput('winvideo',1,'YUY2_320x240'); > % Set video input object properties for this application. > % Note that example uses both SET method and dot notation method. > set(vid,'TriggerRepeat',Inf); > set(vid,'ReturnedColorSpace','ycbcr'); > start(vid); > while(vid.FramesAcquired<=100) % Stop after 100 frames > imgycbcr = getdata(vid); %Store image (This step takes 0.67 to process) > % Do whatever process > end > stop(vid) > %%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Can anybody please help me in making it faster or at least advice me about different command other than getdata() ? > > Thank you
|
Pages: 1 Prev: Problems saving a simple mat file Next: GA code |