예제 #1
0
        private void initWebcam()
        {
            KameraSecimi getCamera = new KameraSecimi();

            webcam = getCamera.getCamera();
            if (webcam is Camera && webcam != null)
            {
                PictureBox temp = new PictureBox();
                (webcam as Camera).VideoPreview.VideoControl = temp;

                webcam.Connect();
                kameraPictureBox.Width  = webcam.Width;
                kameraPictureBox.Height = webcam.Height;
                webcam.Start();
                scan0 = Marshal.AllocCoTaskMem(webcam.DataLength);
            }
        }