Documentation Center

  • Trial Software
  • Product Updates

webcamlist

List of Webcams connected to your system

Syntax

Description

example

webcamlist returns a list of available UVC-compliant Webcams connected to your system. The function returns a cell array of names of the cameras. This 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.

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.

Examples

expand all

Display Single Webcam

This example shows the output with a single camera.

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

webcamlist
ans = 

		'Logitech Webcam 250'

Display Multiple Internal and External Webcams

This example shows the output with multiple cameras, including both internal and external.

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 Webcam 250'

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

Display Multiple External Webcams

This example shows the output with multiple cameras, including only external.

In this case, there are two cameras connected by USB ports.

webcamlist
ans = 

		'Logitech Webcam 250'
 		'Logitech Webcam Pro 9000'
Was this topic helpful?