Skip to content

dayAndnight2018/HRFace2_0

Repository files navigation

A dll for ArcSoft face-detection engine version 2.0

A dll for ArcSoft face-detection engine version 2.0 based on C# Language

Engine Activation:

ResultCode result = EngineActivate.ActivateEngine(string appId, string appKey) -- appid and appkey could be applied from the https://www.arcsoft.com.cn/ -- The type of result object is an enum to identify the result

Engine Obtain:

IntPtr engine = EngineFactory.GetEngineInstance( uint mode,DetectionOrientPriority orientPriority, int detectFaceScaleVal = 12) -- engine stands for face-detection engine -- mode could be EngineFactory.Video(for video) or EngineFactory.Image(for image) -- orientPriority is also an enum -- detectFaceScaleVal is optional

Engine Free:

Bool result = EngineFactory.DisposeEngine()

Face-num Detection:

Step 1: Init the Engine public FaceDetection(IntPtr hEngine, Bitmap image) -- hEngine is the engine mentioned above -- image, Bitmap image is available, and no need predealling Step 2: Get Face-num public int FindFaceNum() return the number of faces

Age Detection:

Step 1: Init the Engine public FaceDetection(IntPtr hEngine, Bitmap image) -- hEngine is the engine mentioned above -- image, Bitmap image is available, and no need predealling Step 2: Get the age public int GetAge() return the age

Gender Detection

Step 1: Init the Engine public FaceDetection(IntPtr hEngine, Bitmap image) -- hEngine is the engine mentioned above -- image, Bitmap image is available, and no need predealling Step 2: Get the gender public string GetGender() return the gender

Face similiar Detection

Type 1: Step 1: Init the Engine public FaceDetection(IntPtr hEngine, Bitmap image1, Bitmap image2) -- hEngine is the engine mentioned above -- image1,Bitmap image is available, and no need predealling -- image2,Bitmap image is available, and no need predealling Step 2: Get the similiar public float Compare() Type 2: Compare the feature stored already public float Compare(byte[] data1, byte[] data2) -- data1 is the first face feature of size 1032 bytes -- data1 is the second face feature of size 1032 bytes

About

虹软开发2.0封装

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages