Webcam Acquisition Overview
Webcam Support
You can use MATLAB®webcam support to bring live images from any USB Video Class (UVC) compliant webcam into MATLAB. This includes webcams that may be built into laptops or other devices, as well as webcams that plug into your computer via a USB port.
Using MATLAB functions, you can detect connected webcams, acquire individual snapshots from a webcam, and optionally set up a loop for acquiring images. Use thewebcamlist
function to detect the connected webcams. Thewebcam
function creates the object that is used to acquire images. And thesnapshot
function returns a single image from the camera. You can also preview your image and set properties for the image.
For more information, see
Connect to Webcamsfor how to use the
webcamlist
function to detect your cameras从摄像头获取图像for how to acquire live images from your camera into MATLAB
Set Properties for Webcam Acquisitionfor how to set webcam-specific or camera-specific properties for the acquisition
Note
In desktop versions of MATLAB, webcam support is available through theMATLAB Support Package for USB Webcams. For instructions, seeInstall the MATLAB Support Package for USB Webcams. Webcams are also supported inMATLAB Online™. For more information, seeWebcam Support in MATLAB Online.
Supported Platforms
You can use MATLAB webcam support on these platforms:
Microsoft®Windows®64-bit
Mac OS X64-bit
Linux®