摘要: img = cv.imread()kernel = np.ones((5,5),np.uint8)imgGray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)imgBlur = cv.GaussianBlur(imgGray,(7,7),1)imgCanny = cv.C 阅读全文
posted @ 2021-02-14 23:30 whatareyougiao 阅读(74) 评论(0) 推荐(0)
摘要: import cv2 as cvfrom chapter4 import stackImagesfaceCascade = cv.CascadeClassifier(r"data/haarcascade_frontalface_default.xml")frameWidth = 640frameHe 阅读全文
posted @ 2021-02-11 03:20 whatareyougiao 阅读(49) 评论(0) 推荐(0)
摘要: def getContours(img): contours, hierarchy = cv.findContours(img, cv.RETR_EXTERNAL, cv.CHAIN_APPROX_NONE) for cnt in contours: area = cv.contourArea(cn 阅读全文
posted @ 2021-02-11 03:16 whatareyougiao 阅读(107) 评论(0) 推荐(0)
摘要: def stackImages(scale,imgArray): rows = len(imgArray) cols = len(imgArray[0]) rowsAvailable = isinstance(imgArray[0], list) width = imgArray[0][0].sha 阅读全文
posted @ 2021-02-11 03:11 whatareyougiao 阅读(63) 评论(0) 推荐(0)
摘要: import cv2 as cvimport numpy as npimg = cv.imread(r"image/pk.jpeg")width,height = (250,350)pts1 = np.float32([[670,45],[985,190],[460,500],[770,635]]) 阅读全文
posted @ 2021-02-11 03:09 whatareyougiao 阅读(98) 评论(0) 推荐(0)
摘要: import cv2 as cvimport numpy as npimport matplotlib.pyplot as pltframeWidth = 640frameHeight = 480cap = cv.VideoCapture(0)cap.set(3,frameWidth)cap.set 阅读全文
posted @ 2021-02-11 03:06 whatareyougiao 阅读(31) 评论(0) 推荐(0)