def edgedetect(channel):
sobelx = cv2.Sobel(channel, cv2.CV_16S, 1, 0, ksize=3)
sobely = cv2.Sobel(channel, cv2.CV_16S, 0, 1, ksize=3)
sobel = np.hypot(sobelx, sobely)
sobel[sobel > 255] = 255
return sobel
评论列表
文章目录