Python调用摄像头,实时显示视频在Tkinter界面
在Python中调用摄像头实时显示监控视频,程序:from DobotEDU import *import cv2import tkinter as tkfrom tkinter import *from PIL import Image, ImageTk#图像控件cap = cv2.VideoCapture(0)#创建摄像头对象#界面画布更新图像def tkImage(): ref,frame=cap.read() frame = cv2.flip(frame, 1) #