This blog explains how to get live feed from the webcam. By assuming that your already learned the "How to set up the Aforge.Net Visual studio 2010 setup tutorial" from my previous blog.
Now we jump to the coding part of webcam. So now we have window like this.
After that change the text over the button to "Start". To do this Right Click over the "button1" and then Click "Properties".
Now we add the picture box over the form by double clicking the "Picture Box" from the "Tool Box".
Lets move to coding part.Double Click over the Start button this will generate the click event handler of the start button and take us to the code behind of the form.
In the code behind add these namespaces
Then we have find the list of video devices attached to our system using "FilterInfoCollection" class.Once the video device is detected we will grab the frame by using "VideoCaptureDevice" class.
Code for the get_Frame method
Download the Source code from here: "Camera Capture"
Happy coding !!!
No comments:
Post a Comment