corner_peaks
-
skimage.feature.corner_peaks(image, min_distance=1, threshold_abs=None, threshold_rel=0.1, exclude_border=True, indices=True, num_peaks=inf, footprint=None, labels=None)
[source] -
Find corners in corner measure response image.
This differs from
skimage.feature.peak_local_max
in that it suppresses multiple connected peaks with the same accumulator value.Parameters: * : *
Examples
12345678910111213141516>>>
from
skimage.feature
import
peak_local_max
>>> response
=
np.zeros((
5
,
5
))
>>> response[
2
:
4
,
2
:
4
]
=
1
>>> response
array([[
0.
,
0.
,
0.
,
0.
,
0.
],
[
0.
,
0.
,
0.
,
0.
,
0.
],
[
0.
,
0.
,
1.
,
1.
,
0.
],
[
0.
,
0.
,
1.
,
1.
,
0.
],
[
0.
,
0.
,
0.
,
0.
,
0.
]])
>>> peak_local_max(response)
array([[
2
,
2
],
[
2
,
3
],
[
3
,
2
],
[
3
,
3
]])
>>> corner_peaks(response)
array([[
2
,
2
]])
Please login to continue.