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

OpenCV + Unity3D 集成

OpenCV + Unity3D integration(OpenCV + Unity3D 集成)
本文介紹了OpenCV + Unity3D 集成的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我是一名統一開發人員,第一次嘗試使用 opencv.我最初的目標是在 unity3d 中通過 opencv 運行相機并檢測 blob.我是 OpenCV 的新手,正在嘗試將它集成到 Unity3D 中(在 Windows 8 上使用 Unity 4.3.2 和在 Mac 上使用 Unity 4.2.1f).我關注了 this 線程.但是,一旦添加新的 C# 腳本,我就會收到以下錯誤.當我刪除這個腳本時,錯誤就出現了(這個腳本是 Unity 生成的 C# 腳本).

I am a unity developer trying my hands on opencv for the first time. My initial goal is to run the camera and detect blobs via opencv in unity3d. I am new to OpenCV and am trying to integrate it in Unity3D (on Windows 8 with Unity 4.3.2 and on a mac with Unity 4.2.1f). I followed this thread. But I am getting the following error as soon as I add a new C# script. And the moment I delete this script, the error goes (this script is Unity generated C# script).

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

我找不到太多關于 Unity 和 OpenCV 集成的信息.如果您能幫助我解決此錯誤并指出我最近的教程以了解更多信息,那就太好了.

I couldn't find much about Unity and OpenCV integration. It would be great if you could help me out with this error and point me to a recent tutorial to learn more.

提前致謝!

推薦答案

我們最近不得不處理同樣的問題,我會發布一些通用信息來解決您的問題并幫助其他人.

We recently had to deal with the same problem, I'll post some generic information that would solve your problem and help other people.

  1. OpenCV 庫和您的 OpenCV 項目必須編譯為靜態庫 (參見 OpenCV作為靜態庫).
  2. OpenCV 庫和您的 OpenCV 項目必須針對 32 位和 64 位架構進行編譯.
  3. 編輯器內部將使用 32 位版本(因為 Unity3D 編輯器僅支持 32 位架構),64 位版本用于生產.
  4. 編譯后的 OpenCV 項目必須復制到 Asset > Plugins 文件夾中,OpenCV 庫必須復制到 Assets 文件夾中.
  5. 要在 C# 腳本中使用您的 OpenCV 項目,請遵循以下代碼示例:

  1. OpenCV library and your OpenCV project must be compiled as static libraries (see OpenCV as a static library).
  2. OpenCV library and your OpenCV project must be compiled for both 32bit and 64bit architectures.
  3. The 32bit version will be used inside the editor (since the Unity3D editor supports 32bit architectures only), the 64 bit version for production.
  4. The compiled OpenCV project must be copied inside the Asset > Plugins folder, the OpenCV library must be copied inside the Assets folder.
  5. To use your OpenCV project inside a C# script, follow this code example:

using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;

public class PluginImport : MonoBehaviour {
    //Lets make our calls from the Plugin
    [DllImport ("OpenCVProject")]
    private static extern int openCVFunction(); 

    void Start () {
        openCVFunction();
    }
}

注意using指令!

其他信息來源:

  • Unity 手冊:插件

這篇關于OpenCV + Unity3D 集成的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權不起作用)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
Getting access token using email address and app password from oauth2/token(使用電子郵件地址和應用程序密碼從 oauth2/token 獲取訪問令牌)
New Azure AD application doesn#39;t work until updated through management portal(新的 Azure AD 應用程序在通過管理門戶更新之前無法運行)
主站蜘蛛池模板: 国产视频一二三区 | 日日拍夜夜| 日韩久久精品 | 国产精品1区2区3区 欧美 中文字幕 | 国产精品视频免费看 | 在线免费黄色小视频 | 黄色免费网站在线看 | 91欧美激情一区二区三区成人 | 精区3d动漫一品二品精区 | 国产成人亚洲精品自产在线 | 一区二区三区视频在线免费观看 | 久久久久国产精品午夜一区 | 亚洲人成一区二区三区性色 | 在线久草| 亚洲天堂av在线 | 亚洲91av | 成人免费视频播放 | 精品亚洲一区二区三区四区五区 | 亚洲品质自拍视频网站 | 久久精品久久精品 | 国产精品久久久久久久久久免费看 | 成人国产午夜在线观看 | 中文字幕第九页 | 国产日韩精品视频 | 日韩成人专区 | 亚洲高清视频一区二区 | 欧美一区二区另类 | 日操操 | 亚洲国产精品一区二区三区 | 国产专区在线 | 午夜精品网站 | 男人午夜视频 | 国产精品国产成人国产三级 | 欧美一区二区三区在线播放 | 亚洲欧美综合精品另类天天更新 | 日韩av在线中文字幕 | 久久网一区二区 | 在线婷婷| 欧美精品一区二区三区四区 | 亚洲专区在线 | 久久精品亚洲一区 |