Class CameraLabeler
Abstract class for defining custom annotation and metric generation to be run by PerceptionCamera. Instances of CameraLabeler on labelers will be invoked each frame the camera is set to capture data (see ShouldCaptureThisFrame).
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Assembly: solution.dll
Syntax
[Serializable]
public abstract class CameraLabeler
Fields
Name | Description |
---|---|
enabled | Whether the CameraLabeler should be set up and called each frame. |
Properties
Name | Description |
---|---|
controlPanel | The control panel that is attached to the visualization canvas. The common location to add interactive controls. |
hudPanel | The heads up display (HUD) panel. Generally used to add stats to the display. |
perceptionCamera | The PerceptionCamera that contains this labeler. |
sensorHandle | The SensorHandle for the PerceptionCamera that contains this labeler. Use this to report annotations and metrics. |
supportsVisualization | Labelers should set this in their setup to define if they support realtime visualization of their data. |
visualizationCanvas | Retrieve a handle to the visualization canvas VisualizationCanvas. This is the specific canvas that all visualization labelers should be added to. The canvas has helper functions to create many common visualization components. |
visualizationEnabled | Turns on/off the labeler's realtime visualization capability. If a labeler does not support realtime visualization (supportsVisualization) or visualization is not enabled on the PerceptionCamera this will not function. |
Methods
Name | Description |
---|---|
Cleanup() | Called when the Labeler is about to be destroyed or removed from the PerceptionCamera. Use this to clean up to state. |
OnBeginRendering() | Called just before the camera renders each frame the the labeler is enabled and ShouldCaptureThisFrame is true. |
OnUpdate() | Called during the Update each frame the the labeler is enabled and ShouldCaptureThisFrame is true. |
OnVisualizerEnabledChanged(bool) | Called when the labeler's visualization capability is turned on or off. |
PopulateVisualizationPanel(ControlPanel) | Called immediately after setup. Implement this to initialize labeler's visualization capability if one exists supportVisualization. |
Setup() | Called just before the first call to OnUpdate() or OnBeginRendering(). Implement this to initialize state. |