Beispiel #1
0
        public void CanGetImagesToDisk()
        {
            ConfigurationManager.AppSettings["LocalImageSearchPath"] = @"C:\Users\Matthew\Documents\HackManchester2016\TestImages\";

            ConfigurationManager.AppSettings["GoogleAPIKey"]         = "AIzaSyB-LOommQ-bfWysfqgnql6aOweiHy4KZCM";
            ConfigurationManager.AppSettings["CustomSearchEngineId"] = "002232642848038589219%3Aoizy299vm8k";

            ConfigurationManager.AppSettings["InstagramAccessToken"] = "4092770693.e029fea.71fb21e304284dce9496cb4cdb635b8b";

            ConfigurationManager.AppSettings["TwitterAccessKey"] = "qLy8zHnWBYMC17x7IH6jx3fee";
            ConfigurationManager.AppSettings["TwitterSecretKey"] = "osxaNQhJbHvsfvEkKB4qsJnV4GbGAtFN65aQyJ3S1Sj3ClA6es";

            ConfigurationManager.AppSettings["TemporaryImageStorePath"] = @"c:\temp\scanned";

            var aquisition = new Acquisition(new ImageStore());
            var results    = aquisition.FetchAll(new ImageFetchRequest(new GeoLocation(), 10));
            var a          = 1;
        }
Beispiel #2
0
        public IEnumerable <ScanResult> Find(string referenceImagePath, ImageFetchRequest fetchRequest)
        {
            var scanner           = new Scanner();
            var imageFetchResults = _acquisition.FetchAll(fetchRequest);
            var results           = new List <ScanResult>();

            foreach (var fetchResult in imageFetchResults)
            {
                scanner.Reset();
                var scanResult = scanner.Scan(referenceImagePath, fetchResult.ImageLocation);
                if (scanResult.Status == NBiometricStatus.Ok && scanResult.Score > 0)
                {
                    results.Add(scanResult);
                }
            }

            return(results);
        }