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 — optimus code · ljd2000/EasyPR-Java@5f9d3ad

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .idea/libraries
    • javacpp.xml
    • javacv.xml
    • opencv.xml
    • opencv_windows_x86.xml
    • org_bytedeco_javacv_0_10.xml
  • EasyPR-Java.iml
  • src/org/easypr
    • core
      • CharsIdentify.java
      • Features.java
    • train
      • ANNTrain.java
      • SVMTrain.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.idea/libraries/javacpp.xml‎

Copy file name to clipboardExpand all lines: .idea/libraries/javacpp.xml
+9Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎.idea/libraries/javacv.xml‎

Copy file name to clipboardExpand all lines: .idea/libraries/javacv.xml
+9Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎.idea/libraries/opencv.xml‎

Copy file name to clipboardExpand all lines: .idea/libraries/opencv.xml
+9Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎.idea/libraries/opencv_windows_x86.xml‎

Copy file name to clipboardExpand all lines: .idea/libraries/opencv_windows_x86.xml
+10Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎.idea/libraries/org_bytedeco_javacv_0_10.xml‎

Copy file name to clipboardExpand all lines: .idea/libraries/org_bytedeco_javacv_0_10.xml
+5Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎EasyPR-Java.iml‎

Copy file name to clipboard
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module type="WEB_MODULE" version="4">
2+
<module type="JAVA_MODULE" version="4">
33
<component name="NewModuleRootManager" inherit-compiler-output="true">
44
<exclude-output />
55
<content url="file://$MODULE_DIR$">
66
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
77
</content>
88
<orderEntry type="inheritedJdk" />
99
<orderEntry type="sourceFolder" forTests="false" />
10-
<orderEntry type="library" name="org.bytedeco:javacv:0.10" level="project" />
10+
<orderEntry type="library" name="opencv-windows-x86" level="project" />
11+
<orderEntry type="library" name="opencv" level="project" />
12+
<orderEntry type="library" name="javacv" level="project" />
13+
<orderEntry type="library" name="javacpp" level="project" />
1114
</component>
1215
</module>
Collapse file

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

Copy file name to clipboardExpand all lines: src/org/easypr/core/CharsIdentify.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ public Mat features(final Mat in,int sizeData){
119119

120120
int j = 0;
121121
for(int i =0;i<vhist.cols();++i,++j){
122-
float val = (Float)MatHelper.getElement(vhist,i);
123-
MatHelper.setElement(out,val,j);
122+
byte []buffer = new byte[4];
123+
vhist.ptr(i).get(buffer);
124+
out.ptr(j).put(buffer);
124125
}
125126
for(int i =0;i<hhist.cols();++i,++j){
126-
float val = (Float)MatHelper.getElement(hhist,i);
127-
MatHelper.setElement(out,val,j);
127+
byte []buffer = new byte[4];
128+
hhist.ptr(i).get(buffer);
129+
out.ptr(j).put(buffer);
128130
}
129131
for(int x=0; x<lowData.cols(); x++)
130132
for(int y=0; y<lowData.rows(); y++,++j){
Collapse file

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

Copy file name to clipboardExpand all lines: src/org/easypr/core/Features.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ public Mat getTheFeatures(Mat in) {
6767
//Asign values to feature,样本特征为水平、垂直直方图
6868
int j = 0;
6969
for (int i = 0; i < vhist.cols(); i++, ++j) {
70-
float val = (Float) MatHelper.getElement(vhist, i);
71-
MatHelper.setElement(out, val, j);
70+
byte []buffer = new byte[4];
71+
vhist.ptr(i).get(buffer);
72+
out.ptr(j).put(buffer);
7273
}
7374
for (int i = 0; i < hhist.cols(); i++, ++j) {
74-
float val = (Float) MatHelper.getElement(hhist, i);
75-
MatHelper.setElement(out, val, j);
75+
byte []buffer = new byte[4];
76+
hhist.ptr(i).get(buffer);
77+
out.ptr(j).put(buffer);
7678
}
7779
return out;
7880
}
Collapse file

‎src/org/easypr/train/ANNTrain.java‎

Copy file name to clipboardExpand all lines: src/org/easypr/train/ANNTrain.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ public Mat features(Mat in, int sizeData) {
6262
//Asign values to feature,ANN的样本特征为水平、垂直直方图和低分辨率图像所组成的矢量
6363
int j = 0;
6464
for (int i = 0; i < vhist.cols(); i++, ++j) {
65-
float val = (Float) MatHelper.getElement(vhist, i);
66-
MatHelper.setElement(out, val, j);
65+
byte []buffer = new byte[4];
66+
vhist.ptr(i).get(buffer);
67+
out.ptr(j).put(buffer);
6768
}
6869
for (int i = 0; i < hhist.cols(); i++, ++j) {
69-
float val = (Float) MatHelper.getElement(hhist, i);
70-
MatHelper.setElement(out, val, j);
70+
byte []buffer = new byte[4];
71+
hhist.ptr(i).get(buffer);
72+
out.ptr(j).put(buffer);
7173
}
7274
for (int x = 0; x < lowData.cols(); x++) {
7375
for (int y = 0; y < lowData.rows(); y++, ++j) {
Collapse file

‎src/org/easypr/train/SVMTrain.java‎

Copy file name to clipboardExpand all lines: src/org/easypr/train/SVMTrain.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.easypr.train;
22

33

4-
import org.bytedeco.javacpp.opencv_core;
54
import org.easypr.core.Features;
65
import org.easypr.util.MatHelper;
76
import org.easypr.core.SVMCallback;
@@ -14,8 +13,9 @@
1413

1514
import java.util.*;
1615

17-
/**
18-
* Created by Anonymous on 2015-03-17.
16+
/*
17+
* Created by fanwenjie
18+
* @version 1.1
1919
*/
2020
public class SVMTrain {
2121

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.