首先,连接相机并设置标准VGA分辨率: python capture = cv2.VideoCapture(0) assert capture.isOpened(), "Can not connect to camera" capture.set(cv2.CAP_PROP_FRAME_WIDTH, 640) capture.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) 创建一个wx应用程序和layout类,我们将在本文的后面部分进行编写: python app = ...