使用捕获制作一个网络摄像头阵列

我试图使用捕获类来创建一个摄像头阵列,但它不会构建。 我不知道它是如何做到的。 我有搜索和搜索,什么也没有看到。 代码的目的是从2个摄像头实时获取视频帧,并使用EMGUcv实时拼接它们。我猜测可以在opencv中完成。 如果你有其他选择,我愿意探索他们

    public partial class StitchingMainForm : Form
   {
       //declaring global variables
       Capture[] cap= new Capture[2];//takes images from cameras as image frames
       private bool captureInProgress;

      public StitchingMainForm()
      {
         InitializeComponent();
      }

      private void selectImagesButton_Click(object sender, EventArgs e)
      {
          Capture[] cap = new Capture[2];
         if (cap!= null)

         {
            sourceImageDataGridView.Rows.Clear();

            Image<Bgr, Byte>[] sourceImages = new Image<Bgr, byte>[cap.Length];

            for (int i = 0; i < sourceImages.Length; i++)
            {
               sourceImages[i] = new Image<Bgr, byte>(cap.[i]);

               using (Image<Bgr, byte> thumbnail = sourceImages[i].Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC, true))
               {
                  DataGridViewRow row = sourceImageDataGridView.Rows[sourceImageDataGridView.Rows.Add()];
                  row.Cells["FileNameColumn"].Value = cap.[i];
                  row.Cells["ThumbnailColumn"].Value = thumbnail.ToBitmap();
                  row.Height = 200;
               }
            }

i want to display the captured frames on seperate rows and see the final image after stitching. 

 1. Cannot apply indexing with [] to an expression of type 'method group'
 2. (40,34): error CS1502: The best overloaded method match for              Emgu.CV.Image<Emgu.CV.Structure.Bgr,byte>.Image(byte[*,*,*])' has some invalid arguments
 3. (40,55): error CS1503: Argument 1: cannot convert from 'method group' to 'byte[*,*,*]'
 4. (45,55): error CS0021: Cannot apply indexing with [] to an expression of type   'method group'





Thanks
链接地址: http://www.djcxy.com/p/14231.html

上一篇: Making an Array of webcams using capture

下一篇: What is the output format of a webcam?