42 lines
1.6 KiB
Java
42 lines
1.6 KiB
Java
|
package com.kofax.kmc.ken.engines;
|
||
|
|
||
|
import android.graphics.Bitmap;
|
||
|
import com.kofax.kmc.ken.engines.data.PassportDetectionResult;
|
||
|
import com.kofax.kmc.ken.engines.data.PassportDetectionSettings;
|
||
|
import com.kofax.kmc.kut.utilities.Licensing;
|
||
|
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
|
||
|
import com.kofax.kmc.kut.utilities.error.KmcRuntimeException;
|
||
|
import o.InterfaceC13391fZD;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public class PassportDetector implements IPassportDetector {
|
||
|
private final IPassportDetector bQ;
|
||
|
|
||
|
@InterfaceC13391fZD
|
||
|
public PassportDetector() {
|
||
|
this(null);
|
||
|
}
|
||
|
|
||
|
PassportDetector(IPassportDetector iPassportDetector) {
|
||
|
if (!Licensing.isSdkLicensed(Licensing.LicenseType.IMAGE_PROCESSING) && !Licensing.isSdkLicensed(Licensing.LicenseType.IMAGE_CAPTURE)) {
|
||
|
throw new KmcRuntimeException(ErrorInfo.KMC_UT_LICENSE_IMAGE_PROCESSING);
|
||
|
}
|
||
|
this.bQ = iPassportDetector == null ? new IsgPassportDetector() : iPassportDetector;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.ken.engines.IDocumentDetector
|
||
|
public PassportDetectionResult detect(PassportDetectionSettings passportDetectionSettings, Bitmap bitmap) {
|
||
|
return this.bQ.detect(passportDetectionSettings, bitmap);
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.ken.engines.IDocumentDetector
|
||
|
public PassportDetectionResult detect(PassportDetectionSettings passportDetectionSettings, byte[] bArr, int i, int i2) {
|
||
|
return this.bQ.detect(passportDetectionSettings, bArr, i, i2);
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.ken.engines.IDocumentDetector
|
||
|
public void destroy() {
|
||
|
this.bQ.destroy();
|
||
|
}
|
||
|
}
|