![](https://secure.gravatar.com/avatar/0f2c41e836010745b862d3a9f95635ff.jpg?s=120&d=mm&r=g)
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.