Skip to content

Commit 9b13024

Browse files
committed
update 2.4.5
1 parent 602df1d commit 9b13024

File tree

118 files changed

+5576
-739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+5576
-739
lines changed

Assets/OpenCVForUnity/Examples.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/AlphaBlendingExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/ComicFilterExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/DocumentScannerExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/GreenScreenExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/HandPoseEstimationExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/MatToTextureInRenderThreadExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/MultiObjectTrackingBasedOnColorExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Advanced/MultiObjectTrackingBasedOnColorExample/MultiObjectTrackingBasedOnColorExample.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void OnWebCamTextureToMatHelperInitialized ()
9191

9292
Mat webCamTextureMat = webCamTextureToMatHelper.GetMat ();
9393

94-
texture = new Texture2D (webCamTextureMat.cols (), webCamTextureMat.rows (), TextureFormat.RGB24, false);
94+
texture = new Texture2D (webCamTextureMat.cols (), webCamTextureMat.rows (), TextureFormat.RGBA32, false);
9595
Utils.fastMatToTexture2D(webCamTextureMat, texture);
9696

9797
gameObject.GetComponent<Renderer> ().material.mainTexture = texture;
@@ -183,10 +183,12 @@ void Update ()
183183
Core.inRange (hsvMat, green.getHSVmin (), green.getHSVmax (), thresholdMat);
184184
morphOps (thresholdMat);
185185
trackFilteredObject (green, thresholdMat, hsvMat, rgbMat);
186-
187-
// Imgproc.putText (rgbMat, "W:" + rgbMat.width () + " H:" + rgbMat.height () + " SO:" + Screen.orientation, new Point (5, rgbMat.rows () - 10), Imgproc.FONT_HERSHEY_SIMPLEX, 1.0, new Scalar (255, 255, 255, 255), 2, Imgproc.LINE_AA, false);
188186

189-
Utils.fastMatToTexture2D (rgbMat, texture);
187+
//Imgproc.putText (rgbMat, "W:" + rgbMat.width () + " H:" + rgbMat.height () + " SO:" + Screen.orientation, new Point (5, rgbMat.rows () - 10), Imgproc.FONT_HERSHEY_SIMPLEX, 1.0, new Scalar (255, 255, 255, 255), 2, Imgproc.LINE_AA, false);
188+
189+
Imgproc.cvtColor(rgbMat, rgbaMat, Imgproc.COLOR_RGB2RGBA);
190+
191+
Utils.fastMatToTexture2D (rgbaMat, texture);
190192
}
191193
}
192194

Assets/OpenCVForUnity/Examples/Advanced/PolygonFilterExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/MatBasicProcessingExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/Texture2DToMatExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/Utils_GetFilePathExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/WebCamTextureToMatExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/WebCamTextureToMatHelperExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/Basic/WebCamTextureToMatHelperExample/WebCamTextureToMatHelperExample.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void OnWebCamTextureToMatHelperInitialized()
9898
Debug.Log("OnWebCamTextureToMatHelperInitialized");
9999

100100
Mat webCamTextureMat = webCamTextureToMatHelper.GetMat();
101-
101+
102102
texture = new Texture2D(webCamTextureMat.cols(), webCamTextureMat.rows(), TextureFormat.RGBA32, false);
103103
Utils.fastMatToTexture2D(webCamTextureMat, texture);
104104

@@ -268,10 +268,10 @@ public void OnRotate90DegreeToggleValueChanged()
268268
if (rotate90DegreeToggle.isOn != webCamTextureToMatHelper.rotate90Degree)
269269
{
270270
webCamTextureToMatHelper.rotate90Degree = rotate90DegreeToggle.isOn;
271-
}
272271

273-
if (fpsMonitor != null)
274-
fpsMonitor.Add("rotate90Degree", webCamTextureToMatHelper.rotate90Degree.ToString());
272+
if (fpsMonitor != null)
273+
fpsMonitor.Add("rotate90Degree", webCamTextureToMatHelper.rotate90Degree.ToString());
274+
}
275275
}
276276

277277
/// <summary>
@@ -282,10 +282,10 @@ public void OnFlipVerticalToggleValueChanged()
282282
if (flipVerticalToggle.isOn != webCamTextureToMatHelper.flipVertical)
283283
{
284284
webCamTextureToMatHelper.flipVertical = flipVerticalToggle.isOn;
285-
}
286285

287-
if (fpsMonitor != null)
288-
fpsMonitor.Add("flipVertical", webCamTextureToMatHelper.flipVertical.ToString());
286+
if (fpsMonitor != null)
287+
fpsMonitor.Add("flipVertical", webCamTextureToMatHelper.flipVertical.ToString());
288+
}
289289
}
290290

291291
/// <summary>
@@ -296,10 +296,10 @@ public void OnFlipHorizontalToggleValueChanged()
296296
if (flipHorizontalToggle.isOn != webCamTextureToMatHelper.flipHorizontal)
297297
{
298298
webCamTextureToMatHelper.flipHorizontal = flipHorizontalToggle.isOn;
299-
}
300299

301-
if (fpsMonitor != null)
302-
fpsMonitor.Add("flipHorizontal", webCamTextureToMatHelper.flipHorizontal.ToString());
300+
if (fpsMonitor != null)
301+
fpsMonitor.Add("flipHorizontal", webCamTextureToMatHelper.flipHorizontal.ToString());
302+
}
303303
}
304304

305305
public enum FPSPreset : int

Assets/OpenCVForUnity/Examples/ContribModules.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/ContribModules/aruco.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/OpenCVForUnity/Examples/ContribModules/aruco/ArUcoExample.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)