Version 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.
This is a list of implemented matrix operations that can be combined in arbitrary complex expressions (here A, B stand for matrices ( Mat ), s for a scalar ( Scalar ), alpha for a real-valued scalar ( double )): c++OpenCVForUnity(C#)Addition, subtraction, negation: A+B, A-B, A+s, A-s, s+A, s-A, -AA + BM1 + M2Core.add (M1, M2, M_dst)A – BM1 – M2Core.subtract (M1, M2, M_dst)A + sM1 + sCore.add (M1, s, M_dst)A – sM1 – sCore.subtract (M1, s, M_dst)-A-M1Core.multiply (M1, Scalar.all (-1), M_dst)Scaling: A*alpha A/alphaA * αM1 * 3Core.multiply (M1, Scalar.all (3), M_dst)A / αM1 / 3Core.divide (M1, Scalar.all (3), M_dst)Per-element multiplication and division: A.mul(B), A/B, alpha/AA.mul(B)M1.mul(M2)M1.mul (M2)A / BM1 / M2Core.divide (M1, M2, M_dst)α / A3 / M1Core.divide (new Mat (M1.size (), M1.type (), Scalar.all (3)), M1, M_dst)Matrix multiplication: A*BA * BM1 * M2Core.gemm (M1, M2, 1, new Mat (), 0, M_dst)Comparison: A cmpop B, A cmpop alpha, alpha cmpop A, where cmpop is one of : >, >=, ==, !=, <=, <. The result of comparison is an 8-bit single channel mask whose elements are set to 255 (if the particular element or pair of elements satisfy the condition) or 0.A > BM1 > M2Core.compare (M1, M2, M_dst, Core.CMP_GT)A >= BM1 >= M2Core.compare (M1, M2, M_dst, Core.CMP_GE)A == BM1 == M2Core.compare (M1, M2, M_dst, Core.CMP_EQ)A != BM1 != M2Core.compare (M1, M2, M_dst, Core.CMP_NE)A <= BM1 <= M2Core.compare (M1, M2, M_dst, […]
A new target platform has been added to our Unity Asset “OpenCVForUnity” and “DlibFaceLandmarkDetector“. With this update, it is now possible to develop WebGL applications that users can easily play with web browsers. Although it is currently in beta version, it seems that the main functions are working without problems. It works with Unity 5.3 or later. Demo Application Click To Start Development Tips 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. Please try experiencing WebGL development.