Point cloud input constraints: density, outliers, missing regions #12

Closed
opened 2026-06-17 18:14:01 +00:00 by Mark · 0 comments
Owner

Context

pc2cad ingests real scan data, which is messy. Current robustness assumptions don't hold for:

  1. Sparse / non-uniform density — handheld scans have varying density. Downsample is global; should be density-aware or per-region.
  2. Outliers / floaters — current pipeline has no outlier rejection beyond RANSAC's inlier test. Stray points can dominate a primitive fit if they're geometrically consistent (e.g., a floating speck happens to lie on a plane).
  3. Missing regions / holes — scans often miss sides or have occlusions. Currently the unassigned residual is silently dropped. Need to flag missing regions in the report so users know what wasn't reconstructed.
  4. Coordinate system / units — scans sometimes come in mm and sometimes m with no marker. Need either an auto-detection heuristic or an explicit --units flag.

Scope

Hardening pass on input validation and reporting. Improvements should be additive, not breaking.

Concrete work

  • Add statistical outlier removal (open3d.geometry.PointCloud.remove_statistical_outlier) before primitive fitting, controlled by a CLI flag.
  • Add density binning — report per-density-bin primitive counts so users can see which features were fit on which density.
  • Report missing-region density: after fitting, compute the bbox of the residual and report a coverage_bbox_ratio so users know what fraction of the model's bounding box was unassigned.
  • Add --units {mm,cm,m,in,ft} flag with explicit conversion. Default to mm if the bbox is suspicious (>1000 in any axis, assume cm).

Acceptance

  • Outlier rejection configurable via --outlier-std-ratio / --outlier-nb-neighbors
  • Density bins in report: report["density_bins"] with per-bin primitive counts
  • report["coverage_bbox_ratio"] added
  • --units flag with documented default heuristic
  • Tests for each new behavior on synthetic scans with controlled flaws

Why this matters

Real scans are messy. The current tool works on clean synthetic data but degrades unpredictably on real input. Adding these constraints closes the gap between demo and production.

## Context pc2cad ingests real scan data, which is messy. Current robustness assumptions don't hold for: 1. **Sparse / non-uniform density** — handheld scans have varying density. Downsample is global; should be density-aware or per-region. 2. **Outliers / floaters** — current pipeline has no outlier rejection beyond RANSAC's inlier test. Stray points can dominate a primitive fit if they're geometrically consistent (e.g., a floating speck happens to lie on a plane). 3. **Missing regions / holes** — scans often miss sides or have occlusions. Currently the unassigned residual is silently dropped. Need to flag missing regions in the report so users know what wasn't reconstructed. 4. **Coordinate system / units** — scans sometimes come in mm and sometimes m with no marker. Need either an auto-detection heuristic or an explicit `--units` flag. ## Scope Hardening pass on input validation and reporting. Improvements should be additive, not breaking. ### Concrete work - Add statistical outlier removal (`open3d.geometry.PointCloud.remove_statistical_outlier`) before primitive fitting, controlled by a CLI flag. - Add density binning — report per-density-bin primitive counts so users can see which features were fit on which density. - Report missing-region density: after fitting, compute the bbox of the residual and report a `coverage_bbox_ratio` so users know what fraction of the model's bounding box was unassigned. - Add `--units {mm,cm,m,in,ft}` flag with explicit conversion. Default to `mm` if the bbox is suspicious (>1000 in any axis, assume cm). ## Acceptance - Outlier rejection configurable via `--outlier-std-ratio` / `--outlier-nb-neighbors` - Density bins in report: `report["density_bins"]` with per-bin primitive counts - `report["coverage_bbox_ratio"]` added - `--units` flag with documented default heuristic - Tests for each new behavior on synthetic scans with controlled flaws ## Why this matters Real scans are messy. The current tool works on clean synthetic data but degrades unpredictably on real input. Adding these constraints closes the gap between demo and production.
Mark closed this issue 2026-06-20 03:32:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/pc2cad#12
No description provided.