Method Compute
Compute(NativeArray<Color32>, int, 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 InstanceSegmentationUrpPass or InstanceSegmentationPass using the same LabelingConfiguration that was passed into this object.
Declaration
public void Compute(NativeArray<Color32> instanceSegmentationRawData, int stride, BoundingBoxOrigin boundingBoxOrigin, out NativeArray<RenderedObjectInfo> renderedObjectInfos, Allocator allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeArray<Color32> | 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. |
| Allocator | allocator | The allocator to use for allocating renderedObjectInfos and perLabelEntryObjectCount. |