Class UnityCameraSensor
An RGB sensor that sources its RGB output directly from the Unity Camera component attached to same GameObject as the PerceptionCamera.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Sensors
Assembly: Unity.Perception.Runtime.dll
Syntax
[Serializable]
[MovedFrom("UnityEngine.Perception.GroundTruth")]
public class UnityCameraSensor : CameraSensor
Fields
superSamplingFactor
Averages multiple samples per pixel to enable a high quality anti-aliasing effect. Note that this field will not influence the final output resolution of this sensor.
Declaration
[Tooltip("Averages multiple samples per pixel to enable a high quality anti-aliasing effect. Note that this field will not influence the final output resolution of this sensor.")]
public SuperSamplingFactor superSamplingFactor
Field Value
Type | Description |
---|---|
SuperSamplingFactor |
Properties
intrinsics
The intrinsic properties of the RGB sensor such as the field of view and projection type.
Declaration
public override CameraSensorIntrinsics intrinsics { get; }
Property Value
Type | Description |
---|---|
CameraSensorIntrinsics |
Overrides
pixelHeight
The pixel height of the sensor output.
Declaration
public override int pixelHeight { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
pixelWidth
The pixel width of the sensor output.
Declaration
public override int pixelWidth { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
superResHeight
The pixel height of the super resolution sensor.
Declaration
public int superResHeight { get; }
Property Value
Type | Description |
---|---|
int |
superResWidth
The pixel width of the super resolution sensor.
Declaration
public int superResWidth { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Cleanup()
Cleanup is called when the PerceptionCamera capturing data from this sensor is destroyed.
Declaration
protected override void Cleanup()
Overrides
OnEndFrameRendering(ScriptableRenderContext)
OnEndFrameRendering is called just after rendering has ended for the current frame.
Declaration
protected override void OnEndFrameRendering(ScriptableRenderContext ctx)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | ctx | The scriptable render context for the current frame. |
Overrides
Setup()
Setup is called when the PerceptionCamera capturing data from this sensor is initialized (on Awake).
Declaration
protected override void Setup()
Overrides
SetupChannel<T>(T)
Configures newly enabled channels and returns the output texture of the enabled channel.
Declaration
protected override RenderTexture SetupChannel<T>(T channel) where T : CameraChannelBase, new()
Parameters
Type | Name | Description |
---|---|---|
T | channel | The channel instance being enabled through this sensor. |
Returns
Type | Description |
---|---|
RenderTexture | The output texture of the enabled channel. |
Type Parameters
Name | Description |
---|---|
T | The type of channel to configure. |