docs.unity3d.com
    Show / Hide Table of Contents

    Class CameraSensorComponent

    A SensorComponent that creates a CameraSensor.

    Inheritance
    Object
    SensorComponent
    CameraSensorComponent
    Inherited Members
    SensorComponent.IsVisual()
    SensorComponent.IsVector()
    Namespace: Unity.MLAgents.Sensors
    Syntax
    public class CameraSensorComponent : SensorComponent

    Properties

    Camera

    Camera object that provides the data to the sensor.

    Declaration
    public Camera Camera { get; set; }
    Property Value
    Type Description
    Camera

    CompressionType

    The compression type to use for the sensor.

    Declaration
    public SensorCompressionType CompressionType { get; set; }
    Property Value
    Type Description
    SensorCompressionType

    Grayscale

    Whether to generate grayscale images or color. Note that changing this after the sensor is created has no effect.

    Declaration
    public bool Grayscale { get; set; }
    Property Value
    Type Description
    Boolean

    Height

    Height of the generated observation. Note that changing this after the sensor is created has no effect.

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    Int32

    SensorName

    Name of the generated CameraSensor object. Note that changing this at runtime does not affect how the Agent sorts the sensors.

    Declaration
    public string SensorName { get; set; }
    Property Value
    Type Description
    String

    Width

    Width of the generated observation. Note that changing this after the sensor is created has no effect.

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    CreateSensor()

    Creates the CameraSensor

    Declaration
    public override ISensor CreateSensor()
    Returns
    Type Description
    ISensor

    The created CameraSensor object for this component.

    Overrides
    SensorComponent.CreateSensor()

    GetObservationShape()

    Computes the observation shape of the sensor.

    Declaration
    public override int[] GetObservationShape()
    Returns
    Type Description
    Int32[]

    The observation shape of the associated CameraSensor object.

    Overrides
    SensorComponent.GetObservationShape()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023