Version 4.2 with num for counter Detections
This commit is contained in:
parent
5007623acc
commit
ff12f986c7
@ -42,7 +42,6 @@ public class DetectorService extends LifecycleService {
|
||||
|
||||
/** Wifi Instanz **/
|
||||
wifiCommunication = new WifiCommunication(1234);
|
||||
wifiCommunication.sendTrue("TEst");
|
||||
|
||||
wifiCommunication.setOnConnectionListener(new WifiCommunication.OnConnectionListener() {
|
||||
@Override
|
||||
|
@ -34,12 +34,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
ImageView inputImageView;
|
||||
ImageView outputImageView;
|
||||
ToggleButton toggleButton;
|
||||
int num=0;
|
||||
|
||||
int num;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
setTitle("Super Ueberwachung");
|
||||
|
||||
inputImageView = findViewById(R.id.inputImageView);
|
||||
outputImageView = findViewById(R.id.outputImageView);
|
||||
@ -134,13 +136,17 @@ public class MainActivity extends AppCompatActivity {
|
||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
DetectorService.ServiceBinder binder = (DetectorService.ServiceBinder) service;
|
||||
detectorService = binder.getBoundService();
|
||||
detectorService.videoDetector.debugProcessing(null, outputImageView); //inputImageView
|
||||
detectorService.videoDetector.debugProcessing(inputImageView, outputImageView); //inputImageView
|
||||
|
||||
detectorService.setOnDetectionListener(new DetectorService.OnDetectionListener() {
|
||||
@Override
|
||||
public void onDetection(@NonNull StringBuffer stringBuffer) {
|
||||
Log.d("onDetection", stringBuffer.toString()); //Für oli hier Textview einbauen
|
||||
num++;
|
||||
|
||||
num = stringBuffer.toString().split("\n").length;
|
||||
//Log.d("num", String.valueOf(num));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user