what-the-bank/sources/com/google/android/gms/vision/face/NativeFaceSettings.java

69 lines
2.5 KiB
Java

package com.google.android.gms.vision.face;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.vision.face.internal.client.zze;
/* loaded from: classes2.dex */
public class NativeFaceSettings {
public boolean classifyEyesOpen;
public boolean classifySmiling;
public float confidenceThreshold;
public int detectionType;
public int fastDetectorAggressiveness;
public int landmarkType;
public int maxNumFaces;
public int numThreads;
public float proportionalMinFaceSize;
public boolean trackingEnabled;
public static NativeFaceSettings zzc(zze zzeVar) {
float f;
NativeFaceSettings nativeFaceSettings = new NativeFaceSettings();
boolean z = zzeVar.mode == 0;
if (z) {
nativeFaceSettings.detectionType = 0;
} else {
nativeFaceSettings.detectionType = 1;
}
if (zzeVar.landmarkType == 1) {
if (z) {
nativeFaceSettings.landmarkType = 1;
} else {
nativeFaceSettings.landmarkType = 3;
}
} else if (zzeVar.zzcn == 1) {
nativeFaceSettings.landmarkType = 1;
} else {
nativeFaceSettings.landmarkType = 0;
}
nativeFaceSettings.trackingEnabled = zzeVar.trackingEnabled;
if (zzeVar.trackingEnabled) {
nativeFaceSettings.confidenceThreshold = 0.2f;
nativeFaceSettings.fastDetectorAggressiveness = 1;
} else {
nativeFaceSettings.confidenceThreshold = 0.75f;
nativeFaceSettings.fastDetectorAggressiveness = 0;
}
if (zzeVar.zzcm) {
nativeFaceSettings.maxNumFaces = 1;
f = 0.35f;
} else {
nativeFaceSettings.maxNumFaces = 1000;
f = 0.1f;
}
nativeFaceSettings.proportionalMinFaceSize = f;
if (zzeVar.proportionalMinFaceSize >= BitmapDescriptorFactory.HUE_RED) {
nativeFaceSettings.proportionalMinFaceSize = zzeVar.proportionalMinFaceSize;
}
nativeFaceSettings.numThreads = Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
if (zzeVar.zzcn == 1) {
nativeFaceSettings.classifyEyesOpen = true;
nativeFaceSettings.classifySmiling = true;
} else {
nativeFaceSettings.classifyEyesOpen = false;
nativeFaceSettings.classifySmiling = false;
}
return nativeFaceSettings;
}
}