Skip to content

Issue about function: get_plane_mask(depth_mask): #14

@326037785

Description

@326037785

Potential Division-by-Zero Risk in get_plane_mask Function

The provided get_plane_mask function, specifically in the calculation of p1, p2, p3, and p4, lacks robust division-by-zero protection.

The calculation for each point (p1 through p4) involves dividing a sum of pixel values by the count of non-zero values in the third channel (depth_image[..., 2]).

# Example for p1:
p1 = np.sum(depth_image[:3, :3, :], axis=(0, 1)) / np.sum(
    depth_image[:3, :3, 2] != 0
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions