Commit b3b128c
Adds the function `peak_local_max` to the `skimage2` namespace. Compared
to the old version in `skimage` it has a few differences:
* Parameter `p_norm` defaults to 2 (Euclidean distance),
was `numpy.inf` (Chebyshev distance)
* Parameter `exclude_border` defaults to 1, was `True`
* Parameter `exclude_border` no longer accepts `False` and `True`,
pass 0 instead of `False`, or `min_distance` instead of `True`
* Parameters after `image` are keyword-only
Deprecates passing `np.inf` to `num_peaks` and
`num_peaks_per_label`.
In `skimage.feature.peak_local_max`, support passing floats to the
parameter `min_distance`.
In `skimage.feature.peak_local_max`, use `None` as the new default for the
parameters `num_peaks` and `num_peaks_per_label` – the default behavior is
the same as before but passing `numpy.inf` is deprecated.
Ensure `skimage.feature.peak_local_max` returns results with the correct shape
when no peaks where found and `labels` where given.
---------
Co-authored-by: Stefan van der Walt <stefan@mentat.za.net>
1 parent 70ab2a6 commit b3b128c
File tree
12 files changed
+584
-210
lines changed- doc/source/user_guide
- src
- skimage2
- feature
- skimage/feature
- tests
- skimage2/feature
- skimage/feature
12 files changed
+584
-210
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
68 | 119 | | |
69 | 120 | | |
70 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
| 1204 | + | |
| 1205 | + | |
1204 | 1206 | | |
1205 | 1207 | | |
1206 | 1208 | | |
| |||
1209 | 1211 | | |
1210 | 1212 | | |
1211 | 1213 | | |
1212 | | - | |
| 1214 | + | |
1213 | 1215 | | |
1214 | 1216 | | |
1215 | 1217 | | |
| |||
0 commit comments