I'm facing an issue while using VideoCapture to display the screen from an HDMI capture card.
Initially, the video is displayed correctly, but after a while, the image freezed. The ProcessFrame callback function is not being invoked.
Is there any issue with the code below?
private void btnCapture_Click(object sender, EventArgs e)
{
_capture = new VideoCapture(cbCamera.SelectedIndex);
_capture.ImageGrabbed += ProcessFrame;
if (_capture != null)
_capture.Start();
_IsCapturing = true;
}
private void ProcessFrame(object sender, EventArgs e)
{
Mat frame = new Mat();
_capture.Retrieve(frame, 0);
picOutput.Image = frame;
frame.Dispose();
}
I've tried using different versions of EmguCV, but I still encounter the same issue.