ovl.target_filters.shape_filters.circle_filter module

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

Filters out contour which are not approximately circle.

Parameters:
  • contour_list – list of contours (numpy arrays) to be filtered
  • min_area_ratio – minimum ratio between the area of the enclosing circle and the contour (contour /enclosing circle)
Returns:

the list of contours that fit the criteria