/// <summary> /// 引擎资源释放 /// </summary> /// <returns></returns> public int UninitFaceEngine() { if (this.rEngine == IntPtr.Zero) { return(-1); } int ret = AFRFunction.AFR_FSDK_UninitialEngine(this.rEngine); if (ret == 0) { this.rEngine = IntPtr.Zero; } return(ret); }
/// <summary> /// 初始化人脸识别引擎 /// </summary> /// <returns></returns> public int InitFaceEngine() { if (rEngine != IntPtr.Zero) { return(0); } IntPtr recognizeEngine = IntPtr.Zero; int retCode = AFRFunction.AFR_FSDK_InitialEngine(this.AppID, this.AfrKey, this.pMem, this.recognizeSize, ref recognizeEngine); if (retCode == 0) { this.rEngine = recognizeEngine; } return(retCode); }