浏览代码

Implementing the dimension properties interface for the camera sensor

/bullet-hell-barracuda-test-1.3.1
vincentpierre 4 年前
当前提交
54c4eb43
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 13
      com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs

13
com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs


/// <summary>
/// A sensor that wraps a Camera object to generate visual observations for an agent.
/// </summary>
public class CameraSensor : ISensor, IBuiltInSensor
public class CameraSensor : ISensor, IBuiltInSensor, IDimensionPropertiesSensor
{
Camera m_Camera;
int m_Width;

public int[] GetObservationShape()
{
return m_Shape;
}
/// <summary>
/// Accessor for the dimension properties of a camera sensor. A camera sensor
/// Has translational equivariance along width and hight and no property along
/// the channels dimension.
/// </summary>
/// <returns></returns>
public DimensionProperty[] GetDimensionProperties()
{
return new DimensionProperty[] { DimensionProperty.TranslationalEquivariance, DimensionProperty.TranslationalEquivariance, DimensionProperty.None };
}
/// <summary>

正在加载...
取消
保存