Today I am going to show how can one easily show from webcam in PictureBox control in C#.
First download the EmguCV wrapper from here http://sourceforge.net/projects/emgucv/ then install the EmguCV wrapper.
To use this you need to add some references of EmguCV to your project. To add reference open Solution Explorer and right click on the References.
Then select Add Reference. A new window will open. From there select Browse tab.
From the folder explorer select the required dll and Click OK. Here you will need Emgu.CV.dll & Emgu.Util.dll. You are done with adding reference.
Now add a picturebox and Button to your form.Now Double Click on the Button to add code for the button. Now write the code as follow.
Now Build the project. If everything is okey then no error will occur.
Now its time to run. Now run the project. Though everything was fine it will throw en exception in the time of initialization of capture.
“Unable to load DLL ‘opencv_core231’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)”}
That means you have to add this dll or exe s to your debug folder. now add all the exe and dll files from of bin folder of your Emgu installed folder as follow. So that there will be no error in future.
Now run your project and Click on the Button Start. Picture box will show from the webcam live.