vigns / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

plz any one tell me how to capture image and save it from webcam #287

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I need to know how to capture and save image and why camera position is 
incorrect.

that's my code :

        Bitmap bitmap;

        private void Form1_Load(object sender, EventArgs e)
        {

            FilterInfoCollection videoDevices = new FilterInfoCollection( FilterCategory.VideoInputDevice );

            VideoCaptureDevice videoSource = new VideoCaptureDevice( videoDevices[0].MonikerString );

            videoSource.NewFrame += new NewFrameEventHandler( video_NewFrame );
            videoSource.Start( );

        }

        private void video_NewFrame( object sender, NewFrameEventArgs eventArgs )
        {

            Bitmap bitmap = (Bitmap)eventArgs.Frame.Clone();

            pictureBox1.Image = bitmap;

        }

Original issue reported on code.google.com by mido.k....@gmail.com on 2 Feb 2012 at 9:58

Attachments:

GoogleCodeExporter commented 9 years ago
This is not a forum.

Original comment by andrew.k...@gmail.com on 2 Feb 2012 at 10:01