如何使用openCV python从文本文档中删除水印? [英] How to remove watermark from text document using openCV python?

查看:78
本文介绍了如何使用openCV python从文本文档中删除水印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是OpenCV的新手,我需要帮助从该图像中删除水印,我尝试使用了inpaint,但我想使用一种更自动化的特征映射和修复方法,请帮忙解决它.

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.

推荐答案

如果您的所有图像都是这样,并且如问题中所示的带有水印的水印带有浅灰色水印,则可以使用简单的阈值操作.

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

这篇关于如何使用openCV python从文本文档中删除水印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