Class SemanticSegmentationAnnotation
An annotation recording information pertaining to a semantic segmentation capture.
Implements
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Labelers
Assembly: Unity.Perception.Runtime.dll
Syntax
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public class SemanticSegmentationAnnotation : Annotation, IMessageProducer
Constructors
SemanticSegmentationAnnotation(SemanticSegmentationDefinition, string, ImageEncodingFormat, Vector2, IReadOnlyList<SemanticSegmentationDefinitionEntry>, byte[])
Constructs a new SemanticSegmentationAnnotation.
Declaration
public SemanticSegmentationAnnotation(SemanticSegmentationDefinition definition, string sensorId, ImageEncodingFormat imageFormat, Vector2 dimension, IReadOnlyList<SemanticSegmentationDefinitionEntry> instances, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
SemanticSegmentationDefinition | definition | The semantic segmentation annotation definition. |
string | sensorId | The sensor id. |
ImageEncodingFormat | imageFormat | The image encoding format. |
Vector2 | dimension | The image dimensions (width and height). |
IReadOnlyList<SemanticSegmentationDefinitionEntry> | instances | The colors/labels present in the segmentation image. |
byte[] | buffer | The encoded semantic segmentation image data. |
Properties
buffer
The encoded semantic segmentation image data.
Declaration
public byte[] buffer { get; set; }
Property Value
Type | Description |
---|---|
byte[] |
dimension
The width and height of the segmentation image.
Declaration
public Vector2 dimension { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
imageFormat
The image encoding format of the segmentation image.
Declaration
public ImageEncodingFormat imageFormat { get; set; }
Property Value
Type | Description |
---|---|
ImageEncodingFormat |
instances
The colors and their associated string labels that are present within this semantic segmentation capture.
Declaration
public IReadOnlyList<SemanticSegmentationDefinitionEntry> instances { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyList<SemanticSegmentationDefinitionEntry> |
Methods
ToMessage(IMessageBuilder)
Convert contents int a message.
Declaration
public override void ToMessage(IMessageBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IMessageBuilder | builder | The message builder that will convert the class's contents into a message |