Reputation: 2917
I need to know how to load a video file using emgucv 2.1.0.0 in C#. I just need some guidance. I also need some guidance on how to use the emgucv API(I have one documentation which came with the installation), so I dont have to keep asking questions when I can find it already in the API(NOTE: For instance, I went through a video on you tube to learn how to use the java API and now pretty comfortable using it, could not find one for emgucv). For example, I find methods for different things but I have no clue to apply them in code.
Perhaps a method and how to use it might be helpful.
Thanks so much
Upvotes: 4
Views: 4735
Reputation: 1399
Assuming you've imported the Emgu DLLs correctly, load your video file using
Capture capture = new Capture("filename");
Then you can grab frames from it using
Image<Bgr, byte> img = capture.QueryFrame();
You can view the image with the ImageViewer-class:
ImageViewer viewer = new ImageViewer();
viewer.Image = img;
viewer.ShowDialog();
Upvotes: 6