Method Compute
Compute(NativeArray<uint>, int, BoundingBoxOrigin, out NativeArray<RenderedObjectInfo>, out NativeArray<uint>, Allocator)
Compute RenderedObjectInfo for each visible object in the given instance segmentation image. InstanceSegmentationRawData should be the raw data from a texture filled by InstanceSegmentationUrpPass or InstanceSegmentationPass using the same LabelingConfiguration that was passed into this object.
Declaration
public void Compute(NativeArray<uint> instanceSegmentationRawData, int stride, BoundingBoxOrigin boundingBoxOrigin, out NativeArray<RenderedObjectInfo> renderedObjectInfos, out NativeArray<uint> perLabelEntryObjectCount, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<uint> | instanceSegmentationRawData | The raw instance segmentation image. |
int | 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. |
NativeArray<uint> | perLabelEntryObjectCount | When the method returns, filled with a NativeArray with the count of objects for each entry in LabelEntries in the LabelingConfiguration passed into the constructor. |
Allocator | allocator | The allocator to use for allocating renderedObjectInfos and perLabelEntryObjectCount. |