📌  相关文章
📜  获取视频宽度和高度 cv2 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:37.348000             🧑  作者: Mango

代码示例1
import cv2
file_path = "./video.avi"  # change to your own video path
vid = cv2.VideoCapture(file_path)
height = vid.get(cv2.CAP_PROP_FRAME_HEIGHT)
width = vid.get(cv2.CAP_PROP_FRAME_WIDTH)