mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-04 13:14:23 +08:00
added get_local_maxima to feature
This commit is contained in:
@@ -14,7 +14,7 @@ from .censure import CENSURE
|
||||
from .orb import ORB
|
||||
from .match import match_descriptors
|
||||
from .util import plot_matches
|
||||
from .blob import blob_dog
|
||||
from .blob import blob_dog, get_local_maxima
|
||||
|
||||
|
||||
__all__ = ['daisy',
|
||||
@@ -42,4 +42,5 @@ __all__ = ['daisy',
|
||||
'ORB',
|
||||
'match_descriptors',
|
||||
'plot_matches',
|
||||
'blob_dog']
|
||||
'blob_dog',
|
||||
'get_local_maxima']
|
||||
|
||||
@@ -41,6 +41,16 @@ def get_local_maxima(ar, threshold, connectivity=3):
|
||||
A 2d array in which each row contains 3 values, the indices of local
|
||||
maxima.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> a = np.array([[ 0 , 0 , 0 , 0 , 0],
|
||||
... [ 0 , 0 , 3 , 0 , 0],
|
||||
... [ 0 , 0 , 1 , 0 , 0],
|
||||
... [ 0 , 1 , 0 , 0 , 0],
|
||||
... [ 0 , 0 , 0 , 0 , 0]])
|
||||
>>> get_local_maxima(a, threshold = 1, connectivity = 2)
|
||||
array([[1, 2]])
|
||||
|
||||
"""
|
||||
# computing max filter using all neighbors in cube
|
||||
fp = generate_binary_structure(ar.ndim, connectivity)
|
||||
|
||||
Reference in New Issue
Block a user