package com.kofax.kmc.ken.engines; import android.graphics.Bitmap; import com.kofax.android.abc.machine_vision.GlareDetector; import com.kofax.kmc.ken.engines.data.QuickAnalysisSettings; import java.util.Locale; /* loaded from: classes3.dex */ class j implements IGlareDetector { private final GlareDetector bJ = new GlareDetector(); static { System.loadLibrary("a1ac4"); System.loadLibrary("ee77d4"); System.loadLibrary("d8b3e6"); System.loadLibrary("b2681f"); } @Override // com.kofax.kmc.ken.engines.IGlareDetector public boolean detectGlare(QuickAnalysisSettings quickAnalysisSettings, Bitmap bitmap) { boolean z; if (!quickAnalysisSettings.getGlareDetection()) { return false; } synchronized (this.bJ) { this.bJ.loadConfigurationString(a(quickAnalysisSettings.getGlareDetectionIntensityFraction(), quickAnalysisSettings.getGlareDetectionIntensityThreshold(), quickAnalysisSettings.getGlareDetectionMinimumGlareAreaFraction(), quickAnalysisSettings.getGlareDetectionNumberOfTiles()), "DocumentDetection.GlareDetection"); this.bJ.grabImageFrame(bitmap); double detectGlare = this.bJ.detectGlare(); this.bJ.releaseFrame(); z = detectGlare >= quickAnalysisSettings.getGlareDetectedThreshold(); } return z; } protected void finalize() throws Throwable { this.bJ.dispose(); super.finalize(); } private String a(double d, int i, double d2, int i2) { return String.format(Locale.US, "
", Double.valueOf(d), Integer.valueOf(i), Double.valueOf(d2), Integer.valueOf(i2)); } }