How to write a open cam loop?

8 vues (au cours des 30 derniers jours)
Dekel Mashiach
Dekel Mashiach le 1 Juin 2022
Commenté : Dekel Mashiach le 1 Juin 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 commentaires
Image Analyst
Image Analyst le 1 Juin 2022
See attached sample code. Adapt as needed to do whatever algorithm you want.
Dekel Mashiach
Dekel Mashiach le 1 Juin 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

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by