Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            img1 = videoSourcePlayer1.GetCurrentVideoFrame();
            img2 = (Bitmap)pbColor.Image.Clone();

            if (img1.PixelFormat != PixelFormat.Format8bppIndexed)
            {
                img1 = AForge.Imaging.Image.Convert16bppTo8bpp(img1);
            }
            img2 = Grayscale.CommonAlgorithms.BT709.Apply(img2);

            MatchForm form = new MatchForm();

            form.pbStill1.Image = img1;
            form.pbStill2.Image = img2;

            form.ShowDialog();

            correlationPoints1 = form.correlationPoints1.ToArray();
            correlationPoints2 = form.correlationPoints2.ToArray();
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            img1 = videoSourcePlayer1.GetCurrentVideoFrame();
            img2 = (Bitmap)pbColor.Image.Clone();

            if (img1.PixelFormat != PixelFormat.Format8bppIndexed)
                img1 = AForge.Imaging.Image.Convert16bppTo8bpp(img1);
            img2 = Grayscale.CommonAlgorithms.BT709.Apply(img2);

            MatchForm form = new MatchForm();

            form.pbStill1.Image = img1;
            form.pbStill2.Image = img2;

            form.ShowDialog();

            correlationPoints1 = form.correlationPoints1.ToArray();
            correlationPoints2 = form.correlationPoints2.ToArray();
        }