webcamlist

List of webcams connected to your system

Description

example

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.

Examples

collapse all

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

webcamlist
ans = 1×1 cell array
    {'Logitech Webcam 250'}

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.

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.

webcamlist
ans = 2×1 cell array
    {'Logitech Webcam 250'     }
    {'Logitech Webcam Pro 9000'}

Introduced in R2014a