Home  >  Q&A  >  body text

python - 去除验证码干扰线用什么算法好

去除诸如以上验证码干扰线,采用 灰度图 → rof算法 → ImageEnhance.Sharpness → 二值图 产生如下效果

部分孤立噪点难以去除干净,这也对tesseract的识别产生影响,上面的方式只有30%识别率。

大家讲道理大家讲道理2742 days ago928

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:53:25

    For this kind of verification code:
    1. The interference line is thin, only about 1px-2px
    2. The font is thicker than the interference line

    You can filter points like this after binarization:
    1. There are less than 2 1 points among the 8 surrounding points

    reply
    0
  • Cancelreply