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 filter(self, size, threshold, mode):
      if mode == "area":
          if size[0] * size[1] < threshold:
              return True
      elif mode == "edge":
          if min(size) < threshold:
              return True
      return False
  
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 Poly2RBox obj's underlying member method code with example usage: obj.filter(size, threshold, mode) and returns: False, True, True