Adjusted some values in xml and video detector for showcase
This commit is contained in:
parent
fdb0036ea6
commit
569bd43163
@ -34,7 +34,7 @@ public class VideoDetector {
|
||||
// Preview Camera Image
|
||||
private PreviewView previewView = null;
|
||||
// Check Violation
|
||||
private final float DELTA_LUMINOSITY_THRESHOLD = 0.3f;
|
||||
private final float DELTA_LUMINOSITY_THRESHOLD = 1.5f;
|
||||
private Float previousLuminosity = null;
|
||||
// On Detection Listener
|
||||
private OnDetectionListener listener;
|
||||
@ -173,7 +173,7 @@ public class VideoDetector {
|
||||
private void checkForViolation(float luminosity, float previousLuminosity) {
|
||||
float deltaLuminosity = Math.abs(luminosity - previousLuminosity);
|
||||
if (deltaLuminosity > DELTA_LUMINOSITY_THRESHOLD) {
|
||||
reportViolation(deltaLuminosity);
|
||||
reportViolation(luminosity);
|
||||
Log.d("Violation", "Violation");
|
||||
}
|
||||
Log.d("Delta", String.valueOf(Math.abs(previousLuminosity - luminosity)));
|
||||
|
@ -14,6 +14,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
Loading…
x
Reference in New Issue
Block a user