2020
10-08
10-08
Python OpenCV去除字母后面的杂线操作
原图代码src=cv2.imread("28.png")gray_src=cv2.cvtColor(src,cv2.COLOR_BGR2GRAY)#cv2.imshow("inputimage",src)#cv2.imshow("grayimage",gray_src)#cv2.waitKey(0)gray_src=cv2.bitwise_not(gray_src)#二值化binary_src=cv2.adaptiveThreshold(gray_src,255,cv2.ADAPTIVE_THRESH_MEAN_C,cv2.THRESH_BINARY,15,-2)cv2.namedWindow("resultimage",cv2.WINDOW_AUTOSIZE)cv2.imshow("result...
继续阅读 >