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"]
docstr: get minimum rectangle of points
          
docstr_tok: ["get","minimum","rectangle","of","points"]
code: def get_rect_from_pts(self, pts, h, w):
      """get minimum rectangle of points"""
      assert (
          pts.shape[-1] % 2 == 0
      ), "the dim of input [pts] is not correct"
      min_x, min_y = np.min(pts[:, 0::2], axis=1), np.min(
          pts[:, 1::2], axis=1
      )
      max_x, max_y = np.max(pts[:, 0::2], axis=1), np.max(
          pts[:, 1::2], axis=1
      )
      min_x, min_y = np.clip(min_x, 0, w), np.clip(min_y, 0, h)
      max_x, max_y = np.clip(max_x, 0, w), np.clip(max_y, 0, h)
      boxes = np.stack([min_x, min_y, max_x, max_y], axis=-1)
      return boxes
  
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 3 for calling the RRotate obj's underlying member method code with example usage: obj.get_rect_from_pts(pts, h, w) and returns: boxes