Skip to content

Commit

Permalink
optimus code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan Wen Jie committed Mar 18, 2015
1 parent 5e64055 commit 102547f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
12 changes: 7 additions & 5 deletions src/org/easypr/core/PlateLocate.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
import static org.bytedeco.javacpp.opencv_highgui.*;
import static org.bytedeco.javacpp.opencv_imgproc.*;

/**
* Created by fanwenjie on 15/3/16.
/*
* Created by fanwenjie
* @version 1.1
*/

public class PlateLocate {

public PlateLocate()
Expand Down Expand Up @@ -69,8 +71,8 @@ public boolean verifySizes(RotatedRect mr)
float rmax= aspect+aspect*error;

int area= (int)(mr.size().height() * mr.size().width());
float r = (float)mr.size().width() / (float)mr.size().height();
if(r < 1) r= (float)mr.size().height() / (float)mr.size().width();
float r = mr.size().width() / mr.size().height();
if(r < 1) r= mr.size().height() / mr.size().width();
return area >= min && area <= max && r >= rmin && r <= rmax;
}

Expand Down Expand Up @@ -230,7 +232,7 @@ public int plateLocate(Mat src, MatVector resultVec)
line( result, rect_points[j], rect_points[(j+1)%4], new Scalar(0,255,255,255), 1, 8 ,0);
}*/

float r = (float)minRect.size().width() / (float)minRect.size().height();
float r = minRect.size().width() / minRect.size().height();
float angle = minRect.angle();
Size rect_size = new Size((int)minRect.size().width(),(int)minRect.size().height());
if (r < 1)
Expand Down
6 changes: 4 additions & 2 deletions src/org/easypr/core/PlateRecognize.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

import java.util.Vector;

/**
* Created by Anonymous on 2015-03-17.
/*
* Created by fanwenjie
* @version 1.1
*/

public class PlateRecognize {

public int plateRecognize(Mat src, Vector<String> licenseVec) {
Expand Down
6 changes: 4 additions & 2 deletions src/org/easypr/core/SVMCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import org.bytedeco.javacpp.opencv_core.Mat;

/**
* Created by Anonymous on 2015-03-17.
/*
* Created by fanwenjie
* @version 1.1
*/

public interface SVMCallback {

/***
Expand Down
6 changes: 4 additions & 2 deletions src/org/easypr/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import java.io.File;
import java.util.Vector;

/**
* Created by Anonymous on 2015-03-17.
/*
* Created by fanwenjie
* @version 1.1
*/

public class Util {

public static void getFiles(File dir,Vector<String> files){
Expand Down

0 comments on commit 102547f

Please sign in to comment.