OpenCV for Unity 2.2.9
WebGL support
iOS & Android support
Windows10 UWP support
Win & Mac & Linux Standalone support
Support for preview in the Editor
Work with Unity Free & Pro
System Requirements
Build Win Standalone & Preview Editor : Windows7 or later
Build Mac Standalone & Preview Editor : OSX 10.9 or later
OpenCV for Unity is an Assets Plugin for using OpenCV from within Unity.
Since this package is a clone of OpenCV Java, you are able to use the same API as
OpenCV Java 3.4.1(git: opencv,opencv-contrib).
You can image processing in real-time by using the WebCamTexture capabilities of
Unity. (real-time face detection works smoothly on iPhone 5)
Provides a method to interconversion of Unity's Texture2D and OpenCV's Mat.
IDisposable is implemented in many classes.You can manage the resources with
the “using” statement.
PlayMakerActions for OpenCVforUnity is available.
Official Site | ExampleCode | Android Demo WebGL Demo | Tutorial & Demo Video |
Forum | API Reference | Support Modules
Please refer to OpenCV official document for the details of the argument of the method.
Example code using OpenCV for Unity is available.
MarkerBased AR Example
MarkerLess AR Example
FaceTracker Example
FaceSwapper Example
FaceMask Example
RealTime FaceRecognition Example
GoogleVRWithOpenCVForUnityExample
Voforia with OpenCV for Unity Example
Kinect with OpenCV for Unity Example
AVPro with OpenCV for Unity Example
HoloLens with OpenCV for Unity Example
Version changes
2.2.9 [Linux]Simplified the Linux platform setup procedure. [Common]Added support
for Utils. setDebugMode() method on all platforms. [Common]Updated to
WebCamTextureToMatHelper.cs v1.0.9. [Common]Added
MatToTextureInRenderThreadExample and AlphaBlendingExample.
2.2.8 [Common]Updated to WebCamTextureToMatHelper.cs v1.0.7. [Common]Added
MatBasicProcessingExample. [Common]Fixed WebCamTextureToMatExample,
WebCamTextureToMatHelperExample, ArUcoExample. [Common]Added flip flag to
Utils.fastMatToTexture2D() method and Utils.fastTexture2DToMat() method.
[Common]Added throwException flag to Utils.setDebugMode() method.
2.2.7 [Common]Updated to OpenCV3.4.1. [Common]Added OpenPoseExample(The
model file is not included in this asset.), KalmanFilterExample,
ArUcoCameraCalibrationExample. [Common]Fixed VideoWriterExample,
VideoCaptureExample, ImwriteScreenCaptureExample, CamShiftExample,
TrackingExample, HandPoseEstimationExample, ArUcoCreateMarkerExample,
ArUcoExample, ArUcoWebCamTextureExample. [Common] Updated to
WebCamTextureToMatHelper.cs v1.0.6.
2.2.6 [Android]Added arm64-v8a Architecture. [Common]Added
ImwriteScreenCaptureExample.
2.2.5 [Common] Updated to WebCamTextureToMatHelper.cs v1.0.4. [Common] Fixed
MobileNetSSDExample and MobileNetSSDWebCamTextureExample.
2.2.4 [Common]Updated to OpenCV3.3.1. [Common]Added
ResnetSSDFaceDetectionExample, YoloObjectDetectionExample,
YoloObjectDetectionWebCamTextureExample.
2.2.3 [Common]Updated to WebCamTextureToMatHelper.cs v1.0.3. [iOS]
opencv2.framework is changed from static framework to embededd framework. (Target
minimum iOS Version must be set to 8.0 or higher.)
2.2.2 [Common]Added TextRecognitionExample.
2.2.1 [Common]Updated to OpenCV3.3.0. [Common]Added dnn
module.(win,mac,ios,android platform) [Common]Added img_hash, reg, text
module.(all platform) [Common]Added MobileNetSSDExample,
MobileNetSSDWebCamTextureExample, TensorFlowWebCamTextureExample,
ThinPlateSplineShapeTransformerExample, TextDetectionExample,
VideoWriterExample. [Common]WindowsStoreApp8.1 & WindowsPhone8.1 support
have been deprecated.
2.2.0 [Common]Updated WebCamTextureToMatHelper.cs v1.0.2 [Common]Improved
Utils.getFilePathAsync().
2.1.9 [WebGL]Fixed Utils.getFilePathAsync() method.
2.1.8 [Common]Added PCAExample. [Common]Updated
WebCamTextureToMatHelper.cs and
OptimizationWebCamTextureToMatHelper.cs(Changed several method names.).
2.1.7 [Common]Improved Utils.getFilePath() and Utils.getFilePathAsync().
[Common]Improved WebCamTextureAsyncDetectFaceExample.cs. [Common] Fixed
the const value of Calib3d class.
2.1.6 [Common]Fixed fastMatToTexture2D() method.
2.1.5 [Common]Updated to OpenCV3.2.0. [Common]Added fuzzy, phase_unwrapping,
saliency, shape, tracking module. [Common]Added TrackingSample. [iOS]Added
ios_exclude_contrib.zip for build size reduction. [Android]Added
android_exclude_contrib.zip for build size reduction.
2.1.4 [Common]Changed the scene name.("Sample" to "Example") [Common]Fixed
ArUcoTexture2DExample and ArUcoWebCamTextureExample. [Common]Added
ConnectedComponentsExample. [Common]Added GreenScreenExample.
2.1.3 [UWP]Added OpenCVForUnityUWP_Beta3.zip.
2.1.2 [Common]Fixed WebCamTextureToMatHelper.cs.(flipVertical and flipHorizontal
flag)
2.1.1 [Common]Fixed OpenCVForUnityMenuItem.cs.(No valid name for platform: 11
Error) [Common]Added Utils.textureToTexture2D() method. [Common]Added Mat
class operators. [Common]Added PolygonFilterSample.
2.1.0 [Common]Fixed WebCamTextureToMatHelper class. [Common]Added
Utils.getVersion(). [Common]Fixed Utils.getFilePathAsync().
2.0.9 [WebGL]Added WebGL(beta) support.(Unity5.3 or later)
2.0.8 [Common]Improved WebCamTextureHelper class. [Common]Fixed ArUcoSample.
2.0.7 [Common]Added aruco, structured_light, xfeatures2d module. [Common]Added
ArUcoSample, GrabCutSample, InpaintSample, MatchShapesSample, MSERSample.
2.0.6 [WSA]Fixed an issue where Windows App Certification Kit fails.
2.0.5 [Common]Added HOGDescriptorSample.
2.0.4 [Android]Added Support for Split Application Binary (.OBB) [Android]Removed
opencvforunity.jar.
2.0.3 [Common]Added SVMSample. [Common]Fixed VideoCaptureSample and
WebCamTextureAsyncDetectFaceSample. [UWP]Added
OpenCVForUnityUWP_Beta2.zip.
2.0.2 [Common]Fixed CS0618 warnings: `UnityEngine.Application.LoadLevel(string)'
is obsolete: `Use SceneManager.LoadScene'.
2.0.1 [OSX]Fixed SIGILL Exception. [Common]Added Utils.setDebugMode() method.
[Common]Added MatchTemplateSample, StereoBMSample, SeamlessCloneSample
and WebCamTextureDetectCirclesSample. [Common]Added flipVertical flag,
flapHorizontal flag and GetWebCamDevice() method to
WebCamTextureToMatHelper.cs.
2.0.0 [Common]Updated to OpenCV3.1.0. [Common]Included Old Version based on
“OpenCV2.4.11”. [Common] Included Beta Version of Windows10 UWP Support.( This
is beta version based on OpenCV3.0.0. opencv_contrib modules is not supported.)
Beta16 [iOS]Fixed libopencvforunity.a Bitcode Setting.
Beta15 [Common]Fixed WebCamTextureToMatHelper.cs.(Add didUpdateThisFrame ()
method)
Beta14 [Common]Fixed WebCamTextureToMatHelper.cs.( Bug of rotation convertion
from WebCamTexture to Mat in Win,Mac StandAlone Build)
Beta13 [Common]Added fastTexture2DToMat() and fastMatToTexture2D(). [Common]
Renewed the samples using WebCamTextureToMatHelper.(Supports all screen
orientation.)
Beta12 [iOS]Fixed malloc_error that occurs in Unity5.3.1p2.
Beta11 [iOS]Enabled Jpeg format.(Added mjpeg format support in VideoCapture class)
Beta10 [iOS]Enabled Bitcode.
Beta9 [UWP]Added support for Windows10 UWP.( This is a test version. opencv_contrib
modules is not supported.)
Beta8 [Common]Fix FaceRecognizerSample. [Common] Delete the method using
Default parameter specifiers. [Android] Compile the library using “armabi-v7a with
NEON” option.
Beta7 [Common]Add WrapPerspectiveSample, HandPoseEstimationSample.
Beta6 [iOS]Fix WebCamTexture bug of SampleScene in Unity5.2.
Beta5 [Linux]Add Linux Support. [WindowsStoreApp8.1]Support for methods using
Low-level Native Plugin Interface. [Common]Rewrite SampleScene.
Beta4 [Common]Add Utils. getGraphicsDeviceType(). [Common]Add SampleScene
Setup Tutorial Video for Unity5.
Beta3 [Common]Add CamShiftSample.(Object Tracking) [Common]Add
OpenCVForUnityMenuItem.cs.( This script set plugin import settings automatically
from MenuItem.)
Beta2 [iOS] Fix problem when working with Metaio(UnityAppController problem).
[Common]Add [System.Serializable] to basic class. [Common] change folder name from
“OpenCVForUnity/OpenCVForUnity_Editor/” to “OpenCVForUnity/Editor/”.
[iOS]Move “OpenCVForUnity/OpenCVForUnity_Editor/opencv2.framework” to
“OpenCVForUnity/Plugins/iOS”folder.