Removing background noisy lines from Captcha Image using PYTHON PIL

后端 未结 3 1580
庸人自扰
庸人自扰 2021-02-06 16:26

I have a processed captcha image(Enlarged) look like :
\"captcha\"

As you can see, the font-size of the \"TEXT\

3条回答
  •  难免孤独
    2021-02-06 17:16

    To quickly get rid of most of the lines, you can turn all black pixels with two or less adjacent black pixels white. That should fix the stray lines. Then, when you have a lot of "blocks" you can remove the smaller ones.

    This is assuming the sample image has been enlarged, and the lines are only one pixel wide.

提交回复
热议问题