105 lines
2.5 KiB
Java
105 lines
2.5 KiB
Java
package com.kofax.android.abc.machine_vision;
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Point;
|
|
import java.util.Vector;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class ShadowDetector {
|
|
private long m_frame;
|
|
private long m_impl = nativeCreate();
|
|
|
|
public static native String nativeGetVersion();
|
|
|
|
public static native boolean nativeStaticInitializer();
|
|
|
|
public native void nativeAdornFrame();
|
|
|
|
public native int nativeAverageLightness();
|
|
|
|
public native void nativeConfigureFromFile(String str, String str2);
|
|
|
|
public native void nativeConfigureFromString(String str, String str2);
|
|
|
|
public native long nativeCreate();
|
|
|
|
public native double nativeDetectShadows();
|
|
|
|
public native double nativeDetectShadows(Vector<Point> vector);
|
|
|
|
public native void nativeDispose();
|
|
|
|
public native Bitmap nativeGetProcessedImage();
|
|
|
|
public native Vector<Point> nativeGetShadowContours();
|
|
|
|
public native void nativeGrabImageFrame(Bitmap bitmap);
|
|
|
|
public native void nativeGrabVideoFrame(long j);
|
|
|
|
public native void nativeReleaseFrame();
|
|
|
|
static {
|
|
if (!nativeStaticInitializer()) {
|
|
throw new RuntimeException("com.kofax.android.abc.machine_vision.GlareDetector: Static initializer failed.");
|
|
}
|
|
}
|
|
|
|
public void dispose() {
|
|
nativeDispose();
|
|
this.m_impl = 0L;
|
|
}
|
|
|
|
public static String getVersion() {
|
|
return nativeGetVersion();
|
|
}
|
|
|
|
public void loadConfigurationFile(String str, String str2) {
|
|
nativeConfigureFromFile(str, str2);
|
|
}
|
|
|
|
public void loadConfigurationString(String str, String str2) {
|
|
nativeConfigureFromString(str, str2);
|
|
}
|
|
|
|
public void grabVideoFrame(long j) {
|
|
nativeGrabVideoFrame(j);
|
|
}
|
|
|
|
public void grabImageFrame(Bitmap bitmap) {
|
|
nativeGrabImageFrame(bitmap);
|
|
}
|
|
|
|
public double detectShadows() {
|
|
return nativeDetectShadows();
|
|
}
|
|
|
|
public double detectShadows(Vector<Point> vector) {
|
|
return nativeDetectShadows(vector);
|
|
}
|
|
|
|
public Vector<Point> getShadowContours() {
|
|
return nativeGetShadowContours();
|
|
}
|
|
|
|
public int averageLightness() {
|
|
return nativeAverageLightness();
|
|
}
|
|
|
|
public void adornFrame() {
|
|
nativeAdornFrame();
|
|
}
|
|
|
|
public Bitmap getProcessedImage() {
|
|
return nativeGetProcessedImage();
|
|
}
|
|
|
|
public void releaseFrame() {
|
|
nativeReleaseFrame();
|
|
}
|
|
|
|
public long getPtr() {
|
|
return this.m_impl;
|
|
}
|
|
}
|