ovl.target_filters.shape_filters.rotated_rectangle_filter module

ovl.target_filters.shape_filters.rotated_rectangle_filter.rotated_rectangle_filter(contour_list, min_area_ratio: Union[float, ovl.helpers.types.RangedNumber.<locals>.Hint] = 0.8)[source]

Receives a list of contours and returns only those that are approximately a rectangle regardless of the angle of rotation.

Parameters:
  • contour_list – List of Contours to filter
  • min_area_ratio – the minimum ratio between the contour area and the bounding shape
Returns:

the contour list filtered.