Skip to content

Instantly share code, notes, and snippets.

View stefano-malacrino's full-sized avatar

stefano-malacrino

  • University of Oxford
  • Oxford, United Kingdom
View GitHub Profile
"""OpenCV contours to Shapely polygons converter
This script allows the user to convert the contours hirarchy generated by cv2.find_contours()
into a list of Shapely polygons.
This script requires that `cv2` `numpy` and `shapely` be installed within the Python
environment you are running this script in.
This file can also be imported as a module and contains the following
functions: