# coding: utf-8 # 打开摄像头并灰度化显示 import cv2 as cv camera_id = "rtsp://admin:[email protected]:554/jingli/realmonitor?channel=1&subtype=0" # 0表示摄像头的编号 capture = cv.VideoCapture(camera_id) while(True): ret, frame = capture.read() frame = cv.resize(frame,(1280,720)) # cv.imshow('frame', frame) if cv.waitKey(1) == ord('q'): break #
######################
标签:capture,python,frame,rtsp,id,opencv,cv From: https://www.cnblogs.com/herd/p/17481215.html