Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
41588c67
Commit
41588c67
authored
May 10, 2021
by
WenmuZhou
Browse files
Adapt to paddle lite 2.9
parent
224ed7ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
deploy/android_demo/app/build.gradle
deploy/android_demo/app/build.gradle
+1
-1
deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java
...ain/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java
+2
-2
No files found.
deploy/android_demo/app/build.gradle
View file @
41588c67
...
@@ -48,7 +48,7 @@ dependencies {
...
@@ -48,7 +48,7 @@ dependencies {
def
archives
=
[
def
archives
=
[
[
[
'src'
:
'https://paddleocr.bj.bcebos.com/dygraph_v2.0/lite/paddle_lite_libs_v2_
8
_0.gz'
,
'src'
:
'https://paddleocr.bj.bcebos.com/dygraph_v2.0/lite/paddle_lite_libs_v2_
9
_0.
tar.
gz'
,
'dest'
:
'PaddleLite'
'dest'
:
'PaddleLite'
],
],
[
[
...
...
deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java
View file @
41588c67
...
@@ -429,8 +429,8 @@ public class MainActivity extends AppCompatActivity {
...
@@ -429,8 +429,8 @@ public class MainActivity extends AppCompatActivity {
String
[]
proj
=
{
MediaStore
.
Images
.
Media
.
DATA
};
String
[]
proj
=
{
MediaStore
.
Images
.
Media
.
DATA
};
Cursor
cursor
=
managedQuery
(
uri
,
proj
,
null
,
null
,
null
);
Cursor
cursor
=
managedQuery
(
uri
,
proj
,
null
,
null
,
null
);
cursor
.
moveToFirst
();
cursor
.
moveToFirst
();
onImageChanged
(
image
);
if
(
image
!=
null
)
{
if
(
image
!=
null
)
{
// onImageChanged(image);
ivInputImage
.
setImageBitmap
(
image
);
ivInputImage
.
setImageBitmap
(
image
);
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -450,8 +450,8 @@ public class MainActivity extends AppCompatActivity {
...
@@ -450,8 +450,8 @@ public class MainActivity extends AppCompatActivity {
Log
.
i
(
TAG
,
"rotation "
+
orientation
);
Log
.
i
(
TAG
,
"rotation "
+
orientation
);
Bitmap
image
=
BitmapFactory
.
decodeFile
(
currentPhotoPath
);
Bitmap
image
=
BitmapFactory
.
decodeFile
(
currentPhotoPath
);
image
=
Utils
.
rotateBitmap
(
image
,
orientation
);
image
=
Utils
.
rotateBitmap
(
image
,
orientation
);
onImageChanged
(
image
);
if
(
image
!=
null
)
{
if
(
image
!=
null
)
{
// onImageChanged(image);
ivInputImage
.
setImageBitmap
(
image
);
ivInputImage
.
setImageBitmap
(
image
);
}
}
}
else
{
}
else
{
...
...
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