How to capture frame (image) using webcam at specific time interval (e.g. at 100ms or 10 frames per second) in matlab app designer?
Show older comments
One state button is starting the webcam camera and I am previewing the video camera output in the UIAxes.
function StartCameraButtonValueChanged(app, event)
value = app.StartCameraButton.Value;
app.Camera = webcam(value);
if value == true
app.frame = snapshot(app.Camera);
app.captureCurrentVideo = image(app.UIAxes, zeros(size(app.frame), 'uint8'));
preview(app.Camera, app.captureCurrentVideo);
end
end
Now, i want to capture and store (in variables) only 10 frames per second (in the loop) from the webcam at every seconds, to get histogram of it and update the UIAxes2 to see the liv ehistogram of 10 images per seconds, how can i modify or add some code to perform this task ?
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!