MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / _stride_downsample

Function _stride_downsample

benchmark/models/r3/view.py:250–255  ·  view source on GitHub ↗

Stride-decimate to about `target_count` points (no-op if already small enough).

(pts, colors, conf, target_count)

Source from the content-addressed store, hash-verified

248
249
250def _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
258def _filter_finite_cloud(pts, colors, conf):

Callers 1

_refresh_pointcloudFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected