How to write a open cam loop?

2 views (last 30 days)
Dekel Mashiach
Dekel Mashiach on 1 Jun 2022
Commented: Dekel Mashiach on 1 Jun 2022
Hey; I'm trying to converte a code from reading a video to open cam ; hope someone can help me.
videoName = 'tt1.mp4';
videoReader = VideoReader(videoName);
timeStamp = 0.06667; % time from the beginning of the video
videoReader.CurrentTime = timeStamp; % point to the chosen frame
rgbImage = readFrame(videoReader); % read frame at timeStamp seconds
figure
imshow(rgbImage) % display frame
  4 Comments
Dekel Mashiach
Dekel Mashiach on 1 Jun 2022
thanks. I need something like that but what can I write instead of Videoreader?
cam = webcam('Microsoft® LifeCam HD-3000');
preview(cam)
% videoName = 'tt1.mp4';
% videoReader = VideoReader(videoName);
timeStamp = 0.06667; % time from the beginning of the video
videoReader.CurrentTime = timeStamp; % point to the chosen frame

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!