Skip to content

Documentation should mention call order for enable_segmentation_output() #1225

@kevinfoley

Description

@kevinfoley

Describe your feature request

Today, when trying to add segmentation output to a custom script, I found that the segmentation data didn't show any of our objects (it was a single solid color when output as an image, and printing the NumPy array showed that every pixel always had the value "0").

Eventually, I discovered that this issue was occurring because I was calling bproc.renderer.enable_segmentation_output() before loading the scene. Segmentation data apparently only works correctly if enable_segmentation_output() is called after loading the scene, which I guess is why enable_segmentation_output() is always called just before rendering in the example scripts.

I don't see this limitation mentioned in the renderer tutorial or in the renderer API documentation. I would suggest clearly stating that bproc.renderer.enable_segmentation_output() must be called after the scene is loaded in both of these documentation pages.

Describe a possible solution

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions