Skip to content

Commit a59219d

Browse files
committed
Updated usage version of Unity Editor to 5.6.1.f1. (HoloToolit-Unity1.5.7.0 OpenCVForUnity2.1.8)
Fixed properties and methods naming. Updated usage version of the WebCamTextureToMatHelper to 1.0.1. Updated usage version of the RectangleTracker to 1.0.1.
1 parent ddff7e6 commit a59219d

30 files changed

Lines changed: 1314 additions & 793 deletions

Assets/HoloLensWithOpenCVForUnityExample/HoloLensArUcoExample/HoloLensArUcoExample.cs

Lines changed: 166 additions & 99 deletions
Large diffs are not rendered by default.

Assets/HoloLensWithOpenCVForUnityExample/HoloLensArUcoExample/HoloLensArUcoExample.unity

Lines changed: 493 additions & 87 deletions
Large diffs are not rendered by default.

Assets/HoloLensWithOpenCVForUnityExample/HoloLensArUcoExample/HoloLensArUcoExample/LightingData.asset.meta

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

Assets/HoloLensWithOpenCVForUnityExample/HoloLensArUcoExample/HoloLensArUcoExample/ReflectionProbe-0.exr.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine.VR.WSA.Input;
4+
using UnityEngine;
5+
using UnityEngine.Events;
6+
7+
namespace HoloLensWithOpenCVForUnityExample
8+
{
9+
public class TapInput : MonoBehaviour
10+
{
11+
12+
public UnityEvent OnTappedEvent;
13+
14+
GestureRecognizer recognizer;
15+
16+
void Awake ()
17+
{
18+
recognizer = new GestureRecognizer ();
19+
recognizer.TappedEvent += (source, tapCount, ray) => {
20+
OnTappedEvent.Invoke ();
21+
};
22+
recognizer.StartCapturingGestures ();
23+
}
24+
}
25+
}

Assets/HoloLensWithOpenCVForUnityExample/HoloLensArUcoExample/TapInput.cs.meta

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

