Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
seo young Joung
opencv
Commits
9ee60dbf
Commit
9ee60dbf
authored
8 years ago
by
Alexander Alekhin
Browse files
Options
Download
Plain Diff
Merge pull request #8963 from likan999:fix-java-camera-view
parents
b991665b
74127d44
4.x
3.4
5.x
master
next
4.5.5
4.5.4
4.5.3
4.5.3-openvino
4.5.3-openvino-2021.4.2
4.5.3-openvino-2021.4.1
4.5.2
4.5.2-openvino
4.5.1
4.5.1-openvino
4.5.0
4.5.0-openvino
4.4.0
4.4.0-openvino
4.3.0
4.3.0-openvino
4.3.0-openvino-2020.3.0
4.2.0
4.2.0-openvino
4.1.2
4.1.2-openvino
4.1.1
4.1.1-openvino
4.1.0
4.1.0-openvino
4.0.1
4.0.1-openvino
4.0.0
4.0.0-rc
4.0.0-openvino
4.0.0-beta
4.0.0-alpha
3.4.17
3.4.16
3.4.15
3.4.14
3.4.13
3.4.12
3.4.11
3.4.10
3.4.9
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.3-openvino
3.4.2
3.4.2-openvino
3.4.1
3.4.1-cvsdk
3.4.0
3.4.0-rc
3.3.1
3.3.1-cvsdk
3.3.0
3.3.0-rc
3.3.0-cvsdk
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/java/generator/src/java/android+JavaCameraView.java
+8
-1
modules/java/generator/src/java/android+JavaCameraView.java
with
8 additions
and
1 deletion
+8
-1
modules/java/generator/src/java/android+JavaCameraView.java
View file @
9ee60dbf
...
...
@@ -147,7 +147,14 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
Size
frameSize
=
calculateCameraFrameSize
(
sizes
,
new
JavaCameraSizeAccessor
(),
width
,
height
);
/* Image format NV21 causes issues in the Android emulators */
if
(
Build
.
BRAND
.
equalsIgnoreCase
(
"generic"
)
||
Build
.
BRAND
.
equalsIgnoreCase
(
"Android"
))
if
(
Build
.
FINGERPRINT
.
startsWith
(
"generic"
)
||
Build
.
FINGERPRINT
.
startsWith
(
"unknown"
)
||
Build
.
MODEL
.
contains
(
"google_sdk"
)
||
Build
.
MODEL
.
contains
(
"Emulator"
)
||
Build
.
MODEL
.
contains
(
"Android SDK built for x86"
)
||
Build
.
MANUFACTURER
.
contains
(
"Genymotion"
)
||
(
Build
.
BRAND
.
startsWith
(
"generic"
)
&&
Build
.
DEVICE
.
startsWith
(
"generic"
))
||
"google_sdk"
.
equals
(
Build
.
PRODUCT
))
params
.
setPreviewFormat
(
ImageFormat
.
YV12
);
// "generic" or "android" = android emulator
else
params
.
setPreviewFormat
(
ImageFormat
.
NV21
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help