图像 OCR - 过滤不需要的数据

发布于 2024-10-18 05:51:54 字数 713 浏览 2 评论 0原文

基本上,我正在使用 tessract OCR 读取车辆牌照,然而,尽管能够通过改变对比度、减少噪音等轻松地强调文本,但车辆的某些“部分”仍然保留在图像上,这确实会导致 OCR 出错结果。

例如:

在此处输入图像描述

我可以很容易地更改它,例如:

在此处输入图像描述

我希望消除每个板的边缘,这是另一个示例:

在此处输入图像描述

我可以使用像素操作算法删除边缘,但我认为这不是正确的方法,并且会导致很多问题。

我一直在使用以下应用程序来测试各种方法,例如形态学和消除不需要的数据,到目前为止我还没有成功。

http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab。 aspx

然而,了解这一点的人可以使用上面文章中的应用程序来实现我正在尝试的目标,所以请随意尝试一下。

谢谢

Basically I'm reading vehicle license plates using tessract OCR, however despite being able to emphasise text easily enough via changing contrast, reducing noise an so on, some 'parts' of the vehicle remain on the image which does cause the OCR to throw bad results.

For example take:

enter image description here

I can change this easily enough, such as:

enter image description here

I'm looking to eliminate the edges off each plate, here's another example:

enter image description here

I could remove the edges using pixel manipulation algorithm, however I don't feel it's the right method, and would cause quite a lot of problems.

I've been using the following application to test various methods such as morphology and eliminating the unwanted data, so far I haven't been successful.

http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx

However someone with knowledge of this could use the application on the article above to achieve want I'm trying, so feel free to give it a try.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天涯离梦残月幽梦 2024-10-25 05:51:54

请尝试使用笔画宽度变换概念。

这个概念用于从自然图像中分割文本......

Please try to use stroke width transformation concept.

This concept use to segment text from natural images.....

梦屿孤独相伴 2024-10-25 05:51:54

我已经做了这样的算法。我只能说效果很好。秘密在于,您需要知道光线可能仅来自一侧。您不能仅使用一个阈值将图像设置为“黑/白”。

检测图像各部分的平均亮度,并使用此亮度计算来设置每个区域的阈值。

例如,如果左上角较亮,则需要较低的阈值来使这些部分不那么亮。而如果右下角光线较弱,则需要将阈值设置得更高,才能接收到所有现有的光线信息。

然后,您只需使用以下方法从两侧驱动到图像:

IsPixelAboveThreshold ?

如果它在下面,则您位于边界上,如果它在上面,您可以说您位于图像的中间,亮度更高。

问候

I already did such an algorithm. I just can say that it works great. The secret is, that you need to know that the light is coming just from one side perhaps. You cannot set the image to "black/white" just by using ONE threshold.

Detect the average luminance of parts of the image and use this luminance calculation to set the threshold for each region.

For example, if the left top is lighter, you need a lower threshold to make these parts not to bright. And if the bottom right has low light, you need to set the threshold higher to receive all existing light information.

Then, you need just to drive into the image from each side by using the method:

IsPixelAboveThreshold ?

If it is below, you are on the border, if it is above, you can say you are on the middle of the image with more brightness.

Regards

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文