utils.Format_convert

Classes

FormatConverter

Functions

check_numpy_to_torch staticmethod
check_numpy_to_torch(x)

numpy到torch的转换

Parameters:
  • x

    未知格式

Returns:
  • 若是numpy.ndarray,则转换为torch.tensor,否则直接返回;无论何种情况均返回判断结果

pc_numpy_2_pcd staticmethod
pc_numpy_2_pcd(xyz: numpy.ndarray) -> o3d.geometry.PointCloud
pc_numpy_2_pcr staticmethod
pc_numpy_2_pcr(mixed_pc_three_dims) -> numpy.ndarray

完成混合点云

Parameters:
  • mixed_pc_three_dims

    三维混合点云

Returns:
  • ndarray

    四维混合点云

pcd_2_pc_numpy staticmethod
pcd_2_pc_numpy(pcd_obj: o3d.geometry.PointCloud) -> numpy.ndarray
pcr_numpy_2_pcr_channel staticmethod
pcr_numpy_2_pcr_channel(mixed_pc_four_dims) -> numpy.ndarray

扩充一个维度点云——最后一个维度为channel(属于64束激光灯哪一束)

Parameters:
  • mixed_pc_four_dims

    四维混合点云

Returns:
  • ndarray

    五维混合点云