摘要: import cv2 as cv import numpy as np # 数组操作 def access_pixlex(image): print('返回一个元组',image.shape) height = image.shape[0] width = image.shape[1] channe 阅读全文
posted @ 2021-08-11 17:51 索匣 阅读(198) 评论(0) 推荐(0) 编辑
摘要: import cv2 as cv # 打开摄像头获取图片 def video_demo(): # 打开摄像头,0代表的是设备id # 如果有多个摄像头,可以设置其他数值 # VideoCapture打开摄像头 capture = cv.VideoCapture(0) while True: # # 阅读全文
posted @ 2021-08-11 17:49 索匣 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 导入所需要的库 import cv2 as cv import numpy as np as cv就是cv2,为啥这么写,我也不知,很多人都是这样简写的 输出图片属性 type(image)显示图片类型numpy类型的数组 image.shapeshape会返回tuple元组,第一个元素表示矩阵行数 阅读全文
posted @ 2021-08-11 17:48 索匣 阅读(63) 评论(0) 推荐(0) 编辑