Main Content

webcamlist

List of webcams connected to your system

Add-On Required: This feature requires the MATLAB Support Package for USB Webcams add-on.

Description

camlist = webcamlist returns a list of available UVC-compliant webcams connected to your system. If you plug in different cameras during the same MATLAB® session, the webcamlist function returns an updated list of cameras.

When you use the webcamlist function, the name of the camera that is shown in its output, for example 'Logitech Webcam 250', is the name you can use to create the webcam object in order to acquire images.

example

Examples

collapse all

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

camlist = webcamlist
camlist = 1×1 cell array
    {'Webcam Test Device'}

If you have multiple webcams connected to your system, the output shows all the cameras in a cell array. This example contains output showing both internal and external cameras.

camlist = webcamlist
ans =

  2×1 cell array


    {'Dell Camera C250'}
    {'Logitech Webcam 250'}

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

In this example, there are two cameras connected by USB ports, both of which are external cameras.

camlist = webcamlist
camlist = 1×1 cell array
    {'Webcam Test Device'}

Output Arguments

collapse all

Returns a list of cameras as character vectors in a cell array.

Version History

Introduced in R2014a