Example #1
0
        int IFaceCompare.DetectFaces4Image_only(byte[] bgr24, int width, int height, int widthstep, out FaceModel[] faceModel, int maxFaceCount)
        {
            int result;

            try
            {
                object obj = FaceCompareBase._obj;
                lock (obj)
                {
                    FaceModelV3[] array = new FaceModelV3[maxFaceCount];
                    int           num   = FaceCompareBase._FacesDetectV3(FaceCompareBase._faceEngne, bgr24, width, height, widthstep, array, maxFaceCount);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(array.Take(num).ToArray <FaceModelV3>());
                    result    = num;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(result);
        }
Example #2
0
        public static int MC_DetectFaces4Image(byte[] bgr24, int width, int height, int widthstep, out FaceModel[] faceModel, int MaxCount)
        {
            int result;

            try
            {
                object obj = FaceCompare._obj;
                lock (obj)
                {
                    FaceModelV3[] array    = new FaceModelV3[20];
                    int           arg_32_0 = FaceCompare._FacesDetect(FaceCompare.FaceEngne, bgr24, width, height, widthstep, array, 20);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(array);
                    result    = arg_32_0;
                }
            }
            catch (Exception arg_3F_0)
            {
                throw arg_3F_0;
            }
            return(result);
        }
Example #3
0
        public static int MC_ExtractFeature(Image <Bgr, byte> image, ref FaceModel faceModel)
        {
            int result;

            try
            {
                object obj = FaceCompare._obj;
                lock (obj)
                {
                    FaceModelV3 faceModelV = faceModel.ToFaceModelV3();
                    int         arg_49_0   = FaceCompare._ExtractFeature(FaceCompare.FaceEngne, image.Bytes, image.Width, image.Height, image.MIplImage.Width, ref faceModelV);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(faceModelV);
                    result    = arg_49_0;
                }
            }
            catch (Exception arg_56_0)
            {
                throw arg_56_0;
            }
            return(result);
        }
Example #4
0
        public static int MC_DetectFaces4Image(Image <Bgr, byte> image, out FaceModel[] faceModel)
        {
            int result;

            try
            {
                object obj = FaceCompare._obj;
                lock (obj)
                {
                    FaceModelV3[] array    = new FaceModelV3[20];
                    int           arg_4A_0 = FaceCompare._FacesDetect(FaceCompare.FaceEngne, image.Bytes, image.Width, image.Height, image.MIplImage.WidthStep, array, 20);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(array);
                    result    = arg_4A_0;
                }
            }
            catch (Exception arg_57_0)
            {
                throw arg_57_0;
            }
            return(result);
        }
Example #5
0
        public static int DetectFaces4Image_AlphaPro(byte[] bgr24, int width, int height, int widthstep, out FaceModel[] faceModel, int maxFaceCount)
        {
            int result;

            try
            {
                object obj = FaceCompare._obj;
                lock (obj)
                {
                    FaceModelV3[] array = new FaceModelV3[maxFaceCount];
                    int           num   = FaceCompare._FacesDetect_AlphaPro(FaceCompare.FaceEngne, bgr24, width, height, widthstep, array, maxFaceCount);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(array.Take(num).ToArray <FaceModelV3>());
                    result    = num;
                }
            }
            catch (Exception arg_4D_0)
            {
                throw arg_4D_0;
            }
            return(result);
        }