class_docstr: Rotate Image, Polygon, Box
  
  Args:
      scale (float): rotate scale
      angle (float): rotate angle
      fill_value (int, tuple): fill color
      auto_bound (bool): whether auto bound or not
class_docstr_tok: ["Rotate","Image",",","Polygon",",","Box","Args",":","scale","(","float",")",":","rotate","scale","angle","(","float",")",":","rotate","angle","fill_value","(","int",",","tuple",")",":","fill","color","auto_bound","(","bool",")",":","whether","auto","bound","or","not"]
code: def get_rotated_matrix(self, angle, scale, h, w):
      center = ((w - 1) * 0.5, (h - 1) * 0.5)
      matrix = cv2.getRotationMatrix2D(center, -angle, scale)
      # calculate the new size
      cos = np.abs(matrix[0, 0])
      sin = np.abs(matrix[0, 1])
      new_w = h * sin + w * cos
      new_h = h * cos + w * sin
      # calculate offset
      n_w = int(np.round(new_w))
      n_h = int(np.round(new_h))
      if self.auto_bound:
          ratio = min(w / n_w, h / n_h)
          matrix = cv2.getRotationMatrix2D(center, -angle, ratio)
      else:
          matrix[0, 2] += (new_w - w) * 0.5
          matrix[1, 2] += (new_h - h) * 0.5
          w = n_w
          h = n_h
      return matrix, h, w
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  from numbers import Number, Integral
  import cv2
  import numpy
  import math
  import copy
  from .operators import register_op, BaseOperator
  from ppdet.modeling.rbox_utils import poly2rbox_le135_np, poly2rbox_oc_np, rbox2poly_np
  from ppdet.utils.logger import setup_logger
  from ppdet.utils.compact import imagedraw_textsize_c
label_desc: Use image node_id 2 for calling the RRotate obj's underlying member method code with example usage: obj.get_rotated_matrix(angle, scale, h, w) and returns: matrix,  h,  w