[ad_1]
Hi team, If I remove image background(watermark) from Driving Licence , in that case the ID was removed from that remove.How can I get ID of the Driving Licence.Could anyone please help me on this.
我尝试过的:
import cv2 import numpy as np src = cv2.imread("D:/python_code/opencv-text-recognition/images/DL18.jpg") gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) #remove background alpha = 3.0 beta = -200 new = alpha * gray + beta new = np.clip(new, 0, 255).astype(np.uint8) blur = cv2.GaussianBlur(new, (3, 3), 0) th1 = cv2.adaptiveThreshold(blur, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 11, 2) #Denoising dst = cv2.fastNlMeansDenoising(blur, None, 3, 7, 21) cv2.imshow("OUTPUT", dst) k = cv2.waitKey(0) if k == 27: # wait for ESC key to exit, ESC represented as ASCII code 27 in decimal cv2.destroyAllWindows() elif k == ord('s'): # wait for 's' key to save and exit cv2.imwrite("D:/python_code/opencv-text-recognition/images/OUTPUT.jpg",dst) cv2.destroyAllWindows()
解决方案1
水印是众多安全功能之一,可确保所提供的文档真实、合法,并提及出示文档的人。 删除、更改或损坏这些安全功能中的任何一项都会导致整个文档无效并将被拒绝。
您无法从无效文档中获取 ID,因此您邪恶的小计划(无论它是什么)将无法实现。
解决方案2
请问如何去除图片中的水图
[ad_2]
コメント