|
|
@@ -208,9 +208,9 @@ public partial class ScreenLocate : MonoBehaviour
|
|
|
{
|
|
|
Main = this;
|
|
|
|
|
|
-//#if !UNITY_EDITOR_WIN
|
|
|
-// DebugOnWin = false;
|
|
|
-//#endif
|
|
|
+#if !UNITY_EDITOR_WIN
|
|
|
+ DebugOnEditorWin = false;
|
|
|
+#endif
|
|
|
|
|
|
//if (mUVCDrawer)
|
|
|
// mUVCDrawer.StartPreviewAction += UVCIsReady;
|
|
|
@@ -301,17 +301,15 @@ public partial class ScreenLocate : MonoBehaviour
|
|
|
// brightness = (int)_value;
|
|
|
// brightnessText.text = (2 + brightness) + "";
|
|
|
//}
|
|
|
- float redfilterValue = 0.8f;
|
|
|
+
|
|
|
public void SetInfraredLocateBrightnessThreshold(float value)
|
|
|
{
|
|
|
- if (value >= 0 && value <= 1) {
|
|
|
- redfilterValue = value;
|
|
|
- if (infraredLocate != null)
|
|
|
- {
|
|
|
+
|
|
|
+ if (infraredLocate != null)
|
|
|
+ {
|
|
|
+ if (value >= 0 && value <= 1)
|
|
|
infraredLocate.SetBrightnessThreshold(value); // 参数是 红外灯的亮度阈值,阈值越小能够检测到的亮度就越低,默认值是0.93
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
void Update()
|
|
|
@@ -333,13 +331,13 @@ public partial class ScreenLocate : MonoBehaviour
|
|
|
if (screenIdentification == null)
|
|
|
{
|
|
|
screenIdentification = new o0.Project.ScreenIdentification();
|
|
|
- //screenIdentification.OnLocateScreenEnter += OnLocateScreenEnter;
|
|
|
- //screenIdentification.OnLocateScreenEnd += OnLocateScreenEnd;
|
|
|
+ screenIdentification.OnLocateScreenEnter += OnLocateScreenEnter;
|
|
|
+ screenIdentification.OnLocateScreenEnd += OnLocateScreenEnd;
|
|
|
}
|
|
|
if (infraredLocate == null)
|
|
|
{
|
|
|
infraredLocate = new InfraredLocate(mUVCCameraInfo, screenIdentification, InfraredSpotSettings);
|
|
|
- //float redfilterValue = PlayerPrefs.GetFloat("Init redFilterSliderValue", 0.8f);
|
|
|
+ float redfilterValue = PlayerPrefs.GetFloat("Init redFilterSliderValue", 0.8f);
|
|
|
Debug.Log("Init Red filterValue:" + redfilterValue);
|
|
|
infraredLocate.SetBrightnessThreshold(redfilterValue); // 参数是 红外灯的亮度阈值,阈值越小能够检测到的亮度就越低,默认值是0.93
|
|
|
}
|
|
|
@@ -681,7 +679,7 @@ public partial class ScreenLocate : MonoBehaviour
|
|
|
}
|
|
|
|
|
|
ReSizeTexture(width, height);
|
|
|
- //mUVCCameraInfo.SetSize(width, height); // 手动记录分辨率,这里可能会有问题 width和height是期望的分辨率而不是当前摄像机实际分辨率
|
|
|
+ mUVCCameraInfo.SetSize(width, height); // 手动记录分辨率,这里可能会有问题 width和height是期望的分辨率而不是当前摄像机实际分辨率
|
|
|
}
|
|
|
#endregion
|
|
|
public void BtnScreenMap()
|