openalea.eartrack.binarisation.threshold_meanshift(image, mean_image, threshold=0.3, mask=None)[source]

Threshold pixels in numpy array such as:

image / mean <= (1.0 - threshold)

If reverse is True (Inequality is reversed):

image / mean <= (1.0 + threshold
  • image (numpy.ndarray of integers) – 3-D array
  • mean_image (numpy.ndarray of the same shape as 'image') – 3-D array ‘mean_image’
  • threshold (float, optional) – Threshold value. Must between 0.0 and 1.0
  • reverse (bool, optional) – If True reverse inequality
  • mask (numpy.ndarray, optional) – Array of same shape as image. Only points at which mask == True will be thresholded.

out – Thresholded binary image

Return type:


See also

get_mean_image(), threshold_hsv()