Use MATLAB® Support Package for USB Webcams to import live images from a USB video class (UVC)-compliant webcam into MATLAB or through a web browser into MATLAB Online™. This includes built-in webcams on laptops and other devices as well as external webcams connected via USB port.
Install hardware support, connect to webcams
Acquire images from webcams
Resolve unexpected issues in MATLAB Support Package for USB Webcams