MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / voxel_decimate

Function voxel_decimate

python/cli/process/process.py:154–158  ·  view source on GitHub ↗
(df, cell_size)

Source from the content-addressed store, hash-verified

152 return df_result
153
154def voxel_decimate(df, cell_size):
155 def grouping_function(row):
156 return tuple([round(row[c] / cell_size) for c in 'xyz'])
157 grouped = df.assign(voxel_index=df.apply(grouping_function, axis=1)).groupby('voxel_index')
158 return grouped.first().reset_index()[[c for c in df.columns if c != 'voxel_index']]
159
160
161def compute_cam_velocities(targetFrame, angularVelocity):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected