public Camera(PictureBox pb) { devices = CaptureDevice.GetDevices(); if (devices.Count > 0) { activeDevice = devices[0]; activeDevice.Attach(pb); } }