Line removal in image captcha using Python

前端 未结 1 510
半阙折子戏
半阙折子戏 2021-02-10 12:28

I had used this link - How to remove line from captcha completely and edited the code provided to remove lines from a dummy captcha that I have given below

1条回答
  •  时光说笑
    2021-02-10 13:16

    In this special case it seems density of lines is less than characters density. so by applying some thresholding methods you can remove line:

    For example the following line give you this:

    retval, image = cv2.threshold(image, 12, 255, cv2.THRESH_BINARY)

    later by applying some noise removal methods, like median (from your own code), you can get this result:

    0 讨论(0)
提交回复
热议问题