ocrtoc_dataset_toolkit.utils package

Submodules

ocrtoc_dataset_toolkit.utils.combine module

ocrtoc_dataset_toolkit.utils.combine.combine(pcds, voxel_size=0.002)[source]

Combine several point cloud and apply voxel downsample.

Parameters
  • pcds (list of open3d.geometry.PointCloud) – list of point cloud.

  • voxel_size (float) – voxel size.

Returns

the combined point cloud.

Return type

open3d.geometry.PointCloud

ocrtoc_dataset_toolkit.utils.combine.merge_pcds(pcds)[source]

Merge several point cloud.

Parameters

pcds (list of open3d.geometry.PointCloud) – list of point cloud.

Returns

the merged point cloud.

Return type

open3d.geometry.PointCloud

ocrtoc_dataset_toolkit.utils.logging module

ocrtoc_dataset_toolkit.utils.logging.change_main_logger()[source]
ocrtoc_dataset_toolkit.utils.logging.get_main_logger()[source]

Get the logger

Returns

The logger instance

Return type

logger

ocrtoc_dataset_toolkit.utils.logging.set_log_level(level='WARNING')[source]

Setup the log level for the logger

Parameters

level (string) – a string of log level among ‘DEBUG’, ‘INFO’, ‘WARNING’, ‘ERROR’, ‘CRITICAL’. ‘WARNING’ is the default.

ocrtoc_dataset_toolkit.utils.vis module

ocrtoc_dataset_toolkit.utils.vis.generate_scene_pointcloud(depth_path, rgb_path, intrinsics, depth_scale)[source]

Generate point cloud from depth image and color image

Parameters
  • depth_path (str) – depth image path.

  • rgb_path (str) – rgb image path.

  • intrinsics (np.array) – camera intrinsics matrix.

  • depth_scale (float) – the depth factor.

Returns

the point cloud

Return type

open3d.geometry.PointCloud

ocrtoc_dataset_toolkit.utils.vis.get_random_color()[source]

Generate random color to visualize mask

Returns

The RGB value of the color

Return type

np.array(3,)

Module contents