Forráskód Böngészése

更新红外算法,增加阈值调整

Snowaterr 1 éve
szülő
commit
353795562f
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      Assets/WebCamera/Script/ZIM/ScreenLocate.cs

+ 5 - 1
Assets/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -308,10 +308,14 @@ public class ScreenLocate : MonoBehaviour
         if (mUVCCameraInfo == null) return;
 
         if (screenIdentification == null)
+        {
             screenIdentification = new o0.Project.ScreenIdentification(mUVCTexture);
-
+        }
         if (infraredLocate == null)
+        {
             infraredLocate = new InfraredLocate(mUVCCameraInfo, screenIdentification, InfraredSpotSettings);
+            infraredLocate.SetBrightnessThreshold(0.8f);     // 参数是 红外灯的亮度阈值,阈值越小能够检测到的亮度就越低,默认值是0.93
+        }
 
         if (mode == Mode.ScreenLocateManual)
         {