Introduction
- Loads a video from a file and extracts each frame.
- Each frame is shown to the user, who must press a key before it shows the next frame.
Code
private static void LoadVideo(FileInfo videoFile)
{
using (VideoCapture videoCapture = new VideoCapture(videoFile.FullName))
{
Mat mat = new Mat();
while (videoCapture.Read(mat))
{
CvInvoke.Imshow("video", mat);
CvInvoke.WaitKey(0);
}
}
}