Making an Array of webcams using capture

I trying to make an array of webcams using th capture class but It does not build. I am not sure how it can be done. I have search and search and seen nothing. The aim of the code is to take video frames in realtime from 2 webcams and stitch them in realtime using EMGUcv I am guessing in can be done in opencv. Please if you have any other options I willing to explore them

    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/14232.html

上一篇: 如何在Silverlight中从网络摄像头中翻转视频

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