bk_video #4

Manually merged
kohlerba68671 merged 30 commits from bk_video into master 2023-06-02 15:51:57 +00:00
Showing only changes of commit 9fce3be6a8 - Show all commits

View File

@ -21,11 +21,6 @@ import com.example.ueberwachungssystem.VideoDetection.VideoDetector;
public class MainActivity extends AppCompatActivity {
private static final int CAMERA_PERMISSION_REQUEST_CODE = 101;
private PreviewView previewView;
private TextView textView;
private ToggleButton toggleButton;
private Boolean cameraPreviewIsRunning = false;
private Boolean isPressed = false;
@Override
@ -33,16 +28,15 @@ public class MainActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = findViewById(R.id.textView);
previewView = findViewById(R.id.previewView);
toggleButton = findViewById(R.id.previewButton);
TextView textView = findViewById(R.id.textView);
PreviewView previewView = findViewById(R.id.previewView);
VideoDetector vd = new VideoDetector(this);
vd.setPreviewView(previewView);
vd.setOnDetectionListener(new VideoDetector.OnDetectionListener() {
@Override
public void onDetection(DetectionReport detectionReport) {
public void onDetection(@NonNull DetectionReport detectionReport) {
detectionReport.log("OnDetection");
textView.setText(detectionReport.toString());
}
@ -50,6 +44,7 @@ public class MainActivity extends AppCompatActivity {
//vd.startDetection();
ToggleButton toggleButton = findViewById(R.id.previewButton);
toggleButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {