Closed
Description
🚀 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:
pytorch3d/pytorch3d/renderer/points/compositor.py
Lines 37 to 39 in 9e2bc3a
pytorch3d/pytorch3d/renderer/points/compositor.py
Lines 59 to 61 in 9e2bc3a
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!