Stride-decimate to about `target_count` points (no-op if already small enough).
(pts, colors, conf, target_count)
| 248 | |
| 249 | |
| 250 | def _stride_downsample(pts, colors, conf, target_count): |
| 251 | """Stride-decimate to about `target_count` points (no-op if already small enough).""" |
| 252 | if target_count <= 0 or len(pts) <= target_count: |
| 253 | return pts, colors, conf |
| 254 | stride = max(1, len(pts) // target_count) |
| 255 | return pts[::stride][:target_count], colors[::stride][:target_count], conf[::stride][:target_count] |
| 256 | |
| 257 | |
| 258 | def _filter_finite_cloud(pts, colors, conf): |
no outgoing calls
no test coverage detected