浏览代码

fixed a bug a visualization test and per labeler enabled state

/generic-asset-sources
Mohsen Kamalzadeh 3 年前
当前提交
a777d3a2
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 10
      com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs
  2. 2
      com.unity.perception/Tests/Runtime/GroundTruthTests/VisualizationTests.cs

10
com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs


internal void InternalCleanup() => Cleanup();
internal void InternalVisualize() => OnVisualize();
bool m_ShowVisualizations;
bool m_ShowVisualizationsForLabeler;
/// <summary>
/// Turns on/off the labeler's realtime visualization capability. If a labeler does not support realtime

if (!supportsVisualization)
return false;
return perceptionCamera && perceptionCamera.showVisualizations;
return perceptionCamera && perceptionCamera.showVisualizations && m_ShowVisualizationsForLabeler;
if (value != m_ShowVisualizations)
if (value != m_ShowVisualizationsForLabeler)
m_ShowVisualizations = value;
m_ShowVisualizationsForLabeler = value;
OnVisualizerEnabledChanged(m_ShowVisualizations);
OnVisualizerEnabledChanged(m_ShowVisualizationsForLabeler);
}
}
}

2
com.unity.perception/Tests/Runtime/GroundTruthTests/VisualizationTests.cs


var labeler1 = new ObjectCountLabeler(cfg);
labeler1.objectCountMetricId = "a1da3c27-369d-4929-aea6-d01614635ce2";
var labeler2 = new ObjectCountLabeler(cfg);
labeler1.objectCountMetricId = "b1da3c27-369d-4929-aea6-d01614635ce2";
labeler2.objectCountMetricId = "b1da3c27-369d-4929-aea6-d01614635ce2";
perceptionCamera.AddLabeler(labeler1);
perceptionCamera.AddLabeler(labeler2);

正在加载...
取消
保存