Class RenderedObjectInfoGenerator
A CPU-based pass which computes bounding box and pixel counts per-object from instance segmentation images
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Syntax
public class RenderedObjectInfoGenerator
Methods
Compute(NativeArray<UInt32>, Int32, BoundingBoxOrigin, out NativeArray<RenderedObjectInfo>, Allocator)
Compute RenderedObjectInfo for each visible object in the given instance segmentation image.
InstanceSegmentationRawData should be the raw data from a texture filled by
Declaration
public void Compute(NativeArray<uint> instanceSegmentationRawData, int stride, BoundingBoxOrigin boundingBoxOrigin, out NativeArray<RenderedObjectInfo> renderedObjectInfos, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<UInt32> | instanceSegmentationRawData | The raw instance segmentation image. |
Int32 | stride | Stride of the image data. Should be equal to the width of the image. |
BoundingBoxOrigin | boundingBoxOrigin | Whether bounding boxes should be top-left or bottom-right-based. |
NativeArray<RenderedObjectInfo> | renderedObjectInfos | When this method returns, filled with RenderedObjectInfo entries for each object visible in the frame. |
Allocator | allocator | The allocator to use for allocating renderedObjectInfos and perLabelEntryObjectCount. |