static void Main()
        {
            // Get the path and filename to process from the user.
            Console.WriteLine("Analyze an image:");
            Console.Write("Enter the path to an image you wish to analzye: ");
            string imageFilePath = Console.ReadLine();

            ImageTagger animalImageTagger = new ImageTagger();
            List <Tag>  tags = animalImageTagger.GetTagsForImage(imageFilePath);

            //create a new filter to check picture
            var filter = new AnimalFilter();

            foreach (Tag tag in tags)
            {
                //checking each picutre
                filter.checkAnimal(tag.name);
            }

            //printing the result after picture got filtered
            Console.WriteLine(filter.AnimalResult);

            Console.WriteLine("Press Any Key to Continue.");
            Console.ReadLine();
        }
Exemple #2
0
        public List <Tag> animalTags(string filepath)
        {
            ImageTagger animalImageTagger = new ImageTagger();
            List <Tag>  tags = animalImageTagger.GetTagsForImage(filepath);

            return(tags);
        }
        public static List <Tag> Input(string inputPath)
        {
            //Create new Image Tagger, then make a list of tags for the file.
            ImageTagger animalImageTagger = new ImageTagger();
            List <Tag>  tags = animalImageTagger.GetTagsForImage(inputPath);

            return(tags);
        }
        static void Main()
        {
            TagReader find = new TagReader();

            // Get the path and filename to process from the user.
            Console.WriteLine("Analyze an image:");
            Console.Write("Enter the path to an image you wish to analzye: ");
            string imageFilePath = Console.ReadLine();

            ImageTagger animalImageTagger = new ImageTagger();
            List <Tag>  tags = animalImageTagger.GetTagsForImage(imageFilePath);


            //Collects information on animal tags
            foreach (Tag tag in tags)
            {
                find.Polymorphic(find.check_Dog, tag);
                find.Polymorphic(find.check_Cat, tag);
                find.Polymorphic(find.check_Bird, tag);

                Console.WriteLine(tag.name);
            }

            Console.WriteLine("\n");
            //Decides what to do once tag information is gathered
            SearchResult results = find.animal_Found();

            // TODO: move all console display logic here

            if (results.FoundDog)
            {
                Console.WriteLine("found dog");
            }

            Console.WriteLine("Press Any Key to Continue.");
            Console.ReadLine();
        }