class_docstr: Polygon to Rotated Box, using new OpenCV definition since 4.5.1
  
  Args:
      filter_threshold (int, float): threshold to filter annotations
      filter_mode (str): filter mode, ['area', 'edge']
      rbox_type (str): rbox type, ['le135', 'oc']
class_docstr_tok: ["Polygon","to","Rotated","Box",",","using","new","OpenCV","definition","since","4.5.1","Args",":","filter_threshold","(","int",",","float",")",":","threshold","to","filter","annotations","filter_mode","(","str",")",":","filter","mode",",","[","'area","'",",","'edge","'","]","rbox_type","(","str",")",":","rbox","type",",","[","'le135","'",",","'oc","'","]"]
code: def __init__(
      self, filter_threshold=4, filter_mode=None, rbox_type="le135"
  ):
      super(Poly2RBox, self).__init__()
      self.filter_fn = lambda size: self.filter(
          size, filter_threshold, filter_mode
      )
      self.rbox_fn = (
          poly2rbox_le135_np
          if rbox_type == "le135"
          else poly2rbox_oc_np
      )
  
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 1 to create a new Poly2RBox object from inherited base classes: BaseOperator with example: obj = Poly2RBox(filter_threshold, filter_mode, rbox_type)