def render_camera_frustrum(self, intrinsics, extrinsics, width, color=YELLOW, line_thickness=1):
        """
        Visualize the frustrum of camera by drawing two lines connecting the
        camera center and top-left / top-right corners of image plane.

        Parameters
        ----------
        intrinsics: np.ndarray
            3x3 intrinsics matrix

        extrinsics: Pose
            Pose of camera in body frame.

        width: int
            Width of image.

        color: Tuple[int], default: Yellow
            Color in RGB of line.

        line_thickness: int, default: 1
            Thickness of line.
        """

        K_inv = np.linalg.inv(intrinsics)

        top_corners_2d = np.array([[0, 0, 1], [width, 0, 1]], np.float64)

        top_corners_3d = np.dot(top_corners_2d, K_inv.T)
        frustrum_in_cam = np.vstack([np.zeros((1, 3), np.float64), top_corners_3d])
        frustrum_in_body = extrinsics * frustrum_in_cam
        frustrum_in_bev = self._bev_rotation * frustrum_in_body

        # Compute the center and offset of the corners
        frustrum_in_bev = frustrum_in_bev[:, :2]
        frustrum_in_bev[:, 0] = (self._center_pixel[0] + frustrum_in_bev[:, 0] * self._pixels_per_meter)
        frustrum_in_bev[:, 1] = (self._center_pixel[1] + frustrum_in_bev[:, 1] * self._pixels_per_meter)

        frustrum_in_bev[1:] = (100 * (frustrum_in_bev[1:] - frustrum_in_bev[0]) + frustrum_in_bev[0])
        frustrum_in_bev = frustrum_in_bev.astype(np.int32)

        cv2.line(self.data, tuple(frustrum_in_bev[0]), tuple(frustrum_in_bev[1]), color, line_thickness)
        cv2.line(self.data, tuple(frustrum_in_bev[0]), tuple(frustrum_in_bev[2]), color, line_thickness)

        Visualize the frustrum of camera by drawing two lines connecting the
        camera center and top-left / top-right corners of image plane.

        Parameters
        ----------
        intrinsics: np.ndarray
            3x3 intrinsics matrix

        extrinsics: Pose
            Pose of camera in body frame.

        width: int
            Width of image.

        color: Tuple[int], default: Yellow
            Color in RGB of line.

        line_thickness: int, default: 1
            Thickness of line.
        
tridet/visualizers/bev.py