Webcam Image Acquisition
You create a webcam object and then use the
                  snapshot function to acquire images from the webcam. You can
               acquire a single image or set up a loop to acquire multiple images. Use the
                  preview function to test the camera stream.
You can set device-specific properties, such as resolution and brightness, if your
               camera allows programmatic access. These properties vary depending on your device. To
               see the properties for your camera, look at the output when you create the
                  webcam object. For information about setting properties, see
                  Set Properties for Webcam Acquisition.
Functions
| webcamlist | List of webcams connected to your system | 
| webcam | Connection to a webcam | 
| preview | Preview live video data from webcam | 
| snapshot | Acquire single image frame from a webcam | 
| closePreview | Close webcam preview window | 
| propertyInfo | Retrieve metadata for webcam properties (Since R2024a) | 
Live Editor Tasks
| Acquire Webcam Image | Acquire snapshot from webcam in the Live Editor | 
Topics
- Webcam Acquisition OverviewYou can use MATLAB® webcam support to bring live images from any USB Video Class (UVC) compliant webcam into MATLAB. Supported platforms are listed here. 
- Acquire Images from WebcamsTo acquire images from a webcam, you first create a webcam object using the webcamfunction. This example describes the typical workflow for acquiring images from webcams and bringing them into MATLAB.
- Using Acquire Webcam Image Live Editor Task from Hardware ManagerYou can use MATLAB Hardware Manager to detect your webcam and run the Acquire Webcam Image Live Editor task to interactively connect to your webcam, set its properties based on the live video, and capture images. 
- Acquire Webcam Images in a LoopThe snapshotfunction acquires a single image from a webcam. If you want to acquire images in a loop, you can do that with some extra programming.
- Acquiring a Single Image in a LoopThis example shows how to use the snapshotfunction to acquire live images from USB webcams.
- Logging Video to DiskThis example shows how to use the snapshotfunction to acquire live images and log the video to disk.
- Set Properties for Webcam AcquisitionYou can set object-specific properties for the webcamobject to use with any webcam. You can also set device-specific properties for a specific webcam, if supported by your device.
