久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='PMGvH'><style id='PMGvH'><dir id='PMGvH'><q id='PMGvH'></q></dir></style></legend>
    <i id='PMGvH'><tr id='PMGvH'><dt id='PMGvH'><q id='PMGvH'><span id='PMGvH'><b id='PMGvH'><form id='PMGvH'><ins id='PMGvH'></ins><ul id='PMGvH'></ul><sub id='PMGvH'></sub></form><legend id='PMGvH'></legend><bdo id='PMGvH'><pre id='PMGvH'><center id='PMGvH'></center></pre></bdo></b><th id='PMGvH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='PMGvH'><tfoot id='PMGvH'></tfoot><dl id='PMGvH'><fieldset id='PMGvH'></fieldset></dl></div>

      <bdo id='PMGvH'></bdo><ul id='PMGvH'></ul>
    1. <small id='PMGvH'></small><noframes id='PMGvH'>

    2. <tfoot id='PMGvH'></tfoot>

      1. System.TypeInitializationException 在 C# 中使用 Emgu.CV

        System.TypeInitializationException using Emgu.CV in C#(System.TypeInitializationException 在 C# 中使用 Emgu.CV)
            <tfoot id='vM1Jh'></tfoot>
              <tbody id='vM1Jh'></tbody>
            <legend id='vM1Jh'><style id='vM1Jh'><dir id='vM1Jh'><q id='vM1Jh'></q></dir></style></legend>
              <bdo id='vM1Jh'></bdo><ul id='vM1Jh'></ul>

              <i id='vM1Jh'><tr id='vM1Jh'><dt id='vM1Jh'><q id='vM1Jh'><span id='vM1Jh'><b id='vM1Jh'><form id='vM1Jh'><ins id='vM1Jh'></ins><ul id='vM1Jh'></ul><sub id='vM1Jh'></sub></form><legend id='vM1Jh'></legend><bdo id='vM1Jh'><pre id='vM1Jh'><center id='vM1Jh'></center></pre></bdo></b><th id='vM1Jh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vM1Jh'><tfoot id='vM1Jh'></tfoot><dl id='vM1Jh'><fieldset id='vM1Jh'></fieldset></dl></div>

                <small id='vM1Jh'></small><noframes id='vM1Jh'>

                1. 本文介紹了System.TypeInitializationException 在 C# 中使用 Emgu.CV的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  此時我有一個函數,它從我的相機界面調用圖像.此圖像隨后會保存到硬盤驅動器并顯示在 Windows 窗體 GUI 中.

                  At this point I have a function which calls for an image from my camera interface. This image is then saved to hard drive and also displayed in the Windows Forms GUI.

                  相機接口內部返回圖像的函數如下:高度和寬度都是屬于相機接口類的整數.在本例中,它們被設置為 800x600.

                  The function inside the camera interface which returns the image is as follows: height and width are both integers that are part of the camera interface class. In this case they were set to 800x600.

                  public Image<Bgr,byte> QueryFrame()
                  {
                      Image<Bgr, byte> temp;
                      lock (key)
                      {
                          using (Capture cap = new Capture())
                          {
                              cap.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FRAME_HEIGHT, height);
                              cap.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FRAME_WIDTH, width);
                              temp = cap.QueryFrame().Copy();
                          }
                      }
                      return temp;
                  }
                  

                  多次調用該函數首先表明捕獲幀花費了相對較長的時間,導致程序在幾秒鐘內無法使用.然后,在 Debug with Visual C# 2010 中運行程序時捕獲了幾幀后,彈出 vshost.exe 的 windows 錯誤:

                  Calling the function a number of times revealed first that capturing a frame took a comparatively long time, locking the program out of use for a few seconds. Then, after capturing a few frames while running the program in Debug with Visual C# 2010, a windows error popped up for vshost.exe:

                  Faulting application DashboardGUI.vshost.exe, version 10.0.30319.1, time stamp 0x4ba2084b, faulting module MSVCR90.dll, version 9.0.30729.6161, time stamp 0x4dace5b9, exception code 0xc0000005, fault offset 0x00024682, process id 0xe78, application start time 0x01cc792086025f01.
                  

                  然后我繼續發布應用程序并從可執行文件運行它并收到錯誤:

                  I then proceeded to publish the application and run it from the executable and got the error:

                  Application: DashboardGUI.exe
                  Framework Version: v4.0.30319
                  Description: The process was terminated due to an unhandled exception.
                  Exception Info: System.TypeInitializationException
                  Stack:
                     at Emgu.CV.CvInvoke.cvReleaseCapture(IntPtr ByRef)
                     at Emgu.CV.Capture.DisposeObject()
                     at Emgu.Util.DisposableObject.Finalize()
                  

                  但是我也讓它與 Emgu.CV.CvInvoke.cvCreateCameraCapture(Int32) 拋出相同的異常.

                  However I have also had it throw the same exception with Emgu.CV.CvInvoke.cvCreateCameraCapture(Int32).

                  是什么導致了這些問題?如何避免它們?有沒有什么方法可以比現在更快地捕獲幀(當它不崩潰時)?

                  What is causing these problems? How can they be avoided? And is there any way to make capturing a frame faster than it currently does (when it doesn't crash)?

                  推薦答案

                  我看了你的代碼,我發現了問題.我期望它崩潰的原因是由于我建議的 using 語句抱歉:s.不完全是 using 語句.您似乎經常訪問代碼以供系統處理.

                  I've looked at you code and I see the problem. The reason it crashes I expect is due to the using statement which I suggested Sorry :s. Well not exactly the using statement. You would appear to be accessing the code to often for the system to handle.

                  Capture cap = new Capture()
                  

                  對少量代碼執行大量操作.它不僅與您的相機建立通信,而且檢查它是否存在,處理驅動程序并創建環形緩沖區等.現在,雖然給出的代碼確實確保只返回更新的圖像,但它通常只有在您使用按鈕或計時器時才能正常工作一段時間的延遲.現在,由于我知道您嘗試實現的目標,并且由于您想要的圖像比使用此方法可以合理實現的圖像更頻繁,因此您有一個更實用的選擇.

                  Does a large amount of operations for a small amount of code. Not only does it set up communication with your camera but checks it exists, handles drivers and creates ring buffers etc. Now while the code given does ensure only an updated image is returned it generally only works well if your using a button or a timer with a period of time delay. Now as I am aware of what your trying to achieve and since you want images more regularly than what can reasonably be achieved with this method you have a more practical option.

                  全局設置您的 Capture 設備并將其設置為記錄并調用 ProcessFrame 以盡可能從緩沖區獲取圖像.現在更改您的 QueryFrame 以復制它剛剛獲得的任何幀.這有望阻止您獲取前一幀的問題,并且您現在將從緩沖區中獲得最新的幀.

                  Set your Capture device up globally and set it of recording and calling ProcessFrame to get an image from the buffer whenever it can. Now change your QueryFrame simply to copy whatever frames its just acquired. This will hopefully stop your problem of getting the previous frame and you will now have the most recent frame out of the buffer.

                  private Capture cap;
                  Image<Bgr, Byte> frame;
                  
                  public CameraCapture()
                  {
                      InitializeComponent();
                      cap= new Capture();
                      cap.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FRAME_HEIGHT, height);
                      cap.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FRAME_WIDTH, width);
                  
                      Application.Idle += ProcessFrame;
                  }
                  
                  private void ProcessFrame(object sender, EventArgs arg)
                  {
                      frame = _capture.QueryFrame();
                      grayFrame = frame.Convert<Gray, Byte>();
                  }
                  
                  public Image<Bgr,byte> QueryFrame()
                  {
                      return frame.Copy();
                  }
                  

                  希望這次能幫助您找到解決方案,抱歉,其他方法沒用,

                  Hope this helps get you to a solution this time, and sorry the other method was of no use,

                  干杯克里斯

                  這篇關于System.TypeInitializationException 在 C# 中使用 Emgu.CV的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                  <i id='hbga1'><tr id='hbga1'><dt id='hbga1'><q id='hbga1'><span id='hbga1'><b id='hbga1'><form id='hbga1'><ins id='hbga1'></ins><ul id='hbga1'></ul><sub id='hbga1'></sub></form><legend id='hbga1'></legend><bdo id='hbga1'><pre id='hbga1'><center id='hbga1'></center></pre></bdo></b><th id='hbga1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hbga1'><tfoot id='hbga1'></tfoot><dl id='hbga1'><fieldset id='hbga1'></fieldset></dl></div>
                  <legend id='hbga1'><style id='hbga1'><dir id='hbga1'><q id='hbga1'></q></dir></style></legend>

                      • <tfoot id='hbga1'></tfoot>
                          <tbody id='hbga1'></tbody>

                        <small id='hbga1'></small><noframes id='hbga1'>

                            <bdo id='hbga1'></bdo><ul id='hbga1'></ul>
                            主站蜘蛛池模板: 中文二区| 狠狠色网| 久久国产成人午夜av影院武则天 | 亚洲色图婷婷 | 国产精品久久久久av | 精品国产乱码久久久久久丨区2区 | 久免费视频 | 91视视频在线观看入口直接观看 | 天天人人精品 | 欧美一区视频 | 久久久久一区二区 | 亚洲成人免费视频 | 欧美自拍另类 | 日韩在线中文字幕 | 黄色大片免费观看 | 亚洲精品一二区 | 国产 日韩 欧美 在线 | 久久精品久久综合 | 天天综合网天天综合色 | 亚洲欧洲精品一区 | 亚洲欧美中文日韩在线v日本 | 夜夜操天天操 | 精品综合久久久 | 欧美伊人影院 | 亚洲高清视频在线观看 | 国产精品久久久久久久久久 | 最新中文在线视频 | 亚洲国产精品福利 | 国产一级影片 | 在线视频成人 | h视频在线免费 | 国产欧美一区二区三区在线看 | 天天天天操 | 91精品国产91久久综合桃花 | 色性av | 国产精品视频久久久 | 欧美一级毛片免费观看 | 天堂一区 | 久久久久国产一区二区 | 亚洲精品www| 亚洲免费网站 |