openalea.eartrack.binarisation.threshold_hsv

openalea.eartrack.binarisation.threshold_hsv(image, hsv_min, hsv_max, mask=None)[source]

Binarize HSV image with hsv_min and hsv_max parameters. => cv2.inRange(hsv_image, hsv_min, hsv_max)

If mask is not None : => cv2.bitwise_and(binary_hsv_image, mask)

Parameters:
  • image (numpy.ndarray of integers) – 3-D array of image RGB
  • hsv_min (tuple of integers) – HSV value of minimum range
  • hsv_max (tuple of integers) – HSV value of maximum range
  • mask (numpy.ndarray, optional) – Array of same shape as image. Only points at which mask == True will be thresholded.
Returns:

out – Thresholded binary image

Return type:

numpy.ndarray