问题
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