使用opencv python消除收据图像中的噪音

时间:2019-10-20 16:26:57

标签: python image opencv filter

我有这张收据图片。我想消除噪音以改善  识别文本的能力。我正在使用opencv python

enter image description here

1 个答案:

答案 0 :(得分:0)

应该设置一个简单的阈值

enter image description here

import cv2

image = cv2.imread('3.png', 0)
thresh = cv2.threshold(image, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1]

cv2.imshow('thresh', thresh)
cv2.waitKey()