Assets/HoloLensWithOpenCVForUnityExample/HoloLensComicFilterExample/HoloLensComicFilterExample.cs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
namespace HoloLensWithOpenCVForUnityExample
1111
{
12-
1312
/// <summary>
14-
/// HoloLens ComicFilter example.
13+
/// HoloLens ComicFilter example. (Example of the comic filter using the OpenCVForUnity on Hololens)
1514
/// referring to the http://dev.classmethod.jp/smartphone/opencv-manga-2/.
1615
/// </summary>
1716
[RequireComponent(typeof(OptimizationWebCamTextureToMatHelper))]
@@ -67,7 +66,7 @@ public class HoloLensComicFilterExample : MonoBehaviour
6766
/// </summary>
6867
OptimizationWebCamTextureToMatHelper webCamTextureToMatHelper;
6968

70-
private OpenCVForUnity.Rect processingAreaRect;
69+
OpenCVForUnity.Rect processingAreaRect;
7170
public Vector2 outsideClippingRatio = new Vector2(0.17f, 0.19f);
7271
public Vector2 clippingOffset = new Vector2(0.043f, -0.041f);
7372
public float vignetteScale = 1.8f;
@@ -77,21 +76,21 @@ public class HoloLensComicFilterExample : MonoBehaviour
7776
// public Vector2 clippingOffset = new Vector2(0.0f, 0.0f);
7877
// public float vignetteScale = 0.3f;
7978

80-
private Mat dstMatClippingROI;
79+
Mat dstMatClippingROI;
8180

8281
// Use this for initialization
8382
void Start ()
8483
{
8584
webCamTextureToMatHelper = gameObject.GetComponent<OptimizationWebCamTextureToMatHelper> ();
86-
webCamTextureToMatHelper.Init ();
85+
webCamTextureToMatHelper.Initialize ();
8786
}
8887

8988
/// <summary>
90-
/// Raises the web cam texture to mat helper inited event.
89+
/// Raises the web cam texture to mat helper initialized event.
9190
/// </summary>
92-
public void OnWebCamTextureToMatHelperInited ()
91+
public void OnWebCamTextureToMatHelperInitialized ()
9392
{
94-
Debug.Log ("OnWebCamTextureToMatHelperInited");
93+
Debug.Log ("OnWebCamTextureToMatHelperInitialized");
9594

9695
Mat webCamTextureMat = webCamTextureToMatHelper.GetDownScaleMat( webCamTextureToMatHelper.GetMat ());
9796

@@ -286,9 +285,9 @@ void OnDisable ()
286285
}
287286

288287
/// <summary>
289-
/// Raises the back button event.
288+
/// Raises the back button click event.
290289
/// </summary>
291-
public void OnBackButton ()
290+
public void OnBackButtonClick ()
292291
{
293292
#if UNITY_5_3 || UNITY_5_3_OR_NEWER
294293
SceneManager.LoadScene ("HoloLensWithOpenCVForUnityExample");
@@ -298,35 +297,35 @@ public void OnBackButton ()
298297
}
299298

300299
/// <summary>
301-
/// Raises the play button event.
300+
/// Raises the play button click event.
302301
/// </summary>
303-
public void OnPlayButton ()
302+
public void OnPlayButtonClick ()
304303
{
305304
webCamTextureToMatHelper.Play ();
306305
}
307306

308307
/// <summary>
309-
/// Raises the pause button event.
308+
/// Raises the pause button click event.
310309
/// </summary>
311-
public void OnPauseButton ()
310+
public void OnPauseButtonClick ()
312311
{
313312
webCamTextureToMatHelper.Pause ();
314313
}
315314

316315
/// <summary>
317-
/// Raises the stop button event.
316+
/// Raises the stop button click event.
318317
/// </summary>
319-
public void OnStopButton ()
318+
public void OnStopButtonClick ()
320319
{
321320
webCamTextureToMatHelper.Stop ();
322321
}
323322

324323
/// <summary>
325-
/// Raises the change camera button event.
324+
/// Raises the change camera button click event.
326325
/// </summary>
327-
public void OnChangeCameraButton ()
326+
public void OnChangeCameraButtonClick ()
328327
{
329-
webCamTextureToMatHelper.Init (null, webCamTextureToMatHelper.requestWidth, webCamTextureToMatHelper.requestHeight, !webCamTextureToMatHelper.requestIsFrontFacing);
328+
webCamTextureToMatHelper.Initialize (null, webCamTextureToMatHelper.requestedWidth, webCamTextureToMatHelper.requestedHeight, !webCamTextureToMatHelper.requestedIsFrontFacing);
330329
}
331330
}
332331
}

