解决方案 »

  1.   

    public partial class Form1 : Form
    {
        Capture _capture;
        public Form1()
        {
            InitializeComponent();
            _capture = new Capture();
            _capture.ImageGrabbed += _capture_ImageGrabbed;
            _capture.Start();
        }    void _capture_ImageGrabbed(object sender, EventArgs e)
        {
            var frame = _capture.RetrieveBgrFrame();
            pic.Image = frame.Bitmap;
        }
    }
      

  2.   

    顺便再请教一个问题哈~我是两段不同角度的视频,然后要拼接成一段视频播放,我想只拼接第一帧数据,然后得到单应矩阵,之后就用这个单应矩阵把每一帧都拼接播放
            private void btnBlend_Click(object sender, EventArgs e)
            {
                // Step 4: Project and blend the second image using the homography
                Blend blend = new Blend(homography, img1);
                pictureBox.Image = blend.Apply(img2);
            }
    现在我已经得出了homography,然后只要不断的while循环            
    Blend blend = new Blend(homography, img1);
                pictureBox.Image = blend.Apply(img2);
    这两句就行了,img1为视频一的帧数据,img2为视频二的帧数据,然后我怎么一帧接一帧的取出img1跟img2的数据,然后在pictureBOX里播放呢~我已经试过了,第一帧数据是可以在pictureBox里拼接显示的