skimage.feature.peak_local_max behaviour
Hi, My first post a few hours ago somehow didn't appear. It was with examples but I trink I can make my paint without. If two peaks with the same value are within the min_distance range they are not detectes as too closer and reduced to one. Just use the provided examples in the doc and change the peaks to the same value.
Sorry! I realy suck at writing with my cellphone. Am 16.01.2015 00:48 schrieb "Sigmund" <siggin@gmail.com>:
Hi, My first post a few hours ago somehow didn't appear. It was with examples but I trink I can make my paint without. If two peaks with the same value are within the min_distance range they are not detectes as too closer and reduced to one. Just use the provided examples in the doc and change the peaks to the same value.
-- You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/HksA6QBButU/unsubscribe. To unsubscribe from this group and all its topics, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Since nothing has happened here and I'm back at my office some examples: *normal behavior:*
img1 = np.zeros((7, 7))>>> img1[3, 4] = 1>>> img1[3, 2] = 1.5>>> img1array([[ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 1.5, 0. , 1. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ]]) peak_local_max(img1, min_distance=1)array([[3, 2], [3, 4]])
peak_local_max(img1, min_distance=2)array([[3, 2]])
*now the, in my opinion, not normal behavior: *
img1 = np.zeros((7, 7))>>> img1[3, 4] = 1>>> img1[3, 2] = 1>>> img1array([[ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 1. , 0. , 1. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ], [ 0. , 0. , 0. , 0. , 0. , 0. , 0. ]]) peak_local_max(img1, min_distance=1)array([[3, 2], [3, 4]])
peak_local_max(img1, min_distance=2) array([[3, 2], [3, 4]])
*Thanks again!Siggi* Am Freitag, 16. Januar 2015 00:48:45 UTC+1 schrieb Sigmund:
Hi, My first post a few hours ago somehow didn't appear. It was with examples but I trink I can make my paint without. If two peaks with the same value are within the min_distance range they are not detectes as too closer and reduced to one. Just use the provided examples in the doc and change the peaks to the same value.
This is not ideal, but please try `skimage.feature.corner_peaks`. It should work with this function (untested).
On Fri, Jan 16, 2015 at 5:53 AM, Sigmund <siggin@gmail.com> wrote:
skimage.feature.corner_peaks is working like I expect peak_local_max to do.
Thanks for the feedback, Sigmund. We've been discussing a rewrite of this functionality exactly because it yields unexpected results like those you mentioned. Stéfan
participants (4)
-
Johannes Schoenberger
-
Sigmund
-
Sigmund Neher
-
Stéfan van der Walt