what-the-bank/sources/com/kofax/android/abc/machine_vision/DocumentTracker.java

112 lines
2.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.android.abc.machine_vision;
import android.graphics.Bitmap;
import java.util.Vector;
/* loaded from: classes3.dex */
public class DocumentTracker {
public boolean ReuseLastInformation;
public boolean RunBoundaryDetection;
public boolean RunDetection;
public boolean RunDirectionDetection;
public boolean RunEdgeDetection;
public boolean RunLocalSearch;
public boolean RunRecognition;
private long m_frame;
private long m_impl = nativeCreate();
public static native String nativeGetVersion();
public static native boolean nativeInit();
public native long nativeCreate();
public native void nativeDispose();
public native Vector<TrackedDocument> nativeDocuments();
public native Bitmap nativeGetProcessedImage();
public native void nativeGrabImageFrame(Bitmap bitmap);
public native void nativeGrabVideoFrame(byte[] bArr, int i, int i2);
public native void nativeInitializeFromFile(String str, String str2);
public native void nativeInitializeFromString(String str, String str2);
public native void nativeProcessFrame();
public native void nativeReleaseFrame();
public native void nativeReset();
public native void nativeStartup();
static {
if (!nativeInit()) {
throw new RuntimeException("com.kofax.android.abc.machine_vision: Static initializer failed.");
}
}
public static String getVersion() {
return nativeGetVersion();
}
public void dispose() {
nativeDispose();
this.m_impl = 0L;
}
public void initializeFile(String str, String str2) {
nativeInitializeFromFile(str, str2);
}
public void initializeString(String str, String str2) {
nativeInitializeFromString(str, str2);
}
public void reset() {
nativeReset();
}
public void startup() {
nativeStartup();
}
public void grabVideoFrame(byte[] bArr, int i, int i2, int i3) {
if (i != 17) {
throw new RuntimeException("DocumentTracker.grabVideoFrame: Invalid image format (must be NV21)");
}
nativeGrabVideoFrame(bArr, i2, i3);
}
public void grabImageFrame(Bitmap bitmap) {
nativeGrabImageFrame(bitmap);
}
public void processFrame() {
nativeProcessFrame();
}
public Bitmap getProcessedImage() {
return nativeGetProcessedImage();
}
public void releaseFrame() {
nativeReleaseFrame();
}
public Vector<TrackedDocument> Documents() {
return nativeDocuments();
}
public long getPtr() {
return this.m_impl;
}
public long getInternalImage() {
return this.m_frame;
}
}