Ver código fonte

Merge branch 'ZIM-DEV'

ZIM 1 ano atrás
pai
commit
dce94e83d2

+ 1 - 1
Assets/InfraredProject/WebCamera/Script/ZIM/InfraredLocate/ScreenIdentification.cs

@@ -379,7 +379,7 @@ namespace o0.Project
                 if (delay == 0)
                 {
                     ScreenLocate.Main.CameraSize = new Geometry2D.Vector<int>(cam.width, cam.height);          // 记录当前的分辨率
-                    Debug.Log("[ScreenIdentification] 采样纹理,分辨率: [" + Size.x + ", " + Size.y + "]");
+                    Debug.Log("[ScreenIdentification] 采样纹理,记录采样分辨率: [" + Size.x + ", " + Size.y + "]");
                 }
                 return true;
             }

+ 6 - 1
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -436,6 +436,8 @@ public partial class ScreenLocate : MonoBehaviour
         {
             screenIdentification = new o0.Project.ScreenIdentification();
 
+            Debug.Log("[ScreenLocate] 初始化屏幕识别");
+
             //pc 不切换分辨率了
 #if UNITY_ANDROID
             //screenIdentification.OnLocateScreenEnter += OnLocateScreenEnter;
@@ -446,7 +448,10 @@ public partial class ScreenLocate : MonoBehaviour
         if (infraredLocate == null)
         {
             infraredLocate = new InfraredLocate(mUVCCameraInfo, screenIdentification, InfraredSpotSettings, ScreenPixelCheaker);
+            CameraSize = new o0.Geometry2D.Vector<int>((int)getUVCCameraInfoSize.x, (int)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);
@@ -717,7 +722,7 @@ public partial class ScreenLocate : MonoBehaviour
         var sizeNew = new o0.Geometry2D.Vector<int>((int)getUVCCameraInfoSize.x, (int)getUVCCameraInfoSize.y);
         if (sizeNew != CameraSize) 
         {
-            Debug.Log("[ScreenLocate] 分辨率变化,刷新分辨率");
+            Debug.Log($"<color=aqua>[ScreenLocate] 分辨率变化,刷新分辨率\r\n是否有屏幕数据: {screenIdentification.Screen.QuadInCamera != null}\r\n是否有手动数据: {screenIdentification.QuadManual != null}</color>");
             // 同步相机分辨率
             CameraSize = sizeNew;
             var sizeNewFloat = getUVCCameraInfoSize.o0Vector();