-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
⚠️ PriorityThis issue or PR should be given priorityThis issue or PR should be given priority
Description
Description
I have been trying to use the h_maxima implementation but this function seems to exhibit unstable behaviors. For example,
-
when the input is all zeros, h_maxima returns a marker filled with all 1s. This seems incorrect.
-
Also, when my input consists of floating point values, and h set to a floating point threshold, even with a slight 0.1 change in h value, the number of detected instances can vary quite a bit.
Way to reproduce
img = np.zeros((10, 10), dtype=float)
marker = h_maxima(img, h=1)
print(np.unique(marker))
Version information
# Paste the output of the following python commands
from __future__ import print_function
import sys; print(sys.version)
import platform; print(platform.platform())
import skimage; print("scikit-image version: {}".format(skimage.__version__))
import numpy; print("numpy version: {}".format(numpy.__version__))
3.6.8 |Anaconda custom (64-bit)| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0]
Linux-3.10.0-957.5.1.el7.x86_64-x86_64-with-centos-7.6.1810-Core
scikit-image version: 0.15.0
numpy version: 1.16.4
Metadata
Metadata
Assignees
Labels
⚠️ PriorityThis issue or PR should be given priorityThis issue or PR should be given priority