车牌颜色代码/GetPixel 方法
我正在用 C# 开发一个车牌识别程序。 此时我需要车牌的ARGB颜色代码,这就完成了,我需要车牌字母/数字的ARGB代码。我使用GetPixel方法获取车牌的ARGB代码,问题是文字位置不标准。
我有车牌边缘的 x 和 y 值,这就是我找到车牌本身的 ARGB 代码的方法。
顺便说一句:这部分对于实际查找车牌中的文本来说并不是必需的,但它是我们程序获取 ARGB 代码的一部分。
I'm working on a License Plate Recognition program in C#.
On this moment I need the ARGB color code of the license plate, which is done, and I need the ARGB code of the letters/numbers of the license plate. I used the GetPixel method to get the ARGB code of the license plate, the problem is the text has not a standard position.
I have the x and y values of the edges of the license plate, that's how I found the ARGB code of the license plate itself.
BTW: this part is not necessary to actually find the text in the license plate, but its a part of our program to obtain the ARGB codes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能不应该帮助你。这可能是为了让系统自动从其中一台间谍摄像机发送交通罚单。
但与我更好的判断相反:您将必须扫描图像以查找颜色之间的过渡。没有直接的方法可以找到字母和数字出现在图像中的位置。即使车牌是严格规则的,我怀疑它们总是完全居中,从图像中相同的放大倍数和角度来看。所以你必须从边缘开始寻找颜色变化的地方。当然,阴影、污垢等可能会混淆这样的算法。
其他人已经在各种 OCR 程序中解决了这个问题。您可能会寻找现有的解决方案,而不是重新发明它。
I probably shouldn't help you. This is probably for a system to automatically send out traffic tickets from one of those spy cameras.
But against my better judgement: You're going to have to scan the image for transitions between colors. There's no direct way to find where the letters and numbers appear in the image. Even if license plates were strictly regular, I doubt they are always perfectly centered, from the same magnification and angle in your images. So you're going to have to start from the edges and look for where the color changes. Of course shadows, dirt, etc could confuse such an algorithm.
Other people have solved this problem already in various OCR programs. You might look for an existing solution rather than re-inventing it.