def Bin(data):
# ????????? ????? ??? = retval2, thres = cv2.threshold(data, 50,70,cv2.THRESH_BINARY) thres = cv2.blur(thres, (50, 50))
# ????????? ???????? =
# retval2, thres = cv2.threshold(data,240,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
# thres =cv2.adaptiveThreshold(data, 255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 0)
retval2, thres = cv2.threshold(data, 120,127,cv2.THRESH_BINARY)
# thres = cv2.blur(thres, (50, 50))
return thres
评论列表
文章目录