摘要:
import cv2 as cv import numpy as np from matplotlib import pyplot as plt img = cv.imread("new.jpg") cv.rectangle(img,(1820,1390),(1888,1504),(0,0,255) 阅读全文
摘要:
import numpy as np import cv2 as cv #滑动条做调色板 def nothing(x): pass #创建一幅黑色图像 img = np.zeros((512,512,3),np.uint8) cv.namedWindow('img') ''' createTrack 阅读全文
摘要:
import numpy as np import cv2 as cv #鼠标双击画圆 def draw_cycle(event,x,y,flags,param): if event == cv.EVENT_LBUTTONDBLCLK: cv.circle(img,(x,y),100,(255,0, 阅读全文
摘要:
import numpy as np import cv2 as cv ''' numpy.zeros(shape, dtype=float, order='C') 参数: shape 整型或者整数序列,新数组的大小,比如 (2, 3) 或者 2. dtype 数据类型,可选参数,默认float, 阅读全文
摘要:
# -*- coding: utf-8 -*- import cv2 as cv import numpy as np ''' VideoCapture() 中参数为0:表示打开内置摄像头 参数为1:则打开外置摄像头 其他数字则代表其他设备 参数是视频文件的路径则打开指定路径下的视频文件 ''' # 阅读全文
摘要:
# -*- coding: utf-8 -*- import cv2 as cv import numpy as np from matplotlib import pyplot as plt #判断字符串是否是中文 def check_contain_chinese(check_str): for 阅读全文