Assets/HoloLensWithOpenCVForUnityExample/HoloLensComicFilterExample/HoloLensComicFilterExample.unity

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
1313
--- !u!104 &2
1414
RenderSettings:
1515
m_ObjectHideFlags: 0
16-
serializedVersion: 7
16+
serializedVersion: 8
1717
m_Fog: 0
1818
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
1919
m_FogMode: 3
@@ -25,6 +25,7 @@ RenderSettings:
2525
m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
2626
m_AmbientIntensity: 1
2727
m_AmbientMode: 3
28+
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
2829
m_SkyboxMaterial: {fileID: 0}
2930
m_HaloStrength: 0.5
3031
m_FlareStrength: 1
@@ -41,7 +42,7 @@ RenderSettings:
4142
--- !u!157 &4
4243
LightmapSettings:
4344
m_ObjectHideFlags: 0
44-
serializedVersion: 7
45+
serializedVersion: 9
4546
m_GIWorkflowMode: 1
4647
m_GISettings:
4748
serializedVersion: 2
@@ -53,7 +54,7 @@ LightmapSettings:
5354
m_EnableBakedLightmaps: 1
5455
m_EnableRealtimeLightmaps: 0
5556
m_LightmapEditorSettings:
56-
serializedVersion: 4
57+
serializedVersion: 8
5758
m_Resolution: 1
5859
m_BakeResolution: 50
5960
m_TextureWidth: 1024
@@ -66,13 +67,27 @@ LightmapSettings:
6667
m_LightmapParameters: {fileID: 0}
6768
m_LightmapsBakeMode: 1
6869
m_TextureCompression: 0
69-
m_DirectLightInLightProbes: 1
7070
m_FinalGather: 0
7171
m_FinalGatherFiltering: 1
7272
m_FinalGatherRayCount: 1024
7373
m_ReflectionCompression: 2
74+
m_MixedBakeMode: 1
75+
m_BakeBackend: 0
76+
m_PVRSampling: 1
77+
m_PVRDirectSampleCount: 32
78+
m_PVRSampleCount: 500
79+
m_PVRBounces: 2
80+
m_PVRFiltering: 0
81+
m_PVRFilteringMode: 1
82+
m_PVRCulling: 1
83+
m_PVRFilteringGaussRadiusDirect: 1
84+
m_PVRFilteringGaussRadiusIndirect: 5
85+
m_PVRFilteringGaussRadiusAO: 2
86+
m_PVRFilteringAtrousColorSigma: 1
87+
m_PVRFilteringAtrousNormalSigma: 1
88+
m_PVRFilteringAtrousPositionSigma: 1
7489
m_LightingDataAsset: {fileID: 0}
75-
m_RuntimeCPUUsage: 25
90+
m_ShadowMaskMode: 2
7691
--- !u!196 &5
7792
NavMeshSettings:
7893
serializedVersion: 2
@@ -89,6 +104,8 @@ NavMeshSettings:
89104
minRegionArea: 2
90105
manualCellSize: 0
91106
cellSize: 0.16666666
107+
manualTileSize: 0
108+
tileSize: 256
92109
accuratePlacement: 0
93110
m_NavMeshData: {fileID: 0}
94111
--- !u!1 &62512751
@@ -228,7 +245,7 @@ MonoBehaviour:
228245
m_PersistentCalls:
229246
m_Calls:
230247
- m_Target: {fileID: 1076083695}
231-
m_MethodName: OnBackButton
248+
m_MethodName: OnBackButtonClick
232249
m_Mode: 1
233250
m_Arguments:
234251
m_ObjectArgument: {fileID: 0}
@@ -374,7 +391,7 @@ MonoBehaviour:
374391
m_PersistentCalls:
375392
m_Calls:
376393
- m_Target: {fileID: 1076083695}
377-
m_MethodName: OnPlayButton
394+
m_MethodName: OnPlayButtonClick
378395
m_Mode: 1
379396
m_Arguments:
380397
m_ObjectArgument: {fileID: 0}
@@ -602,7 +619,7 @@ MonoBehaviour:
602619
m_PersistentCalls:
603620
m_Calls:
604621
- m_Target: {fileID: 1076083695}
605-
m_MethodName: OnPauseButton
622+
m_MethodName: OnPauseButtonClick
606623
m_Mode: 1
607624
m_Arguments:
608625
m_ObjectArgument: {fileID: 0}
@@ -756,7 +773,7 @@ Prefab:
756773
objectReference: {fileID: 0}
757774
- target: {fileID: 4000012520274942, guid: c828c5b9571ec9c4bb75aef2ba6bc8c5, type: 2}
758775
propertyPath: m_RootOrder
759-
value: 0
776+
value: 1
760777
objectReference: {fileID: 0}
761778
- target: {fileID: 4000012084356042, guid: c828c5b9571ec9c4bb75aef2ba6bc8c5, type: 2}
762779
propertyPath: m_LocalScale.x
@@ -924,6 +941,7 @@ MeshRenderer:
924941
m_AutoUVMaxAngle: 89
925942
m_LightmapParameters: {fileID: 0}
926943
m_SortingLayerID: 0
944+
m_SortingLayer: 0
927945
m_SortingOrder: 0
928946
--- !u!64 &1076083697
929947
MeshCollider:
@@ -970,18 +988,19 @@ MonoBehaviour:
970988
m_Script: {fileID: 11500000, guid: 28e142b476c838049871b666621dda2e, type: 3}
971989
m_Name:
972990
m_EditorClassIdentifier:
973-
requestDeviceName:
974-
requestWidth: 896
975-
requestHeight: 504
976-
requestIsFrontFacing: 0
991+
requestedDeviceName:
992+
requestedWidth: 640
993+
requestedHeight: 480
994+
requestedIsFrontFacing: 0
995+
requestedFPS: 30
977996
flipVertical: 0
978997
flipHorizontal: 0
979998
timeoutFrameCount: 300
980-
OnInitedEvent:
999+
onInitialized:
9811000
m_PersistentCalls:
9821001
m_Calls:
9831002
- m_Target: {fileID: 1076083695}
984-
m_MethodName: OnWebCamTextureToMatHelperInited
1003+
m_MethodName: OnWebCamTextureToMatHelperInitialized
9851004
m_Mode: 1
9861005
m_Arguments:
9871006
m_ObjectArgument: {fileID: 0}
@@ -993,7 +1012,7 @@ MonoBehaviour:
9931012
m_CallState: 2
9941013
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
9951014
PublicKeyToken=null
996-
OnDisposedEvent:
1015+
onDisposed:
9971016
m_PersistentCalls:
9981017
m_Calls:
9991018
- m_Target: {fileID: 1076083695}
@@ -1009,7 +1028,7 @@ MonoBehaviour:
10091028
m_CallState: 2
10101029
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral,
10111030
PublicKeyToken=null
1012-
OnErrorOccurredEvent:
1031+
onErrorOccurred:
10131032
m_PersistentCalls:
10141033
m_Calls:
10151034
- m_Target: {fileID: 1076083695}
@@ -1025,8 +1044,8 @@ MonoBehaviour:
10251044
m_CallState: 2
10261045
m_TypeName: HoloLensWithOpenCVForUnityExample.WebCamTextureToMatHelper+ErrorUnityEvent,
10271046
Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
1028-
DOWNSCALE_RATIO: 1
1029-
SKIP_FRAMES: 1
1047+
downscaleRatio: 2
1048+
frameSkippingRatio: 2
10301049
--- !u!20 &1076969803 stripped
10311050
Camera:
10321051
m_PrefabParentObject: {fileID: 20000013304850028, guid: d379ed0a5618c9f479f58bd83a2d0ad3,
@@ -1131,7 +1150,7 @@ MonoBehaviour:
11311150
m_PersistentCalls:
11321151
m_Calls:
11331152
- m_Target: {fileID: 1076083695}
1134-
m_MethodName: OnChangeCameraButton
1153+
m_MethodName: OnChangeCameraButtonClick
11351154
m_Mode: 1
11361155
m_Arguments:
11371156
m_ObjectArgument: {fileID: 0}
@@ -1431,7 +1450,7 @@ MonoBehaviour:
14311450
m_PersistentCalls:
14321451
m_Calls:
14331452
- m_Target: {fileID: 1076083695}
1434-
m_MethodName: OnStopButton
1453+
m_MethodName: OnStopButtonClick
14351454
m_Mode: 1
14361455
m_Arguments:
14371456
m_ObjectArgument: {fileID: 0}
@@ -1544,7 +1563,7 @@ Canvas:
15441563
m_PrefabInternal: {fileID: 0}
15451564
m_GameObject: {fileID: 1478280149}
15461565
m_Enabled: 1
1547-
serializedVersion: 2
1566+
serializedVersion: 3
15481567
m_RenderMode: 2
15491568
m_Camera: {fileID: 1076969803}
15501569
m_PlaneDistance: 100
@@ -1553,6 +1572,7 @@ Canvas:
15531572
m_OverrideSorting: 0
15541573
m_OverridePixelPerfect: 0
15551574
m_SortingBucketNormalizedSize: 0
1575+
m_AdditionalShaderChannelsFlag: 25
15561576
m_SortingLayerID: 0
15571577
m_SortingOrder: 0
15581578
m_TargetDisplay: 0

0 commit comments

Comments
 (0)