How to remove watermark from text document using openCV python?

女生的网名这么多〃 提交于 2021-02-07 21:06:41

问题


image

I am new to OpenCV, I need help removing the watermark from this image, I tried using inpaint but I want a more automated way of feature mapping and inpainting, pls help me with it.


回答1:


If all your images are like this and have a watermark as shown in the question having a light gray watermark then a simple thresholding operation will work.

import cv2

img = cv2.imread('watermark.jpg')
_, thresh = cv2.threshold(img, 150, 255, cv2.THRESH_BINARY)
cv2.imshow('Result', thresh)
cv2.waitKey(0)
cv2.destroyAllWindows()

Let me know if this works for you



来源:https://stackoverflow.com/questions/63088442/how-to-remove-watermark-from-text-document-using-opencv-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!