Class PixelPositionLabeler
The Pixel Position labeler outputs the camera-space distance from the camera to an object at a pixel. Imagine a vector v = (x,y,z) from the camera to the object at pixel.
Channel | Description |
---|---|
Red | The "x" component of vector "v". |
Green | The "y" component of vector "v". |
Blue | The "z" component of vector "v". Represents eye-depth. |
Alpha | Always set to 1. |
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Labelers
Assembly: Unity.Perception.Runtime.dll
Syntax
[Serializable]
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public sealed class PixelPositionLabeler : CameraLabeler
Constructors
PixelPositionLabeler()
Creates a new PixelPositionLabeler.
Declaration
public PixelPositionLabeler()
Fields
annotationId
The string id used to identify this labeler in the dataset.
Declaration
public string annotationId
Field Value
Type | Description |
---|---|
string |
Properties
description
A human-readable description of the labeler
Declaration
public override string description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
labelerId
The GUID id to associate with the data produced by this labeler.
Declaration
public override string labelerId { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
supportsVisualization
Labelers should set this in their setup to define if they support realtime visualization of their data.
Declaration
protected override bool supportsVisualization { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
Cleanup()
Called when the Labeler is about to be destroyed or removed from the PerceptionCamera. Use this to clean up to state.
Declaration
protected override void Cleanup()
Overrides
OnEndRendering(ScriptableRenderContext)
Called just after the camera renders each frame the the labeler is enabled and ShouldCaptureThisFrame is true.
Declaration
protected override void OnEndRendering(ScriptableRenderContext ctx)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | ctx | The current context from the Scriptable Render Pipeline. |
Overrides
Setup()
Called just before the first call to OnUpdate() or OnBeginRendering(ScriptableRenderContext). Implement this to initialize state.
Declaration
protected override void Setup()