irtk.metric.chamfer_distance¶
- irtk.metric.chamfer_distance(mesh_a_: str | dict, mesh_b_: str | dict, num_samples: int, mode: Literal['forward', 'backward', 'bidirectional'] = 'bidirectional') float ¶
Computes the Chamfer Distance (CD) between two meshes.
- Parameters:
mesh_a – One mesh specified by file name or a dict containing ‘v’ and ‘f’.
mesh_b – Another mesh specified by file name or a dict containing ‘v’ and ‘f’.
num_samples – Number of samples to compute Chamfer Distance.
mode – The sample mode. Supports ‘forward’, ‘backward’, and ‘bidirectional’.
- Returns:
The Chamfer Distance between the two meshes.