process_contours¶

process_contours(contours, hierarchy, scale_factor=(1, 1), properties=None)[source]¶

Process contours and hierarchy to create annotations.

Parameters:
  • contours (list[np.ndarray]) – A list of contours.

  • hierarchy (list[np.ndarray]) – A list of hierarchy.

  • scale_factor (tuple[float, float]) – The scale factor to use when loading the annotations.

  • properties (dict | None) – Optional properties to include with each annotation type.

Returns:

A list of annotations.

Return type:

list