src/tools/benchmark_tool/benchmark_tool/kittiobjdetsdk/kitti_obj_detection_utils.py
def compute_3d_bbox(kitti_detection_elem):
        """
        Provide the 3d point corners of the bounding box of the specified kitti detection object.

        @param kitti_detection_elem: The kitti detection object
        @type  kitti_detection_elem: KittiDetection
        @return: numpy array 3x8
        """
        c = np.cos(kitti_detection_elem.box3d_yaw)
        s = np.sin(kitti_detection_elem.box3d_yaw)
        # Build rotation matrix
        Rot = np.array([[c, 0, s], [0, 1, 0], [-s, 0, c]])

        l = kitti_detection_elem.box3d_length  # noqa: E741
        w = kitti_detection_elem.box3d_width
        h = kitti_detection_elem.box3d_height

        # 3d bounding box corners
        x_edges = [l / 2, l / 2, -l / 2, -l / 2, l / 2, l / 2, -l / 2, -l / 2]
        y_edges = [0, 0, 0, 0, -h, -h, -h, -h]
        z_edges = [w / 2, -w / 2, -w / 2, w / 2, w / 2, -w / 2, -w / 2, w / 2]

        # apply rotation to the bounding box
        # (3x3) dot (3x8) = (3x8)
        bbox_coords = np.dot(Rot, np.vstack([x_edges, y_edges, z_edges]))

        # apply translation
        bbox_coords[0, :] = bbox_coords[0, :] + kitti_detection_elem.box3d_pos_x
        bbox_coords[1, :] = bbox_coords[1, :] + kitti_detection_elem.box3d_pos_y
        bbox_coords[2, :] = bbox_coords[2, :] + kitti_detection_elem.box3d_pos_z

        return bbox_coords

        Provide the 3d point corners of the bounding box of the specified kitti detection object.

        @param kitti_detection_elem: The kitti detection object
        @type  kitti_detection_elem: KittiDetection
        @return: numpy array 3x8
        
Provide the 3d point corners of the bounding box of the specified kitti detection object.
Provide the 3d point corners of the bounding box of the specified kitti detection object .
def compute_3d_bbox(kitti_detection_elem):
        c = np.cos(kitti_detection_elem.box3d_yaw)
        s = np.sin(kitti_detection_elem.box3d_yaw)
        Rot = np.array([[c, 0, s], [0, 1, 0], [-s, 0, c]])
        l = kitti_detection_elem.box3d_length  
        w = kitti_detection_elem.box3d_width
        h = kitti_detection_elem.box3d_height
        x_edges = [l / 2, l / 2, -l / 2, -l / 2, l / 2, l / 2, -l / 2, -l / 2]
        y_edges = [0, 0, 0, 0, -h, -h, -h, -h]
        z_edges = [w / 2, -w / 2, -w / 2, w / 2, w / 2, -w / 2, -w / 2, w / 2]
        bbox_coords = np.dot(Rot, np.vstack([x_edges, y_edges, z_edges]))
        bbox_coords[0, :] = bbox_coords[0, :] + kitti_detection_elem.box3d_pos_x
        bbox_coords[1, :] = bbox_coords[1, :] + kitti_detection_elem.box3d_pos_y
        bbox_coords[2, :] = bbox_coords[2, :] + kitti_detection_elem.box3d_pos_z
        return bbox_coords
def compute_3d_bbox ( kitti_detection_elem ) : c = np . cos ( kitti_detection_elem . box3d_yaw ) s = np . sin ( kitti_detection_elem . box3d_yaw ) Rot = np . array ( [ [ c , 0 , s ] , [ 0 , 1 , 0 ] , [ - s , 0 , c ] ] ) l = kitti_detection_elem . box3d_length w = kitti_detection_elem . box3d_width h = kitti_detection_elem . box3d_height x_edges = [ l / 2 , l / 2 , - l / 2 , - l / 2 , l / 2 , l / 2 , - l / 2 , - l / 2 ] y_edges = [ 0 , 0 , 0 , 0 , - h , - h , - h , - h ] z_edges = [ w / 2 , - w / 2 , - w / 2 , w / 2 , w / 2 , - w / 2 , - w / 2 , w / 2 ] bbox_coords = np . dot ( Rot , np . vstack ( [ x_edges , y_edges , z_edges ] ) ) bbox_coords [ 0 , : ] = bbox_coords [ 0 , : ] + kitti_detection_elem . box3d_pos_x bbox_coords [ 1 , : ] = bbox_coords [ 1 , : ] + kitti_detection_elem . box3d_pos_y bbox_coords [ 2 , : ] = bbox_coords [ 2 , : ] + kitti_detection_elem . box3d_pos_z return bbox_coords
Provide the 3d point corners of the bounding box of the specified kitti detection object.
Provide the 3d point corners of the bounding box of the specified kitti detection object .
"""
        Provide the 3d point corners of the bounding box of the specified kitti detection object.

        @param kitti_detection_elem: The kitti detection object
        @type  kitti_detection_elem: KittiDetection
        @return: numpy array 3x8
        """ # Build rotation matrix # noqa: E741 # 3d bounding box corners # apply rotation to the bounding box # (3x3) dot (3x8) = (3x8) # apply translation
numpy array 3x8
numpy array 3x8
kitti_detection_elem
The kitti detection object
The kitti detection object