I found this code online to get the camera resolution that OpenCV detects:
import cv2
cap = cv2.VideoCapture(0)
width = cap.get(cv2.CAP_PROP_FRAME_WIDTH)
height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT)
print(width, height)
I got 640.0 480.0 although my computer's camera resolution is 720p (1280 720), why is that?
My laptop is Lenovo Legion Y530