Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# “System.AccessViolationException”EmguCV类型的未处理异常_C#_Opencv_Computer Vision_Video Capture_Emgucv - Fatal编程技术网

C# “System.AccessViolationException”EmguCV类型的未处理异常

C# “System.AccessViolationException”EmguCV类型的未处理异常,c#,opencv,computer-vision,video-capture,emgucv,C#,Opencv,Computer Vision,Video Capture,Emgucv,我得到一个未处理的异常,类型为“System.AccessViolationException”,如下代码所示。我给出的视频文件大小为91 MB,我的RAM为4 GB OS-Windows 32位 类型为“System.AccessViolationException”的未处理异常 发生在Emgu.CV.dll中 其他信息:尝试读取或写入受保护内存。 这通常表示其他内存已损坏 这可能是视频文件大小的问题吗?如何解决此问题 private static List<Image<Bgr,

我得到一个未处理的异常,类型为“System.AccessViolationException”,如下代码所示。我给出的视频文件大小为91 MB,我的RAM为4 GB OS-Windows 32位

类型为“System.AccessViolationException”的未处理异常 发生在Emgu.CV.dll中

其他信息:尝试读取或写入受保护内存。 这通常表示其他内存已损坏

这可能是视频文件大小的问题吗?如何解决此问题

 private static List<Image<Bgr, Byte>> GetVideoFrames(String Filename)
        {
            List<Image<Bgr, Byte>> image_array = new List<Image<Bgr, Byte>>();
            Capture _capture = new Capture(Filename);

            bool Reading = true;

            while (Reading)
            {
                Image<Bgr, Byte> frame = _capture.QueryFrame();
                if (frame != null)
                {
                    image_array.Add(frame.Copy());
                }
                else
                {
                    Reading = false;
                }
            }

            return image_array;
        }