GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix bug · ljd2000/EasyPR-Java@0114df4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • Main.java
    • org/easypr
      • core
        • CharsSegment.java
      • test
        • Test.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Main.java‎

Copy file name to clipboardExpand all lines: src/Main.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
public class Main {
1212

1313
public static void main(String[] args) {
14-
Test.plateDetect();
14+
Test.charsRecognise();
1515
}
1616
}
Collapse file

‎src/org/easypr/core/CharsSegment.java‎

Copy file name to clipboardExpand all lines: src/org/easypr/core/CharsSegment.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int SortRect(final Vector<Rect> vecRect, Vector<Rect> out) {
358358
for (int i = 0; i < xpositions.size(); ++i) {
359359
min = xpositions.get(i);
360360
minIdx = i;
361-
for (int j = i; i < xpositions.size(); ++j) {
361+
for (int j = i; j < xpositions.size(); ++j) {
362362
if (xpositions.get(j) < min) {
363363
min = xpositions.get(j);
364364
minIdx = j;
Collapse file

‎src/org/easypr/test/Test.java‎

Copy file name to clipboardExpand all lines: src/org/easypr/test/Test.java
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.easypr.test;
22

3+
import org.easypr.core.CharsRecognise;
34
import org.easypr.core.PlateDetect;
45

56
import java.util.Vector;
@@ -21,7 +22,7 @@ public static void plateDetect(){
2122
PlateDetect plateDetect = new PlateDetect();
2223
plateDetect.setPDLifemode(true);
2324
Vector<Mat> matVector = new Vector<Mat>();
24-
plateDetect.plateDetect(src,matVector);
25+
plateDetect.plateDetect(src, matVector);
2526
if(0==plateDetect.plateDetect(src,matVector)){
2627
long num = matVector.size();
2728
for(int i=0;i<num;++i){
@@ -33,4 +34,15 @@ public static void plateDetect(){
3334
}
3435
}
3536

37+
public static String charsRecognise(){
38+
String imgPath = "res/image/chars_recognise.jpg";
39+
System.out.println("test_chars_recognise");
40+
Mat src = imread(imgPath);
41+
CharsRecognise cr = new CharsRecognise();
42+
String result = cr.charsRecognise(src);
43+
System.out.println("charsRecognise: "+result);
44+
45+
return result;
46+
}
47+
3648
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.