久久久久久久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的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  此時(shí)我有一個(gè)函數(shù),它從我的相機(jī)界面調(diào)用圖像.此圖像隨后會(huì)保存到硬盤驅(qū)動(dòng)器并顯示在 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.

                  相機(jī)接口內(nèi)部返回圖像的函數(shù)如下:高度和寬度都是屬于相機(jī)接口類的整數(shù).在本例中,它們被設(shè)置為 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;
                  }
                  

                  多次調(diào)用該函數(shù)首先表明捕獲幀花費(fèi)了相對(duì)較長的時(shí)間,導(dǎo)致程序在幾秒鐘內(nèi)無法使用.然后,在 Debug with Visual C# 2010 中運(yùn)行程序時(shí)捕獲了幾幀后,彈出 vshost.exe 的 windows 錯(cuò)誤:

                  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.
                  

                  然后我繼續(xù)發(fā)布應(yīng)用程序并從可執(zhí)行文件運(yùn)行它并收到錯(cuò)誤:

                  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).

                  是什么導(dǎo)致了這些問題?如何避免它們?有沒有什么方法可以比現(xiàn)在更快地捕獲幀(當(dāng)它不崩潰時(shí))?

                  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)?

                  推薦答案

                  我看了你的代碼,我發(fā)現(xiàn)了問題.我期望它崩潰的原因是由于我建議的 using 語句抱歉:s.不完全是 using 語句.您似乎經(jīng)常訪問代碼以供系統(tǒng)處理.

                  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()
                  

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

                  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.

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

                  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,

                  干杯克里斯

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

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 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>
                            主站蜘蛛池模板: 欧美成人精品 | 黄色a级一级片 | 欧美久久国产精品 | 欧美激情一区二区 | 在线观看成人精品 | 精精国产视频 | 亚洲三级视频 | 97精品国产97久久久久久免费 | 精品免费国产一区二区三区四区 | 亚洲毛片在线 | 老外几下就让我高潮了 | 国产无人区一区二区三区 | 午夜99 | 三级黄视频在线观看 | 免费三级网 | 欧美一区二区三区国产 | 日日干日日操 | 国产精品国产精品国产专区不片 | 精品中文字幕在线 | 国产精品久久久久久婷婷天堂 | 亚洲精品久久久久国产 | 蜜桃在线一区二区三区 | 久久国产视频播放 | 久久一日本道色综合久久 | 午夜男人天堂 | 亚洲三区视频 | 久久精品视频在线播放 | 国产成人一区二区三区 | 操视频网站 | 99riav国产一区二区三区 | 欧美在线a | 国产精品毛片一区二区在线看 | 无码一区二区三区视频 | 欧美黄色片在线观看 | 欧美涩 | 亚洲一区二区在线播放 | 亚州春色 | 欧美一区二区三区在线播放 | 日日做夜夜爽毛片麻豆 | 久久久久国产一区二区三区 | 91精品国产乱码久久久久久久 |