【发布时间】:2022-01-07 07:20:31
【问题描述】:
【问题讨论】:
-
你可以使用Thresholding
标签: python opencv image-processing threshold
【问题讨论】:
标签: python opencv image-processing threshold
你需要使用Adaptive Gaussian Thresholding
import cv2
image1 = cv2.imread('Naw6P.png')
img = cv2.cvtColor(image1, cv2.COLOR_BGR2GRAY)
thresh = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
cv2.THRESH_BINARY, 51, 5)
cv2.imshow('Adaptive Gaussian', thresh)
cv2.waitKey(0)
【讨论】: