openalea.phenomenal.image.threshold.threshold_meanshift
- openalea.phenomenal.image.threshold.threshold_meanshift(image, mean_image, threshold=0.3, reverse=False, 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
- Parameters:
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.
- Returns:
out – Thresholded binary image
- Return type:
numpy.ndarray
See also
get_mean_image
,threshold_hsv