I would like to know how I can record a video in MATLAB with my webcam.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NOTE: This is now updated for use with newer versions of MATLAB, since some of the older functionality has been superseded and removed.
If you already know how to capture a single image from a webcam, then it should just be a matter of stitching the images together into a movie. You can use a
VideoWriterobject to open a movie file and then add sequential images using thewriteVideomethod. For example:I just used a for loop as a simple example, but you may want to use a
timerif you instead want to capture images and add them to the AVI file at regular time intervals.