質問編集履歴
1
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,4 +4,35 @@
|
|
4
4
|
どうすれば直るでしょうか?
|
5
5
|
例えば色空間の設定など、検索する際のキーワードなどももらえると嬉しいです。
|
6
6
|
|
7
|
-
よろしくお願いいたします。
|
7
|
+
よろしくお願いいたします。
|
8
|
+
|
9
|
+
public class MainActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 {
|
10
|
+
|
11
|
+
カメラの表示処理
|
12
|
+
private CameraBridgeViewBase m_cameraView;
|
13
|
+
m_cameraView = findViewById(R.id.camera_view);
|
14
|
+
m_cameraView.setCvCameraViewListener(MainActivity.this);
|
15
|
+
m_cameraView.enableView();//カメラをアクティブに
|
16
|
+
|
17
|
+
カメラのレイアウト
|
18
|
+
<org.opencv.android.JavaCamera2View
|
19
|
+
android:id="@+id/camera_view"
|
20
|
+
android:layout_width="fill_parent"
|
21
|
+
android:layout_height="fill_parent"
|
22
|
+
android:layout_marginStart="0dp"
|
23
|
+
android:layout_marginTop="0dp"
|
24
|
+
android:layout_marginEnd="0dp"
|
25
|
+
android:layout_marginBottom="0dp"
|
26
|
+
android:visibility="visible"
|
27
|
+
app:camera_id="front"
|
28
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
29
|
+
app:layout_constraintEnd_toEndOf="parent"
|
30
|
+
app:layout_constraintStart_toStartOf="parent"
|
31
|
+
app:layout_constraintTop_toTopOf="parent"
|
32
|
+
app:show_fps="true" />
|
33
|
+
|
34
|
+
OpenCV:4.1.0
|
35
|
+
AndroidStudio:3.3.2
|
36
|
+
Windows 10 64-bit
|
37
|
+
Java
|
38
|
+
Android
|