Exemplo n.º 1
0
        /// <summary>
        /// Procesa la imagen pasada por parametro y retorna true si aparece un rostro o false de lo contrario.
        /// </summary>
        /// <param name="image">La imagen a procesar</param>
        /// <returns>true o false</returns>
        public Boolean AreThere(IPicture image)
        {
            CognitiveFace cog = new CognitiveFace("620e818a46524ceb92628cde08068242", true);

            cog.Recognize(image.OgImgPath);
            return(cog.FaceFound);
        }
Exemplo n.º 2
0
        public IPicture Filter(IPicture image)
        {
            this.Persist(image, "ImageToSearchFace.jpg");
            CognitiveFace cog = new CognitiveFace("620e818a46524ceb92628cde08068242", false);

            cog.Recognize("ImageToSearchFace.jpg");
            this.HasFace = cog.FaceFound;
            return(image);
        }
        public bool Evaluate()
        {
            Persist(picture, "facefound.png");
            CognitiveFace cogFace = new CognitiveFace("620e818a46524ceb92628cde08068242", false);

            cogFace.Recognize("facefound.png");

            return(cogFace.FaceFound);
        }
Exemplo n.º 4
0
        public Boolean Filter(IPicture image)
        {
            PictureProvider p2   = new PictureProvider();
            CognitiveFace   cog  = new CognitiveFace("620e818a46524ceb92628cde08068242", false);
            FilterSave      save = new FilterSave();

            save.Filter(image);
            cog.Recognize($"..\\Adds\\{FilterSave.Contador.ToString()}.jpg");
            return(cog.FaceFound);
        }
Exemplo n.º 5
0
        public IPicture Filter(IPicture image)
        {
            CognitiveFace cog = new CognitiveFace("620e818a46524ceb92628cde08068242", true);

            cog.Recognize("..\\Program\\NewImage.jpg");
            if (cog.FaceFound)
            {
                hasface = true;
            }
            return(image);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Chequea si hay una cara, en caso afirmativo devuelve true, sino false
        /// </summary>
        /// <param name="path">path de la imagen</param>
        /// <returns>boolean</returns>
        public bool CheckCondition(string path)
        {
            CognitiveFace cog = new CognitiveFace("a36648d3c5134ab692acd35605d491f7", false);

            cog.Recognize(path);
            if (cog.FaceFound)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 7
0
        public IPicture Filter(IPicture image)
        {
            CognitiveFace cog = new  CognitiveFace("620e818a46524ceb92628cde08068242", false);

            cog.Recognize($@"{fileName}");

            if (cog.FaceFound)
            {
                this.filterRelief = new FilterRelief();
                return(this.filterRelief.Filter(image));
            }
            else
            {
                this.filterBW = new FilterBlackAndWhite(35);
                return(this.filterBW.Filter(image));
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Recibe una imagen y la retorna con un filtro de escala de grises aplicado.
        /// </summary>
        /// <param name="image">Imagen a la que se le va a aplicar el filtro.</param>
        /// <returns>Imagen con el filtro aplicado.</returns>
        public IPicture Filter(IPicture image)
        {
            CognitiveFace cog = new CognitiveFace("a36648d3c5134ab692acd35605d491f7", false);

            cog.Recognize(@"savedPic.jpg");


            if (cog.FaceFound)
            {
                this.Condition = true;
            }
            else
            {
                this.Condition = false;
            }

            return(image);
        }
Exemplo n.º 9
0
        public IPicture Filter(IPicture image)
        {
            CognitiveFace cog = new CognitiveFace("620e818a46524ceb92628cde08068242", true, Color.GreenYellow);

            cog.Recognize($"../imageWithFilter{contador}.JPG");
            contador = contador + 1;

            if (cog.FaceFound == true)
            {
                result = true;
                return(image);
            }
            else
            {
                result = false;
                return(image);
            }
        }