|
|
@@ -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))); |