| 
														
															@@ -148,6 +148,7 @@ public partial class ScreenLocate : o0InfraredCameraHandler 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public RectTransform ScreenQuad; 
														 | 
														
														 | 
														
															     public RectTransform ScreenQuad; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public Toggle SaveToggle; 
														 | 
														
														 | 
														
															     public Toggle SaveToggle; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public Toggle FullScreenToggle; 
														 | 
														
														 | 
														
															     public Toggle FullScreenToggle; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public Toggle SingleToggle; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public LineGenerator UILineGenerator; 
														 | 
														
														 | 
														
															     public LineGenerator UILineGenerator; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public bool ShowScreenQuad = false; 
														 | 
														
														 | 
														
															     public bool ShowScreenQuad = false; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -356,6 +357,41 @@ public partial class ScreenLocate : o0InfraredCameraHandler 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         #endregion 
														 | 
														
														 | 
														
															         #endregion 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    // 初始化算法 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    void AlgorithmInit() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (screenIdentification == null) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            screenIdentification = new o0.Project.ScreenIdentification(this); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Debug.Log("[ScreenLocate] 初始化屏幕识别"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //screenIdentification.OnLocateScreenEnter += OnLocateScreenEnter; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            screenIdentification.OnLocateScreenEnd += OnLocateScreenEnd; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //初始化屏幕数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            InfraredCameraHelper.InitScreenLocateManual(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (infraredLocate == null) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            infraredLocate = new InfraredLocate(this, screenIdentification.Screen); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            cameraSize = new Vector(getUVCCameraInfoSize.x, getUVCCameraInfoSize.y); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            InfraredSpot.RefreshMinVerifyLength(new o0.Geometry2D.Float.Vector(getUVCCameraInfoSize.x, getUVCCameraInfoSize.y)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            Debug.Log($"[ScreenLocate] 初始化红外灯识别, 当前相机分辨率: {CameraSize.x}×{CameraSize.y},红外算法追踪距离: {InfraredSpot.MinVerifyLength}"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //InfraredDemo 初始化 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //float redfilterValue = PlayerPrefs.GetFloat("Init redFilterSliderValue", 0.8f); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //Debug.Log("Init Red filterValue:" + redfilterValue); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //infraredLocate.SetBrightnessThreshold(redfilterValue);     // 参数是 红外灯的亮度阈值,阈值越小能够检测到的亮度就越低,默认值是0.93 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            // UI相关 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            infraredLocate.SetSinglePoint(SingleToggle.isOn); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            SingleToggle.onValueChanged.AddListener((i) => 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                infraredLocate.SetSinglePoint(i); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     IEnumerator LateDestoryIEnum(UnityEngine.Object o) 
														 | 
														
														 | 
														
															     IEnumerator LateDestoryIEnum(UnityEngine.Object o) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     { 
														 | 
														
														 | 
														
															     { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (o) 
														 | 
														
														 | 
														
															         if (o) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -451,29 +487,7 @@ public partial class ScreenLocate : o0InfraredCameraHandler 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (mUVCCameraInfo == null) return; 
														 | 
														
														 | 
														
															         if (mUVCCameraInfo == null) return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (screenIdentification == null) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            screenIdentification = new o0.Project.ScreenIdentification(this); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            Debug.Log("[ScreenLocate] 初始化屏幕识别"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //screenIdentification.OnLocateScreenEnter += OnLocateScreenEnter; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            screenIdentification.OnLocateScreenEnd += OnLocateScreenEnd; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //初始化屏幕数据 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            InfraredCameraHelper.InitScreenLocateManual(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if (infraredLocate == null) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            infraredLocate = new InfraredLocate(this, screenIdentification.Screen); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            cameraSize = new Vector(getUVCCameraInfoSize.x, getUVCCameraInfoSize.y); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            InfraredSpot.RefreshMinVerifyLength(new o0.Geometry2D.Float.Vector(getUVCCameraInfoSize.x, getUVCCameraInfoSize.y)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            Debug.Log($"[ScreenLocate] 初始化红外灯识别, 当前相机分辨率: {CameraSize.x}×{CameraSize.y},红外算法追踪距离: {InfraredSpot.MinVerifyLength}"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //InfraredDemo 初始化 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //float redfilterValue = PlayerPrefs.GetFloat("Init redFilterSliderValue", 0.8f); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //Debug.Log("Init Red filterValue:" + redfilterValue); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //infraredLocate.SetBrightnessThreshold(redfilterValue);     // 参数是 红外灯的亮度阈值,阈值越小能够检测到的亮度就越低,默认值是0.93 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        AlgorithmInit(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         /* New*/ 
														 | 
														
														 | 
														
															         /* New*/ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //Debug.Log((mUVCCameraInfo != null) +" = "+ mUVCCameraInfo.IsPreviewing + " = "+ screenIdentification.Screen.Active); 
														 | 
														
														 | 
														
															         //Debug.Log((mUVCCameraInfo != null) +" = "+ mUVCCameraInfo.IsPreviewing + " = "+ screenIdentification.Screen.Active); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -806,7 +820,7 @@ public partial class ScreenLocate : o0InfraredCameraHandler 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (Vector2.Distance(np, _targetPoints2[index]) >= filterDis) 
														 | 
														
														 | 
														
															         if (Vector2.Distance(np, _targetPoints2[index]) >= filterDis) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         { 
														 | 
														
														 | 
														
															         { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             _targetPoints2[index] = np; 
														 | 
														
														 | 
														
															             _targetPoints2[index] = np; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            InfraredCameraHelper.InvokeOnPositionUpdate2(_targetPoints2[index], index); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            InfraredCameraHelper?.InvokeOnPositionUpdate2(_targetPoints2[index], index); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |