public class FaceApiMtfAndroid extends net.gdface.sdk.BaseFaceApiLocal
FaceApi接口实现类(线程安全)MtfAndroidArmBridge实例用资源池GenericObjectPool管理,
每次调用前从资源池申请一个MtfAndroidArmBridge实例来使用,用完后归还资源池,
以实现对MtfAndroidArmBridge实例线程安全的调用| 限定符 | 构造器和说明 |
|---|---|
protected |
FaceApiMtfAndroid() |
| 限定符和类型 | 方法和说明 |
|---|---|
net.gdface.sdk.CodeInfo[] |
detectAndGetCodeInfo(android.graphics.Bitmap bitmap,
int faceNum)
检测并提取人脸特征
|
java.util.List<net.gdface.sdk.CodeInfo> |
detectFace(android.graphics.Bitmap bitmap)
检测人脸
|
NativeFaceInfo |
detectMaxFace(android.graphics.Bitmap bitmap)
已过时。
replaced by
detectMaxFace(Bitmap, int) |
NativeFaceInfo |
detectMaxFace(android.graphics.Bitmap bitmap,
int detectMod) |
int |
facePosInterrelate(int faceNums,
double rectRate,
double[] faceRect,
double[] faceRectInfo)
位置关联
在人脸检测函数后用到,无论有无检测到人脸,均需要调用,从属于检测系列
|
net.gdface.sdk.CodeInfo |
getCodeInfo(android.graphics.Bitmap bitmap,
net.gdface.sdk.CodeInfo facePos)
提取单个人脸特征
|
java.util.List<net.gdface.sdk.CodeInfo> |
getCodeInfo(android.graphics.Bitmap bitmap,
int faceNum,
java.util.List<net.gdface.sdk.CodeInfo> facePos)
提取特征
|
int |
getDetectInfo(byte[] BGR,
int width,
int height,
double[] rect,
double[] rectinfo)
已过时。
人脸检测原始数据中已经包含了人脸角度,不再需要此函数
|
net.gdface.sdk.fse.FeatureSe |
getFeatureSe() |
static net.gdface.sdk.FaceApiGenericDecorator |
getGenericInstance()
返回支持泛型封闭的单实例
|
static FaceApiMtfAndroid |
getInstance()
返回单实例
|
static net.gdface.license.LicenseManager |
licenseManager() |
boolean |
liveProcess(android.graphics.Bitmap bitmap,
NativeFaceInfo faceinfo) |
protected double |
nativeCompareCode(byte[] code1,
byte[] code2) |
void |
nativeDetectFace(byte[] imgMatrix,
int width,
int height,
java.util.List<net.gdface.sdk.CodeInfo> faceInfo)
人脸检测,最多返回三张人脸
|
void |
nativeDetectFace(byte[] imgMatrix,
int width,
int height,
java.util.List<net.gdface.sdk.CodeInfo> faceInfo,
int detectMod)
人脸检测,最多返回三张人脸
|
NativeFaceInfo |
nativeDetectMaxFace(byte[] imgMatrix,
int width,
int height)
已过时。
replaced by
nativeDetectMaxFace(byte[], int, int, int) |
NativeFaceInfo |
nativeDetectMaxFace(byte[] imgMatrix,
int width,
int height,
int detectMod)
执行单人脸检测,返回最大人脸位置信息
|
byte[] |
nativeGetFaceFeature(byte[] imgMatrix,
int width,
int height,
net.gdface.sdk.CodeInfo faceInfo) |
boolean |
nativeLiveProcess(byte[] BGR,
int width,
int height,
double[] rect)
执行活体检测
|
java.lang.String |
sdkVersion() |
int |
setFacePosStatus(int facePos,
int flag) |
compareCode, detectAndGetCodeInfo, detectAndGetCodeInfo, detectFace, detectFace, getCodeInfo, getCodeInfo, getCodeInfo, getCodeInfo, getMatrixData, isLocal, makeOpenedLazyImage, nativeDetectAndGetFeatures, nativeGetFaceFeatures, setAuxToolprotected FaceApiMtfAndroid()
public static FaceApiMtfAndroid getInstance()
public static net.gdface.sdk.FaceApiGenericDecorator getGenericInstance()
public static net.gdface.license.LicenseManager licenseManager()
public final java.lang.String sdkVersion()
sdkVersion 在接口中 net.gdface.sdk.FaceApisdkVersion 在类中 net.gdface.sdk.BaseFaceApiprotected double nativeCompareCode(byte[] code1, byte[] code2)
nativeCompareCode 在类中 net.gdface.sdk.BaseFaceApiLocalpublic void nativeDetectFace(byte[] imgMatrix, int width, int height, java.util.List<net.gdface.sdk.CodeInfo> faceInfo)
nativeDetectFace 在类中 net.gdface.sdk.BaseFaceApiLocalpublic byte[] nativeGetFaceFeature(byte[] imgMatrix, int width, int height, net.gdface.sdk.CodeInfo faceInfo)
nativeGetFaceFeature 在类中 net.gdface.sdk.BaseFaceApiLocalpublic void nativeDetectFace(byte[] imgMatrix, int width, int height, java.util.List<net.gdface.sdk.CodeInfo> faceInfo, int detectMod)
public NativeFaceInfo nativeDetectMaxFace(byte[] imgMatrix, int width, int height)
nativeDetectMaxFace(byte[], int, int, int)public NativeFaceInfo nativeDetectMaxFace(byte[] imgMatrix, int width, int height, int detectMod)
imgMatrix - width - height - detectMod - 0:用于检测图片,1:用于视频的循环检测public NativeFaceInfo detectMaxFace(android.graphics.Bitmap bitmap)
detectMaxFace(Bitmap, int)public NativeFaceInfo detectMaxFace(android.graphics.Bitmap bitmap, int detectMod)
public int facePosInterrelate(int faceNums, double rectRate, double[] faceRect, double[] faceRectInfo)
faceNums - 人脸个数rectRate - faceRect - 人脸信息(人脸检测数据rect) 21个元素faceRectInfo - [out]返回的标记,最后一个元素为是否成功比对的标志,其他为人脸信息public int getDetectInfo(byte[] BGR, int width, int height, double[] rect, double[] rectinfo)
BGR - width - height - rect - 人脸检测原始数据rectinfo - [out] leng>=3,不可为null,返回3个元素 1: roll 2: yaw 3: pitchpublic int setFacePosStatus(int facePos, int flag)
public boolean nativeLiveProcess(byte[] BGR, int width, int height, double[] rect)
BGR - 输入的BGR格式图像width - 图像宽度height - 图像高度rect - nativeDetectFace(byte[], int, int, List)方法返回的人脸检测信息原始数据,
参见NativeFaceInfo.getNativeData()public boolean liveProcess(android.graphics.Bitmap bitmap, NativeFaceInfo faceinfo)
public java.util.List<net.gdface.sdk.CodeInfo> detectFace(android.graphics.Bitmap bitmap)
bitmap - BaseFaceApiLocal.detectFace(net.gdface.image.BaseLazyImage)public java.util.List<net.gdface.sdk.CodeInfo> getCodeInfo(android.graphics.Bitmap bitmap, int faceNum, java.util.List<net.gdface.sdk.CodeInfo> facePos) throws net.gdface.sdk.NotFaceDetectedException
bitmap - faceNum - facePos - net.gdface.sdk.NotFaceDetectedExceptionBaseFaceApiLocal.getCodeInfo(net.gdface.image.BaseLazyImage, int, List)public net.gdface.sdk.CodeInfo getCodeInfo(android.graphics.Bitmap bitmap, net.gdface.sdk.CodeInfo facePos)
bitmap - facePos - public net.gdface.sdk.CodeInfo[] detectAndGetCodeInfo(android.graphics.Bitmap bitmap, int faceNum) throws net.gdface.sdk.NotFaceDetectedException
bitmap - faceNum - net.gdface.sdk.NotFaceDetectedExceptionBaseFaceApiLocal#detectAndGetCodeInfo(net.gdface.image.BaseLazyImage, int)}public net.gdface.sdk.fse.FeatureSe getFeatureSe()
getFeatureSe 在类中 net.gdface.sdk.BaseFaceApiLocalCopyright © 2019. All Rights Reserved.