Click here to Skip to main content
15,887,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I tried some image processing techniques and use below codes to get video feed into a picture box...but i can't understand the second line of the code...Can any one explain that what will happen of that code...???


C#
private VideoCaptureDevice capureDevice;
capureDevice.NewFrame += new NewFrameEventHandler(capureDevice_NewFrame);

public  void capureDevice_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
	//moethod codes gose here 
}
Posted
Updated 7-Jul-13 3:38am
v2

All it does is add an event handler to the instance of the VideoCapture Device.
Or it would - if it didn't just throw a "null reference exception" because you haven't allocated an instance, just declared a variable to refer to the instance.

But if you had, then whenever that specific instance signals a "NewFrame" event, the framework will call your capureDevice_NewFrame method.
 
Share this answer
 
Thanks for replying...here i wrote only some important parts of the code and i only wanted to know that how that code work. I didn't get that correctly how that event handling work. Can you explain more about the working process of the code, and i really grateful for your valuable answer..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900