def _depth_completion_test(completion_method, completion_name, smoothed): bunny_cloud = pcl.load('resources/bunny.pcd') bunny_points = bunny_cloud.to_array() print("Starting completion method") # Testing depth completions only ply_data = time_fn(completion_method, bunny_points) smoothed_str = ["unsmoothed", "smoothed"][smoothed] ply_data.write( open("resources/bunny_{}_{}.ply".format(completion_name, smoothed_str), 'w'))
def _tactile_completion_test(completion_method, completion_name, smoothed): depth_cloud = pcl.load('resources/depth_cloud_cf.pcd') depth_points = depth_cloud.to_array() tactile_cloud = pcl.load('resources/tactile_cf.pcd') tactile_points = tactile_cloud.to_array() # Testing depth completions only ply_data = time_fn(completion_method, depth_points, tactile_points) smoothed_str = ["unsmoothed", "smoothed"][smoothed] ply_data.write( open( "resources/pringles_{}_{}.ply".format(completion_name, smoothed_str), 'w'))
def test_hausdorff_distance_one_direction(): time_fn(curvox.mesh_comparisons.hausdorff_distance_one_direction, meshfilename1, meshfilename2) distance_uni = time_fn(curvox.mesh_comparisons.hausdorff_distance_one_direction, meshfilename1, meshfilename2) curvox.mesh_comparisons.print_hausdorff(distance_uni)
def test_jaccard_similarity(): time_fn(curvox.mesh_comparisons.jaccard_similarity, meshfilename1, meshfilename2) distance_j = time_fn(curvox.mesh_comparisons.jaccard_similarity, meshfilename1, meshfilename2) print(distance_j)
def test_hausdorff_distance_bi(): time_fn(curvox.mesh_comparisons.hausdorff_distance_bi, meshfilename1, meshfilename2) distance_bi = time_fn(curvox.mesh_comparisons.hausdorff_distance_bi, meshfilename1, meshfilename2) curvox.mesh_comparisons.print_hausdorff(distance_bi)