Class PerceptionCamera
Captures ground truth from the associated Camera.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Assembly: solution.dll
Syntax
[RequireComponent(typeof(Camera))]
public class PerceptionCamera : MonoBehaviour
Fields
Name | Description |
---|---|
captureRgbImages | Whether camera output should be captured to disk |
captureTriggerMode | The method of triggering captures for this camera. |
description | A human-readable description of the camera. |
firstCaptureFrame | Frame number at which this camera starts capturing. |
framesBetweenCaptures | The number of frames to simulate and render between the camera's scheduled captures. Setting this to 0 makes the camera capture every frame. |
manualSensorAffectSimulationTiming | Have this unscheduled (manual capture) camera affect simulation timings (similar to a scheduled camera) by requesting a specific frame delta time |
showVisualizations | Turns on/off the realtime visualization capability. |
simulationDeltaTime | The simulation frame time (seconds) for this camera. E.g. 0.0166 translates to 60 frames per second. This will be used as Unity's captureDeltaTime, causing a fixed number of frames to be generated for each second of elapsed simulation time regardless of the capabilities of the underlying hardware. |
Properties
Name | Description |
---|---|
SensorHandle | The SensorHandle associated with this camera. Use this to report additional annotations and metrics at runtime. |
attachedCamera | Caches access to the camera attached to the perception camera |
labelers | The CameraLabeler instances which will be run for this PerceptionCamera. |
Methods
Name | Description |
---|---|
AddLabeler(CameraLabeler) | Add the given CameraLabeler to the PerceptionCamera. It will be set up and executed by this PerceptionCamera each frame it captures data. |
RemoveLabeler(CameraLabeler) | Removes the given CameraLabeler from the list of labelers under this PerceptionCamera, if it is in the list. The labeler is cleaned up in the process. Labelers removed from a PerceptionCamera should not be used again. |
RemovePersistentSensorData(string) | Removes a persistent sensor data object. |
RequestCapture() | Requests a capture from this camera on the next rendered frame. Can only be used when using PerceptionCamera.CaptureTriggerMode.Manual capture mode. |
SetPersistentSensorData(string, object) | Add a data object which will be added to the dataset with each capture. Overrides existing sensor data associated with the given key. |
Events
Name | Description |
---|---|
InstanceSegmentationImageReadback | Invoked when instance segmentation images are read back from the graphics system. The first parameter is the Time.frameCount at which the objects were rendered. May be invoked many frames after the objects were rendered. |
RenderedObjectInfosCalculated | Invoked when RenderedObjectInfos are calculated. The first parameter is the Time.frameCount at which the objects were rendered. This may be called many frames after the objects were rendered. |