docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RgbSensor

    The concrete class for an RGB sensor.

    Inheritance
    object
    DataModelElement
    Sensor
    RgbSensor
    Implements
    IMessageProducer
    Inherited Members
    Sensor.m_Definition
    Sensor.modelType
    Sensor.description
    Sensor.position
    Sensor.rotation
    Sensor.velocity
    Sensor.acceleration
    Sensor.annotations
    DataModelElement.id
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    public class RgbSensor : Sensor, IMessageProducer

    Constructors

    RgbSensor(RgbSensorDefinition)

    Constructs a RgbSensor.

    Declaration
    public RgbSensor(RgbSensorDefinition definition)
    Parameters
    Type Name Description
    RgbSensorDefinition definition

    The id of the sensor.

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, string, Vector2, ImageEncodingFormat)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, string projection, Vector2 dimension, ImageEncodingFormat encodingFormat = ImageEncodingFormat.Png)
    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

    string projection

    The projection of the image

    Vector2 dimension

    The pixel dimensions of the image

    ImageEncodingFormat encodingFormat

    The format of the image

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, ImageEncodingFormat)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, ImageEncodingFormat encodingFormat = ImageEncodingFormat.Png)
    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 encoding format of the captured image.

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3, string, Vector2, ImageEncodingFormat)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration, string projection, Vector2 dimension, ImageEncodingFormat encodingFormat = ImageEncodingFormat.Png)
    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

    string projection

    The projection of the image

    Vector2 dimension

    The pixel dimensions of the image

    ImageEncodingFormat encodingFormat

    The format of the image

    RgbSensor(RgbSensorDefinition, Vector3, Quaternion, Vector3, Vector3, ImageEncodingFormat)

    Create a new sensor

    Declaration
    public RgbSensor(RgbSensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration, ImageEncodingFormat encodingFormat = ImageEncodingFormat.Png)
    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 encoding format of the captured 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 string projection { get; set; }
    Property Value
    Type Description
    string

    Methods

    IsValid()

    Is the component valid?

    Declaration
    public override bool IsValid()
    Returns
    Type Description
    bool

    Is the component valid?

    Overrides
    Sensor.IsValid()

    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

    Overrides
    Sensor.ToMessage(IMessageBuilder)

    Implements

    IMessageProducer
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)