Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     foreach (string gen in fn_gen)
     {
         this.Text_Div_Cur.Text = gen;
         //MessageBox.Show(gen);
         Image      image = Image.FromFile(gen);
         HitAlert[] hits  = fa.Search(image);
     }
     MessageBox.Show("finished!");
 }
Exemplo n.º 2
0
        static void bytetest()
        {
            InitFRS();
            FeatureData fa = new FeatureData();

            fa.LoadData(1);
            Bitmap bitmap = new Bitmap("D:\\test.jpg");

            byte[] b = BitmapToBytes(bitmap);
            Console.WriteLine(BitConverter.ToString(b));

            Bitmap Bitmapsrc = BytesToBitmap(b);

            Bitmapsrc.Save("D:\\test1.jpg");
            Bitmap bitmaptest = new Bitmap("D:\\test1.jpg");

            fa.LoadData(2);
            FRS.HitAlert[] hits = fa.Search(bitmaptest);

            Console.WriteLine(hits[0].Details[0].Score);
        }
Exemplo n.º 3
0
        static void SearchTest()
        {
            InitFRS();
            FeatureData fa = new FeatureData();

            fa.LoadData("hello");
            Image image = Image.FromFile("D:/Users/McLarry/Downloads/测试库3(IDCF)/测试库3(IDCF)/测试库/0b214fdcd6afb9d1d7683e72e0e81c21.jpg");

            HitAlert[] hits = fa.Search(image);
            Console.WriteLine("here" + hits.Length);
            //getPath("D:/Users/McLarry/Downloads/测试库1(101)/测试库1(100)/测试图像");
            //foreach (string filename in list)
            //{
            //    Console.WriteLine(filename);
            //    Image image = Image.FromFile(filename);
            //    Console.WriteLine("aaa");
            //    HitAlert[] hits = fa.Search(image);
            //    Console.WriteLine("bbb");
            //    //Console.WriteLine(hits[0].Details.Length);
            //    //Console.WriteLine(hits[0].Details[0].Score);
            //}
        }
Exemplo n.º 4
0
        static void SearchTest()
        {
            InitFRS();
            FeatureData fa = new FeatureData();

            fa.LoadData(1);
            Image image = Image.FromFile("G:/科研项目/新街口/三逃底库/NGL/njust14.jpg");

            HitAlert[] hits = fa.Search(image);
            Console.WriteLine("find result:" + hits.Length);
            //getPath("D:/Users/McLarry/Downloads/测试库1(101)/测试库1(100)/测试图像");
            //foreach (string filename in list)
            //{
            //    Console.WriteLine(filename);
            //    Image image = Image.FromFile(filename);
            //    Console.WriteLine("aaa");
            //    HitAlert[] hits = fa.Search(image);
            //    Console.WriteLine("bbb");
            //    //Console.WriteLine(hits[0].Details.Length);
            //    //Console.WriteLine(hits[0].Details[0].Score);
            //}
        }