class_docstr: Camera motion compensation.
  
  Args:
      warp_mode (str): Warp mode in opencv.
          Defaults to 'cv2.MOTION_EUCLIDEAN'.
      num_iters (int): Number of the iterations. Defaults to 50.
      stop_eps (float): Terminate threshold. Defaults to 0.001.
class_docstr_tok: ["Camera","motion","compensation",".","Args",":","warp_mode","(","str",")",":","Warp","mode","in","opencv",".","Defaults","to","'cv2.MOTION_EUCLIDEAN","'",".","num_iters","(","int",")",":","Number","of","the","iterations",".","Defaults","to","50.","stop_eps","(","float",")",":","Terminate","threshold",".","Defaults","to","0.001","."]
docstr: Warp bounding boxes according to the warping matrix.
docstr_tok: ["Warp","bounding","boxes","according","to","the","warping","matrix","."]
code: def warp_bboxes(self, bboxes: Tensor, warp_matrix: Tensor) -> Tensor:
      """Warp bounding boxes according to the warping matrix."""
      tl, br = bboxes[:, :2], bboxes[:, 2:]
      tl = torch.cat(
          (tl, torch.ones(tl.shape[0], 1).to(bboxes.device)), dim=1
      )
      br = torch.cat(
          (br, torch.ones(tl.shape[0], 1).to(bboxes.device)), dim=1
      )
      trans_tl = torch.mm(warp_matrix, tl.t()).t()
      trans_br = torch.mm(warp_matrix, br.t()).t()
      trans_bboxes = torch.cat((trans_tl, trans_br), dim=1)
      return trans_bboxes.to(bboxes.device)
  
file_path: mmdetection/mmdet/models/task_modules/tracking/camera_motion_compensation.py
imports: import cv2
  import numpy
  import torch
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import bbox_cxcyah_to_xyxy, bbox_xyxy_to_cxcyah
label_desc: Use image node_id 3 for calling the CameraMotionCompensation obj's underlying member method code with example usage: obj.warp_bboxes(bboxes, warp_matrix) and returns: trans_bboxes