code: def draw_3d_tracked_boxes(
      frame,
      objects,
      projecter,
      border_colors=None,
      border_width=None,
      id_size=None,
      id_thickness=None,
      draw_box=True,
      draw_only_alive=True,
  ):
      frame_scale = frame.shape[0] / 100
      if border_width is None:
          border_width = int(frame_scale * 0.5)
      if id_size is None:
          id_size = frame_scale / 10
      if id_thickness is None:
          id_thickness = int(frame_scale / 5)
      if isinstance(border_colors, tuple):
          border_colors = [border_colors]
  
      for n, obj in enumerate(objects):
          if draw_only_alive and not obj.live_points.any():
              continue
          if border_colors is None:
              color = Palette.choose_color(obj.id)
          else:
              color = border_colors[n % len(border_colors)]
  
          # project the points to the pixel space
          pixel_points = projecter(obj.estimate)
  
          # sort the points to draw the lines
          sorted_points = np.array(
              [pixel_points[index] for index in CONNECTED_INDEXES]
          )
  
          # draw box
          if draw_box:
              frame = cv2.polylines(
                  frame,
                  [sorted_points.astype(np.int32).reshape((-1, 1, 2))],
                  isClosed=False,
                  color=color,
                  thickness=border_width,
              )
  
          if id_size > 0:
              id_draw_position = pixel_points[0].astype(int)
              cv2.putText(
                  frame,
                  str(obj.id),
                  tuple(id_draw_position),
                  cv2.FONT_HERSHEY_SIMPLEX,
                  id_size,
                  color,
                  id_thickness,
                  cv2.LINE_AA,
              )
      return frame
  
file_path: norfair/demos/3d_track/src/utils.py
imports: import cv2
  import numpy
  from norfair import Palette
label_desc: Use image node_id 1 for calling a global function with example usage: draw_3d_tracked_boxes(frame, objects, projecter, border_colors, border_width, id_size, id_thickness, draw_box, draw_only_alive) and returns: frame