Ejemplo n.º 1
0
        //IMG OpenCV
        public void Tap_Img(string deviceID, Bitmap ImgFind)
        {
            Bitmap bm     = (Bitmap)ImgFind.Clone();
            var    screen = ADBHelper.ScreenShoot(deviceID);
            var    Point  = ImageScanOpenCV.FindOutPoint(screen, bm);

            if (Point != null)
            {
                ADBHelper.Tap(deviceID, Point.Value.X, Point.Value.Y);
                return;
            }
            //MessageBox.Show("Tìm không ra");
        }
Ejemplo n.º 2
0
        private static System.Drawing.Point?GetPoint(string id, Bitmap img)
        {
            var    screen  = ADBHelper.ScreenShoot(id, false);
            Bitmap tmp_img = (Bitmap)img.Clone();
            Bitmap tmp_scr = (Bitmap)screen.Clone();
            var    point   = ImageScanOpenCV.FindOutPoint(tmp_scr, tmp_img);

            return(point);
            //var aa = ImageScanOpenCV.Find(screen, D_FLAG);
            //if (aa != null)
            //{
            //    aa.Save("aaa.png");
            //}
        }
Ejemplo n.º 3
0
        private static string CheckImage(string id, Bitmap img)
        {
            //Task l = new Task(() =>
            //{
            //while (true)
            //{
            var screen = ADBHelper.ScreenShoot(id);
            var point  = ImageScanOpenCV.FindOutPoint(screen, img);
            var aa     = ImageScanOpenCV.Find(screen, img);

            aa.Save("aaa.png");
            if (point != null)
            {
                //Dispatcher.BeginInvoke(new ThreadStart(() => rtb1.AppendText("Home!!!")));
                //break;

                return("find!");
            }

            return("");
            //}
            //});
            //l.Start();
        }