Real-time video capture with frame by frame comparsion
3 ビュー (過去 30 日間)
古いコメントを表示
Hello, I would like to capture video using a computer camera (usb) and compare consecutive frames (i.e. get diff).
I got the real time capture using videoinput functions and objects
vid = videoinput('winvideo', 1);
and the timer function to capture frames from the video stream.
TimerData=timer('TimerFcn', {@FrameRateDisplay,vid},'Period',1/NumberFrameDisplayPerSecond,'ExecutionMode','fixedRate','BusyMode','drop');
the function FrameRateDisplay just displays the image captured and some stats on it.
However, I cannot figure out a way to save the last frame captured, to compare it to the next run of the timer function. I think fundamentally I'm confused about how to get a return value from the callbackfunction @FrameRateDisplay.
thank you for your time,
dave
0 件のコメント
採用された回答
Walter Roberson
2013 年 3 月 18 日
Those kinds of callback functions cannot return values. Not many callback functions can.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!