예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            long matchTime;

            using (Mat modelImage = CvInvoke.Imread(@"opencv\data\sample\box.png", ImreadModes.Grayscale))
                using (Mat observedImage = CvInvoke.Imread(@"opencv\data\sample\box_in_scene.png", ImreadModes.Grayscale))
                {
                    Mat result = DrawMatches.Draw(modelImage, observedImage, out matchTime);
                    ImageViewer.Show(result, String.Format("Matched in {0} milliseconds", matchTime));
                }
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form1());
            long matchTime;

            using (Mat modelImage = CvInvoke.Imread(@"opencv\data\sample\box.png", ImreadModes.Grayscale))
                using (Mat observedImage = CvInvoke.Imread(@"opencv\data\sample\box_in_scene.png", ImreadModes.Grayscale))
                {
                    Mat result = DrawMatches.Draw(modelImage, observedImage, out matchTime);
                    ImageViewer.Show(result, String.Format("Matched in {0} milliseconds", matchTime));
                }
        }