mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-17 11:26:12 +08:00
Returning the corner response
This commit is contained in:
committed by
Johannes Schönberger
parent
fbc15c96a8
commit
e06415929b
@@ -547,7 +547,7 @@ def corner_peaks(image, min_distance=10, threshold_abs=0, threshold_rel=0.1,
|
||||
return peaks
|
||||
|
||||
|
||||
def corner_fast(image, n=12, threshold=0.15, non_max_shape=(3, 3)):
|
||||
def corner_fast(image, n=12, threshold=0.15):
|
||||
|
||||
"""Extract FAST corners for a given image.
|
||||
|
||||
@@ -564,9 +564,6 @@ def corner_fast(image, n=12, threshold=0.15, non_max_shape=(3, 3)):
|
||||
Threshold used in deciding whether the pixels on the circle are
|
||||
brighter, darker or similar w.r.t. the test pixel. Decrease the
|
||||
threshold when more corners are desired and vice-versa.
|
||||
non_max_shape : tuple of two odd int
|
||||
Represents the area in which Non-maximal suppression is applied.
|
||||
By default, a 3 x 3 area is used.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@@ -586,12 +583,4 @@ def corner_fast(image, n=12, threshold=0.15, non_max_shape=(3, 3)):
|
||||
|
||||
image = img_as_float(image)
|
||||
image = np.ascontiguousarray(image)
|
||||
corner_response = _corner_fast(image, n, threshold)
|
||||
|
||||
# Non-maximal Suppression
|
||||
corner_zero_mask = corner_response != 0
|
||||
maximas = (maximum_filter(corner_response, non_max_shape) == corner_response) & corner_zero_mask
|
||||
x, y = np.where(maximas == True)
|
||||
|
||||
corners = np.squeeze(np.dstack((x, y)))
|
||||
return corners
|
||||
return _corner_fast(image, n, threshold)
|
||||
|
||||
Reference in New Issue
Block a user