Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
雷紫添
xzxt-api-report
Commits
00d121f5
Commit
00d121f5
authored
Mar 04, 2021
by
雷紫添
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加影源ocr
parent
e3fb8ba0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
src/main/java/com/founder/util/OcrFounder.java
+2
-2
src/main/resources/application.yml
+4
-1
src/main/resources/static/ocrFounder.html
+1
-1
No files found.
src/main/java/com/founder/util/OcrFounder.java
View file @
00d121f5
...
@@ -14,8 +14,8 @@ import java.awt.image.*;
...
@@ -14,8 +14,8 @@ import java.awt.image.*;
import
java.io.*
;
import
java.io.*
;
@Component
@Component
public
class
OcrFounder
{
public
class
OcrFounder
{
private
static
String
dllPath
=
"
/opt
"
;
private
static
String
dllPath
=
"
D:\\ocr\\windows\\bin-x64
"
;
private
static
String
dllName
=
"
libwmreader.so"
;
//lunix 使用 libwmreader.so
private
static
String
dllName
=
"
wmreader.dll"
;
//lunix 使用 libwmreader.so
private
static
String
image
=
"D:\\ocr\\images\\img2.jpg"
;
private
static
String
image
=
"D:\\ocr\\images\\img2.jpg"
;
public
String
getOcrFounder
(
byte
[]
data
)
throws
Exception
{
public
String
getOcrFounder
(
byte
[]
data
)
throws
Exception
{
int
code
=
OcrUtil
.
init
(
dllPath
,
dllName
);
int
code
=
OcrUtil
.
init
(
dllPath
,
dllName
);
...
...
src/main/resources/application.yml
View file @
00d121f5
...
@@ -6,7 +6,10 @@ spring:
...
@@ -6,7 +6,10 @@ spring:
time-zone
:
GMT+8
time-zone
:
GMT+8
mvc
:
mvc
:
static-path-pattern
:
/**
static-path-pattern
:
/**
servlet
:
multipart
:
max-file-size
:
500MB
max-request-size
:
500MB
mybatis
:
mybatis
:
#type-aliases-package: com.founder.interservice.model
#type-aliases-package: com.founder.interservice.model
config-location
:
classpath:mybatis/mybatis-config.xml
config-location
:
classpath:mybatis/mybatis-config.xml
...
...
src/main/resources/static/ocrFounder.html
View file @
00d121f5
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
var
uploadInst
=
upload
.
render
({
var
uploadInst
=
upload
.
render
({
elem
:
'#test1'
elem
:
'#test1'
,
url
:
'/ocr/OcrFounder'
//改成您自己的上传接口
,
url
:
'/ocr/OcrFounder'
//改成您自己的上传接口
,
size
:
500
,
size
:
500
0000
,
before
:
function
(
obj
){
,
before
:
function
(
obj
){
//预读本地文件示例,不支持ie8
//预读本地文件示例,不支持ie8
/* var img = new Image();
/* var img = new Image();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment