我想在我的java项目中使用openalpr。我必须包含哪些内容才能使用API?必须在Eclipse或Netbeans的项目属性中导入哪些库?
我找到了解决方案
启动main.java
java -classpath java Main "us" "openalpr.conf" "runtime_data" "samples/us-1.jpg"
答案 0 :(得分:1)
`
Alpr alpr = new Alpr("us", "/path/to/openalpr.conf", "/path/to/runtime_data");
// Set top N candidates returned to 20
alpr.setTopN(20);
// Set pattern to Maryland
alpr.setDefaultRegion("md");
AlprResults results = alpr.recognize("/path/to/image.jpg");
System.out.format(" %-15s%-8s\n", "Plate Number", "Confidence");
for (AlprPlateResult result : results.getPlates())
{
for (AlprPlate plate : result.getTopNPlates()) {
if (plate.isMatchesTemplate())
System.out.print(" * ");
else
System.out.print(" - ");
System.out.format("%-15s%-8f\n", plate.getCharacters(), plate.getOverallConfidence());
}
}