• 大小: 5.29M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-05-02
  • 语言: C#
  • 标签: 人脸识别  人脸  识别  

资源简介

快速上手:
1. 安装VS2013环境安装包(vcredist_x86_vs2013.exe),确认本地.NET Framework版本
2. 从虹软开发者中心官网(https://ai.arcsoft.com.cn/ucenter/user/userlogin)下载对应的SDK版本(x86或x64)并解压
3. 将libs中的“libarcsoft_face.dll”、“libarcsoft_face_engine.dll”拷贝到工程bin目录的对应平台的Debug或Release目录下
4. 将对应APPID、SDKKEY替换App.config文件中对应内容
5. 在Debug或者Release中选择配置管理器,选择对应的平台
6. 按F5启动程序
7. 点击“注册人脸”按钮增加人脸库图片
8. 点击“选择识别图”按钮增加人脸图片
9. 点击“开始匹配”按钮进行比较
10. 根据下面文本框查看相关信息 

资源截图

代码片段和文件信息

using ArcFaceSDK.Entity;
using ArcFaceSDK.SDKModels;
using ArcFaceSDK.Utils;
using System;
using System.Drawing;
using System.Runtime.InteropServices;

namespace ArcFaceSDK
{
    /// 
    /// ArcFace 接口封装类
    /// 

    public class FaceEngine
    {
        /// 
        /// 引擎 handle
        /// 

        private IntPtr pEngine;

        /// 
        /// 判断引擎状态
        /// 

        /// true:引擎已初始化;false:引擎未初始化
        public bool GetEngineStatus()
        {
            return !(pEngine.Equals(IntPtr.Zero));
        }
        
        /// 
        /// 激活接口
        /// 

        /// appId
        /// appKey
        /// 返回0表示正常;其他值请在官网-帮助中心查询
        public int ASFActivation(string appId string appKey)
        {
            return ASFFunctions.ASFActivation(appId appKey);
        }

        /// 
        /// 激活接口
        /// 

        /// appId
        /// appKey
        /// 返回0或90114表示正常;其他值请在官网-帮助中心查询
        public int ASFOnlineActivation(string appId string appKey)
        {
            return ASFFunctions.ASFOnlineActivation(appId appKey);
        }

        /// 
        /// 引擎初始化
        /// 

        /// 检测模式
        /// 检测脸部的角度优先值
        /// 用于数值化表示的最小人脸尺寸
        /// 最大需要检测的人脸个数
        /// 用户选择需要检测的功能组合,可单个或多个
        /// 返回0表示正常;其他值请在官网-帮助中心查询
        public int ASFInitEngine(DetectionMode detectMode ASF_OrientPriority detectFaceOrientPriority int detectFaceScaleVal int detectFaceMaxNum int combinedMask)
        {
            pEngine = IntPtr.Zero;
            int retCode = -1;
            if (detectFaceScaleVal < 2 || detectFaceScaleVal > 32)
            {
                detectFaceScaleVal = 16;
            }
            if (detectFaceMaxNum < 1 || detectFaceMaxNum > 50)
            {
                detectFaceMaxNum = 10;
            }
            retCode = ASFFunctions.ASFInitEngine(detectMode detectFaceOrientPriority detectFaceScaleVal detectFaceMaxNum combinedMask ref pEngine);
            return retCode;
        }

        /// 
        /// 人脸检测/人脸追踪
        /// 

        /// 图片格式
        /// 图片
        /// 多人脸对象
        /// 检测模式
        /// 返回0表示正常;返回负数请根据ErrorCodeUtil类注释查看;其他值请在官网-帮助中心查询
        public int ASFDetectFaces(Image image out MultiFaceInfo multiFaceInfo ASF_ImagePixelFormat imageFormat = ASF_ImagePixelFormat.ASVL_PAF_RGB24_B8G8R8 ASF_DetectModel detectMo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\
     目录           0  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\
     文件        5816  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\ArcFaceSDK.csproj
     目录           0  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\
     文件        1056  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\ActiveFileInfo.cs
     文件         373  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\AgeInfo.cs
     文件         738  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\Face3DAngle.cs
     文件         372  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\FaceFeature.cs
     文件         373  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\GenderInfo.cs
     文件         658  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\ImageInfo.cs
     文件         386  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\LivenessInfo.cs
     文件         770  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\MultiFaceInfo.cs
     文件         478  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Entity\SDKVersion.cs
     文件       42776  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\FaceEngine.cs
     目录           0  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Properties\
     文件        1292  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\Properties\AssemblyInfo.cs
     目录           0  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\
     文件         975  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_ActiveFileInfo.cs
     文件         374  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_AgeInfo.cs
     文件         464  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_CompareModel.cs
     文件         254  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_DetectModel.cs
     文件         799  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_Face3DAngle.cs
     文件         377  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_FaceFeature.cs
     文件         374  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_GenderInfo.cs
     文件         894  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_ImageData.cs
     文件         312  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_ImagePixelFormat.cs
     文件         384  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_LivenessInfo.cs
     文件         414  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_LivenessThreshold.cs
     文件         675  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_MultiFaceInfo.cs
     文件         454  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_OrientCode.cs
     文件         827  2020-12-07 07:06  ArcfaceDemo_CSharp_3.0-master\ArcFaceSDK\SDKModels\ASF_OrientPriority.cs
............此处省略105个文件信息

评论

共有 条评论