I'm using this code for read a single frame from video and use that frame like a image
protected void ReadSingleFrame()
{
Mat m = new Mat();
if(IsReadingFrame ==true && frameNo >= 0 && frameNo < totalFrame - 1)
{
capture.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.PosFrames, frameNo);
capture.Read(m);
Img = m.Bitmap;
LabelFrame.Text ="Frame: "+ frameNo.ToString() + "/" + totalFrame.ToString();
}
}
but it ussualy crash because: Exception thrown at 0x74C59EBA (msvcrt.dll) in SelectObject.exe: 0xC0000005: Access violation reading location 0x11BD8000
how can i fix that error?
User contributions licensed under CC BY-SA 3.0