A dll for ArcSoft face-detection engine version 2.0 based on C# Language
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
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
Bool result = EngineFactory.DisposeEngine()
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
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
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
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