Class RgbSensor
The concrete class for an RGB sensor.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.DataModel
Syntax
public class RgbSensor : Sensor, IMessageProducer
Constructors
RgbSensor(RgbSensorDefinition, Vector3, Quaternion)
Create a new sensor
Declaration
public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
RgbSensorDefinition | definition | The id of the sensor |
Vector3 | position | The position of the sensor |
Quaternion | rotation | The rotation of the sensor |
RgbSensor(RgbSensorDefinition, Vector3, Quaternion, ImageEncodingFormat, RgbSensor.ImageProjection, Vector2)
Create a new sensor
Declaration
public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, ImageEncodingFormat encodingFormat, RgbSensor.ImageProjection projection, Vector2 dimension)
Parameters
Type | Name | Description |
---|---|---|
RgbSensorDefinition | definition | The id of the sensor |
Vector3 | position | The position of the sensor |
Quaternion | rotation | The rotation of the sensor |
ImageEncodingFormat | encodingFormat | The format of the image |
RgbSensor.ImageProjection | projection | The projection of the image |
Vector2 | dimension | The pixel dimensions of the image |
RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3)
Create a new sensor
Declaration
public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration)
Parameters
Type | Name | Description |
---|---|---|
RgbSensorDefinition | definition | The id of the sensor |
Vector3 | position | The position of the sensor |
Quaternion | rotation | The rotation of the sensor |
Vector3 | velocity | The velocity of the sensor |
Vector3 | acceleration | The acceleration of the sensor |
RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3, ImageEncodingFormat, RgbSensor.ImageProjection, Vector2)
Create a new sensor
Declaration
public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration, ImageEncodingFormat encodingFormat, RgbSensor.ImageProjection projection, Vector2 dimension)
Parameters
Type | Name | Description |
---|---|---|
RgbSensorDefinition | definition | The id of the sensor |
Vector3 | position | The position of the sensor |
Quaternion | rotation | The rotation of the sensor |
Vector3 | velocity | The velocity of the sensor |
Vector3 | acceleration | The acceleration of the sensor |
ImageEncodingFormat | encodingFormat | The format of the image |
RgbSensor.ImageProjection | projection | The projection of the image |
Vector2 | dimension | The pixel dimensions of the image |
Properties
buffer
The raw bytes of the image file
Declaration
public byte[] buffer { get; set; }
Property Value
Type | Description |
---|---|
Byte[] |
dimension
The dimensions (width, height) of the image
Declaration
public Vector2 dimension { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
imageEncodingFormat
The image file type
Declaration
public ImageEncodingFormat imageEncodingFormat { get; set; }
Property Value
Type | Description |
---|---|
ImageEncodingFormat |
matrix
The 3x3 image intrinsic matrix
Declaration
public float3x3 matrix { get; set; }
Property Value
Type | Description |
---|---|
float3x3 |
projection
The projection of the image.
Declaration
public RgbSensor.ImageProjection projection { get; set; }
Property Value
Type | Description |
---|---|
RgbSensor.ImageProjection |
Methods
IsValid()
Is the component valid?
Declaration
public override bool IsValid()
Returns
Type | Description |
---|---|
Boolean | Is the component valid? |
Overrides
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 |