void CMSMultipleWebcamSource_NewFrame(object sender, WebCamEventArgs e) { bool hasNull = false; int index = 0; for (int i = 0; i < webCams.Length; i++) { if (webCams[i].Equals(sender)) { index = i; frames[i] = e.Bitmap.Clone() as Bitmap; } if (frames[i] == null) { hasNull = true; } } if (index == this.dominantWebCam && !hasNull) { Bitmap[] sendFrames = new Bitmap[frames.Length]; for (int i = 0; i < frames.Length; i++) { sendFrames[i] = frames[i].Clone() as Bitmap; } base.processFrameFunc(sendFrames); } }
private void webCam_NewFrame(object sender, WebCamEventArgs e) { processFrameFunc(e.Bitmap.Clone() as Bitmap); }