Skip to content

Background Color Support for RGB Point Clouds #1048

Closed
@jasonyzhang

Description

@jasonyzhang

🚀 Feature

Hi,

The AlphaCompositor and NormWeightedCompositor currently only apply the background color if the point cloud is RGBA rather than RGB. However, the _add_background_color_to_images actually works fine whether the pointcloud is RGB or RGBA.

The current code does not apply the background color for RGB point clouds, explicitly checking for an alpha channel:

# check for background color & feature size C (C=4 indicates rgba)
if background_color is not None and images.shape[1] == 4:
return _add_background_color_to_images(fragments, images, background_color)

# check for background color & feature size C (C=4 indicates rgba)
if background_color is not None and images.shape[1] == 4:
return _add_background_color_to_images(fragments, images, background_color)

Is there a specific rationale for this? I have tested setting images.shape[1] == 4 to images.shape[1] in (3, 4), and the output is as expected.

Thanks in advance!

Metadata

Metadata

Assignees

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