Documentation Center

  • Trial Software
  • Product Updates

Connecting to Webcams

Use the webcamlist function to return the list of available UVC-compliant Webcams connected to your system. The function returns a cell array of camera names. The list supports the plug and play scenario, where using the webcamlist function again in the same MATLAB® session returns an updated list of cameras if you plug in different cameras during the session.

If you have a single Webcam connected to your system, the output shows one camera:

webcamlist

ans = 

		'Logitech USB Camera'

If you have multiple Webcams connected to your system, the output shows all the cameras in a cell array:

webcamlist

ans = 

		'Dell Camera C250'  
		'Logitech USB Camera'

In this case webcamlist detects the built-in Webcam in the Dell® computer, and a connected USB Webcam.

If you have two cameras connected by USB ports, the output is:

webcamlist

ans = 

		'Logitech Webcam 250'  
		'Logitech Webcam Pro 9000'

The name of the camera that is shown in this output, for example 'Logitech Webcam 250', is the name you can use to create the Webcam object in order to acquire images.

For more information, see:

    Note:   Webcam support is available only through Hardware Support Packages. You must download and install the necessary files using the Support Package Installer. For instructions, see Installing the Webcam Support Package.

Was this topic helpful?