简体   繁体   English

无法弄清楚如何从验证码中分割重叠的数字

[英]Can't figure out how to segment overlapped digits from captcha

i'm writing an application for solving captcha. 我正在写一个解决验证码的应用程序。 Original captcha looks like this: Original captcha 原始的验证码如下所示: 原始的验证码

After I apply erosion+dilation it looks like this: erosion+dilation applied 在我应用腐蚀+膨胀之后,它看起来像这样: 腐蚀+膨胀被应用

Finally I find contours for further segmentation. 最后,我找到轮廓进行进一步的分割。 Obviously, I can cut "1" from the image as it's not connected with other digits. 显然,我可以从图像中剪切“ 1”,因为它没有与其他数字相连。 But how can I separate 5 from 7, and 7 from 8, and two zeros on the right in this case? 但是,在这种情况下,如何将5与7分离,将7与8分离,并在右侧分离两个零? On the first link I see that 5 and 7 are not overlapped, this way i can somehow remember it and use after applying erosion+dilation. 在第一个链接上,我看到5和7没有重叠,这样我就可以以某种方式记住它并在应用腐蚀+膨胀后使用它。 Maybe drawing white vertical line. 也许画白色垂直线。 But still i have problems with 7 and 8. Any help and advises are appreciated! 但是我仍然对7和8有问题。不胜感激!

您需要的是一种称为骨架化的技术, https://en.wikipedia.org/wiki/Topological_skeleton在此特定情况下将有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM