MATLAB File Help: cv.VideoCapture/VideoCapture Index
cv.VideoCapture/VideoCapture

Create a new VideoCapture object

cap = cv.VideoCapture(index)
cap = cv.VideoCapture(filename)
cap = cv.VideoCapture(..., 'API',apiPreference)

Input

Options

Creates a new video capture instance. With no argument, it connects to the default camera device found in the system. You can specify camera devices by index, an integer value starting from 0. You can also specify a filename to open a video file.

Example

To open camera 1 using the MS Media Foundation API:

cap = cv.VideoCapture(1, 'API','MediaFoundation')
See also