java - 为本地车牌本地化 JavaAnpr

标签 java automatic-license-plate-recognition

我正在使用 JavaAnpr自动识别车牌。虽然它适用于欧洲车牌,但不适用于我的国家。例如;

License plate from my country

我如何编辑资源文件和语法 XML 以支持其他国家/地区?

最佳答案

@michel_layyous - 这是作者的文档。阅读第 57 页: http://javaanpr.sourceforge.net/anpr.pdf

syntax.xml 本质上是一个正则表达式文件。

以本页为例: https://code.google.com/p/android-anpr/source/browse/trunk/res/raw/syntax.xml?r=21

<type name="russia">
   <char content="abcehkmoptxy"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
   <char content="abcehkmoptxy"/>  
   <char content="abcehkmoptxy"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
</type>

此俄罗斯车牌图案为 8 个字符。第一个字符可以是这些字母中的任何一个。接下来的 3 个字符可以是它们各自集合中的任意数字。接下来的 2 个字符可以是它们各自集合中的任何字母,最后 2 个字符可以是它们各自集合中的任何字母。

下一个俄罗斯车牌就像第一个俄罗斯车牌,除了一个关键区别:

<type name="russia2">
   <char content="abcehkmoptxy"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
   <char content="abcehkmoptxy"/>  
   <char content="abcehkmoptxy"/>
   <char content="012"/>
   <char content="0123456789"/>
   <char content="0123456789"/>
</type>

第 6 个字符只能是 0、1 或 2。

我还在此页面上找到了相关的简介: http://www.mp3car.com/software-and-software-development/124529-automatic-number-plate-recognition-anpr-3.html

我为您的国家/地区找到了一个非常相似的车牌,但它由两行组成。前两个数字在顶行,底行有 5 个数字。看起来您所在的国家/地区有 7 位数的特定样式的盘子。我不知道点如何影响识别您的车牌,但是,作者文档的第 58 页指出:

The correction of a plate means the replacement of each invalid character by another one. If the character ( ) i p at the i th position of the plate P does not match the selected pattern ( ) ` sel P , it will be replaced by the first valid one from ( ) s y . ( ) s y is a sorted vector of output activities denoting how much the recognized character is similar to an individual character from the alphabet. Heuristic analysis of a segmented plate can sometim es incorrectly evaluate non-character elements as characters. Acceptance of the non-chara cter elements causes that the recognized plate will contain redundant characters. Redundant characters occur usually on sides of the plate, but rarely in the middle. If the recognized plate number is longer than the l ongest syntax pattern, we can select the nearest pattern, and drop the redundant characters according to it.

关于java - 为本地车牌本地化 JavaAnpr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15596684/

相关文章:

java - IntelliJ Idea "entry point annotations"设置保存在哪里?

java - 如何从 Maven Checkstyle 插件检查中排除源根目录中的文件?

java - 如何从 RSA Privatekey.pem 文件中获取 java.security.PrivateKey 对象?

java - 当鼠标悬停在JavaFX中的按钮上时如何创建节点(圆形)?

image - 如何从图像中识别车辆牌照/车牌(ANPR)?

Python JSON 对象必须是 str,而不是 'tuple'

java - OS X 上的 JVM 总是以状态 0 退出(如 Bash 脚本中捕获的那样)?

OpenCV 颜色浓度直方图

image - 从车牌上删除多余的像素/线

针对不同格式车牌的 JavaANPR 训练