Beispiel #1
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);
        }
Beispiel #2
0
        public static int MC_DetectFaces4Image_AlphaPro(Image <Bgr, byte> image, out FaceModel[] faceModel, int maxFaceCount)
        {
            int result;

            try
            {
                object obj = FaceCompare._obj;
                lock (obj)
                {
                    FaceModelV3[] array    = new FaceModelV3[maxFaceCount];
                    int           arg_48_0 = FaceCompare._FacesDetect_AlphaPro(FaceCompare.FaceEngne, image.Bytes, image.Width, image.Height, image.MIplImage.WidthStep, array, maxFaceCount);
                    faceModel = FaceUnit.FaceModelV3ToFaceModel(array);
                    result    = arg_48_0;
                }
            }
            catch (Exception arg_55_0)
            {
                throw arg_55_0;
            }
            return(result);
        }