
OpenCV
John的IT之旅
有梦想谁都了不起!
展开
-
python-opencv 形态学操作
import cv2import numpy as npimg = cv2.imread('images/1.png', 0)kenel = np.ones((5, 5), np.uint8)erosion = cv2.erode(img, kenel, iterations=1) # 腐蚀res = np.hstack((img, erosion))kenel1 = np....原创 2020-03-11 14:17:40 · 209 阅读 · 0 评论 -
python-OpenCV 调用摄像头
import cv2import numpy as npvc = cv2.VideoCapture(0)if vc.isOpened(): opened, frame = vc.read()else: opened = Falsewhile opened: ret, frame = vc.read() if frame is None: ...原创 2020-03-10 17:48:42 · 184 阅读 · 0 评论 -
python OpenCV实现调整画面的HSV
OpenCV 调整得到想要的颜色import cv2import numpy as npcap = cv2.VideoCapture(0)#打开摄像头pic=np.zeros((480, 640, 3),dtype=np.uint8)def nothing(): passcv2.namedWindow("HSV",0)cv2.resizeWindow("HSV",50...原创 2020-01-07 10:46:40 · 2122 阅读 · 0 评论 -
基于Python OpenCV的单目标轮廓匹配
python opencv 实现单目标餐盘轮廓识别import cv2import numpy as npdef template(template): temp = cv2.imread(template, 0) # temp_gray = cv2.cvtColor(temp, cv2.COLOR_BGR2GRAY) _, temp_thresh = cv...原创 2020-01-03 10:12:09 · 1872 阅读 · 1 评论