FAQ

General

Support Web platform?

Since the Unity Web Player does not support the native plugin, “OpenCV for Unity” does not support “WebPlayer Platform”.

A WebGL platform was added as an alternative. (Unity 5.3 or higher)

Support Windows10 UWP?

Yes. The asset supports the UWP platform.

Asset package size is large. Is there a way to reduce?

Please remove plugin folders of non-output target platforms that are included in the package.

What is the minimum file composition required for the assets to work?

You do not necessarily have to import all the files for the asset to work. If you do not need to try the example scenes, the minimum file composition required is as follows:

Offer a free version?

Yes, we offer a free trial version of OpenCVForUnity Asset.

https://enoxsoftware.com/opencvforunity/get_asset/

Is there a known problem in the WebGL platform?

We know the existence of the following problems.

  • Put a file that you want to use for the Utils.getFilePathAsync() in the “Aseets/StreamingAssets/” folder. In Case of WebGL platform, you need to use  the Utils.getFilePathAsync() instead of the Utils.getFilePath(). (The haarcascade_frontalface_alt.xml is for OpenCVForUnityExample’s scenes. Please copy only when necessary)
  • On the WebGL platform  (asm.js), the calculation result of Float type may be significantly different from other platforms. When using the OpenCV’s method that use the Mat class (CvType is CV_32F) as an argument, you need to pay attention to the calculation precision.

Setup

“DllNotFoundException: opencvforunity” is displayed on the console when run the example scene.

The plugin does not seem to be loaded correctly. Please check the setup procedure.

“ArgumentException: The output Mat object has to be of the same size” is displayed on the console when run the example scene.

After having setup Plugin, Plugin may work well when you reboot Unity.

“Level ‘Texture2DtoMatExample’ (-1) could not be loaded because it has not been added to the build settings.” is displayed on the console when run the example scene.

Please add all of “***.unity” scenes into the “Assets/OpenCVForUnity/Examples” folder to [Build Settings] – [Scene In Build].

In DetectFaceExample or WebCamTextureDetectFaceExample, red rectangle is not displayed around a face.

You might have failed to read the “haarcascade_frontalface_alt.xml”. Please confirm whether there is the “OpenCVForUnity/StreamingAssets” folder at the right position.

OpenCV

How do learn the details of OpenCV’s method and argument?

Please refer to OpenCV official document (http://docs.opencv.org/3.3.0/index.html) and OpenCV Tutorials (http://docs.opencv.org/3.3.0/d9/df8/tutorial_root.html) for the details of the argument of the method.

How can I convert Mat class operators defined in C++?

See this page. ([Tips] Way to translation of Mat class operators defined in C++)

How to a way to catch native OpenCV’s errors code?

In order to display the native opencv’s error code, please enclose the code in Utils.setDebugMode(true) and Utils.setDebugMode(false).

Utils.setDebugMode(true); ------------ Utils.setDebugMode(false);

See this page for details. ([Tips] How to catch native OpenCV’s errors code (CVException handling))