vuba.find_contours
- vuba.find_contours(img, *args, **kwargs)[source]
Convenience function for contour detection.
This function accounts for the OpenCV version supplied and executes accordingly.
- Parameters
img (ndarray) – Grayscale image to perform contour detection on.
*args (tuple) – Additional arguments cv2.findContours will require.
*kwargs (tuple) – Additional keyword arguments cv2.findContours will require.
- Returns
contours (ndarray) – An array of contours detected.
hierarchy (ndarray) – Corresponding hierarchy information to the contours detected.
- Raises
ValueError – If the supplied image is not grayscale or has greater than 2 channels.