Prev: A bit-reversal algorithm written in an Mex-file
Next: Trouble with dbstop, CAT, and timer functions
From: Nandish on 5 Apr 2010 09:56 Hello, please help me. i have connected web cam to PC. now i wanted to display caputred images by webcam continuously. i am using following code. vid = videoinput('winvideo'); % Configuring Parameter set(vid,'FramesPerTrigger',200) set(vid,'FrameGrabInterval',3) vid.TriggerRepeat = inf; set(vid,'LoggingMode','Memory') %triggerconfig(vid,'manual') imaqmem(700000000) cnt = imaqmem; mem_low = 100000000; mem_left = cnt.FrameMemoryLimit - cnt.FrameMemoryUsed; start(vid) while(mem_left > mem_low) if (mem_left < mem_low) flushdata(vid); mem_left = cnt.FrameMemoryLimit - cnt.FrameMemoryUsed; end % trigger(vid) frame = getsnapshot(vid); I = rgb2gray(frame); imshow(I); end stop(vid) To clear the memory, i am using 'flushdata' command, but it is not working when i am running the code. and thus code stops running when memory gets full. What should i do so that past memory get deleted, so i can acquired images continuously.. Thank you.
|
Pages: 1 Prev: A bit-reversal algorithm written in an Mex-file Next: Trouble with dbstop, CAT, and timer functions |