def center_to_corner_box3d(centers, dims, angles=None, origin=(0.5, 0.5, 0.5), axis=2):
    'convert kitti locations, dimensions and angles to corners\n\n    Args:\n        centers (float array, shape=[N, 3]): locations in kitti label file.\n        dims (float array, shape=[N, 3]): dimensions in kitti label file.\n        angles (float array, shape=[N]): rotation_y in kitti label file.\n        origin (list or array or float): origin point relate to smallest point.\n            use [0.5, 1.0, 0.5] in camera and [0.5, 0.5, 0] in lidar.\n        axis (int): rotation axis. 1 for camera and 2 for lidar.\n    Returns:\n        [type]: [description]\n    '
    corners = corners_nd(dims, origin=origin)
    if (angles is not None):
        corners = rotation_3d_in_axis(corners, angles, axis=axis)
    corners += centers.reshape([(- 1), 1, 3])
    return corners
convert kitti locations, dimensions and angles to corners

Args:
    centers (float array, shape=[N, 3]): locations in kitti label file.
    dims (float array, shape=[N, 3]): dimensions in kitti label file.
    angles (float array, shape=[N]): rotation_y in kitti label file.
    origin (list or array or float): origin point relate to smallest point.
        use [0.5, 1.0, 0.5] in camera and [0.5, 0.5, 0] in lidar.
    axis (int): rotation axis. 1 for camera and 2 for lidar.
Returns:
    [type]: [description]
def center_to_corner_box3d(centers, dims, angles=None, origin=(0.5, 0.5, 0.5), axis=2):
    'convert kitti locations, dimensions and angles to corners\n\n    Args:\n        centers (float array, shape=[N, 3]): locations in kitti label file.\n        dims (float array, shape=[N, 3]): dimensions in kitti label file.\n        angles (float array, shape=[N]): rotation_y in kitti label file.\n        origin (list or array or float): origin point relate to smallest point.\n            use [0.5, 1.0, 0.5] in camera and [0.5, 0.5, 0] in lidar.\n        axis (int): rotation axis. 1 for camera and 2 for lidar.\n    Returns:\n        [type]: [description]\n    '
    corners = corners_nd(dims, origin=origin)
    if (angles is not None):
        corners = rotation_3d_in_axis(corners, angles, axis=axis)
    corners += centers.reshape([(- 1), 1, 3])
    return corners