Skip to content

Fix segfault in poisson disk downsampling of empty point cloud#116

Open
SAY-5 wants to merge 1 commit into
fwilliams:masterfrom
SAY-5:fix-poisson-disk-empty-input
Open

Fix segfault in poisson disk downsampling of empty point cloud#116
SAY-5 wants to merge 1 commit into
fwilliams:masterfrom
SAY-5:fix-poisson-disk-empty-input

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 17, 2026

Copy link
Copy Markdown

Fixes #115.

downsample_point_cloud_poisson_disk crashes when the input point cloud has zero points. The radius path calls blue_noise_downsample, which computes grid bounds with X.colwise().minCoeff() and Xs.maxCoeff(); both are undefined on a zero-row Eigen matrix, so the empty case reads out of bounds and segfaults.

This returns an empty index array immediately when the input has no points, before the bounds are computed. Added a regression test for the empty-input case.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault with empty point clouds

1 participant