找传奇、传世资源到传世资源站!

Python Opencv实现相机

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

Python Opencv实现相机使用OpenCV模块进行摄像头捕捉,从而实现相机的功能Python Opencv实现相机 Python-第1张
pos = event.pos if viewRect.collidepoint(pos): view = True if view == False else False elif BlightRect.collidepoint(pos): circled = "blight" elif ColorRect.collidepoint(pos): circled = "color" elif changeRect.collidepoint(pos): video = True if video == False else False elif catchRect.collidepoint(pos): if video == False: try: if view == False: image = Image.open('temp.png') image = ImageEnhance.Brightness(image) image = image.enhance(Blight / 20) image = ImageEnhance.Color(image) image = image.enhance(Color / 20) image.save("./美丽照片/" str(time.strftime("%y%m%d%H%M%S")) ".png") else: image = Image.open('temp.png') image.save("./美丽照片/" str(time.strftime("%y%m%d%H%M%S")) ".png") print("拍摄成功!") except Exception as e: print("因某种原因,拍摄出错,错误代码:",e) else: if writing == True: writing = False else: writing = True video_ = cv2.VideoWriter( str(time.strftime("%y%m%d%H%M%S")) ".avi", cv2.VideoWriter_fourcc("M","P","4","2"), out_fps, size ) circled = ""

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复