|
|
|
|
|
|
|
|
import android.util.Log; |
|
|
import android.util.Log; |
|
|
import android.view.View; |
|
|
import android.view.View; |
|
|
import android.widget.ImageView; |
|
|
import android.widget.ImageView; |
|
|
|
|
|
import android.widget.TextView; |
|
|
import android.widget.ToggleButton; |
|
|
import android.widget.ToggleButton; |
|
|
|
|
|
|
|
|
import com.example.ueberwachungssystem.Detection.DetectionReport; |
|
|
import com.example.ueberwachungssystem.Detection.DetectionReport; |
|
|
import com.example.ueberwachungssystem.Detection.Detector; |
|
|
import com.example.ueberwachungssystem.Detection.Detector; |
|
|
import com.example.ueberwachungssystem.Detection.VideoDetector; |
|
|
import com.example.ueberwachungssystem.Detection.VideoDetector; |
|
|
|
|
|
import com.example.ueberwachungssystem.logger.Logger; |
|
|
|
|
|
import com.jjoe64.graphview.GraphView; |
|
|
|
|
|
|
|
|
@ExperimentalGetImage |
|
|
@ExperimentalGetImage |
|
|
public class MainActivity extends AppCompatActivity { |
|
|
public class MainActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
|
PreviewView previewView = findViewById(R.id.previewView); |
|
|
PreviewView previewView = findViewById(R.id.previewView); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Mic stuff |
|
|
|
|
|
TextView textView= (TextView) findViewById(R.id.textView); //Set textview for showing logged content |
|
|
|
|
|
Logger logger = new Logger(this.getClass().getSimpleName(), textView, ""); |
|
|
|
|
|
GraphView graph = (GraphView) findViewById(R.id.graph); |
|
|
|
|
|
MicrophoneDetector mic = new MicrophoneDetector(this, logger, graph); |
|
|
|
|
|
mic.startDetection(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// video Stuff |
|
|
VideoDetector vd = new VideoDetector(this); |
|
|
VideoDetector vd = new VideoDetector(this); |
|
|
//vd.setPreviewView(previewView); |
|
|
//vd.setPreviewView(previewView); |
|
|
vd.debugProcessing(inputImageView, outputImageView); |
|
|
vd.debugProcessing(inputImageView, outputImageView); |