In [1]:
import cv2

In [2]:
cap_cam = cv2.VideoCapture(0)
print(type(cap_cam))


<class 'cv2.VideoCapture'>

In [3]:
print(cap_cam.isOpened())


True

In [4]:
print(cap_cam.get(cv2.CAP_PROP_POS_FRAMES))


0.0

In [5]:
ret, frame = cap_cam.read()

In [6]:
print(ret)


True

In [7]:
print(type(frame))


<class 'numpy.ndarray'>

In [8]:
print(frame.shape)


(720, 1280, 3)

In [9]:
print(cap_cam.get(cv2.CAP_PROP_POS_FRAMES))


0.0

In [10]:
cap_cam.release()