copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/FaceAI/FaceManager.cs"
copy to project/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/FaceAI/FaceManager.cs
Îļþ´Ó ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/FaceAI/FaceManager.cs ¸´ÖÆ |
| | |
| | | using System; |
| | | using OpenCvSharp; |
| | | using System; |
| | | using System.Runtime.InteropServices; |
| | | using OpenCvSharp; |
| | | /** |
| | | * 夿³¨ï¼äººè¸æ°æ®åºç®¡ç说æï¼ï¼ |
| | | * äººè¸æ°æ®åºä¸ºéç¨sqlite3çæ°æ®åºï¼ä¼èªå¨çæä¸ä¸ªdbç®å½å¤¹ï¼ä¸é¢ææ°æ®åºface.dbæä»¶ä¿åæ°æ®åº |
| | |
| | | // äººè¸æ³¨å(ä¼ ç¹å¾å¼,ç¹å¾å¼å¯åèFaceFeature.csæåï¼äº¦å¯åèFaceCompare.csæ¥çç¹å¾å¼çæ¯å¯¹) |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "user_add", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr user_add(ref BDFaceFeature f1, string user_id, string group_id, |
| | | public static extern IntPtr user_add(ref BDFaceFeature f1, string user_id, string group_id, |
| | | string user_info=""); |
| | | |
| | | // äººè¸æ³¨å(ä¼ opencvå¾ç帧,ç¹å¾å¼å¯åèFaceFeature.csæåï¼äº¦å¯åèFaceCompare.csæ¥çç¹å¾å¼çæ¯å¯¹) |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "user_add_by_mat", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr user_add_by_mat(IntPtr mat, string user_id, string group_id, |
| | | public static extern IntPtr user_add_by_mat(IntPtr mat, string user_id, string group_id, |
| | | string user_info = ""); |
| | | |
| | | // äººè¸æ´æ°(ä¼ å¾ç帧) |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "user_update", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr user_update(IntPtr mat, string user_id, string group_id, |
| | | public static extern IntPtr user_update(IntPtr mat, string user_id, string group_id, |
| | | string user_info = ""); |
| | | |
| | | // ç¨æ·å é¤ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "user_delete", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr user_delete(string user_id, string group_id); |
| | | public static extern IntPtr user_delete(string user_id, string group_id); |
| | | // ç»æ·»å |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "group_add", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr group_add(string group_id); |
| | | public static extern IntPtr group_add(string group_id); |
| | | // ç»å é¤ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "group_delete", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr group_delete(string group_id); |
| | | public static extern IntPtr group_delete(string group_id); |
| | | // æ¥è¯¢ç¨æ·ä¿¡æ¯ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "get_user_info", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr get_user_info(string user_id, string group_id); |
| | | public static extern IntPtr get_user_info(string user_id, string group_id); |
| | | |
| | | // æ¥è¯¢ç¨æ·å¾ç |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "get_user_image", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern int get_user_image(IntPtr out_mat, string user_id, string group_id); |
| | | public static extern int get_user_image(IntPtr out_mat, string user_id, string group_id); |
| | | |
| | | // ç¨æ·ç»å表æ¥è¯¢ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "get_user_list", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr get_user_list(string group_id, int start = 0, int length = 100); |
| | | public static extern IntPtr get_user_list(string group_id, int start = 0, int length = 100); |
| | | // ç»å表æ¥è¯¢ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "get_group_list", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern IntPtr get_group_list(int start = 0, int length = 100); |
| | | public static extern IntPtr get_group_list(int start = 0, int length = 100); |
| | | |
| | | // æ°æ®åºäººè¸æ°éæ¥è¯¢ |
| | | [DllImport("BaiduFaceApi.dll", EntryPoint = "db_face_count", CharSet = CharSet.Ansi |
| | | , CallingConvention = CallingConvention.Cdecl)] |
| | | private static extern int db_face_count(string group_id); |
| | | public static extern int db_face_count(string group_id); |
| | | |
| | | |
| | | // æµè¯äººè¸æ³¨å |