{ } Raw JSON

bundles / skimage latest / skimage / feature / corner / corner_peaks

function

skimage.feature.corner:corner_peaks

source: /dev/scikit-image/src/skimage/feature/corner.py:1125

Signature

def corner_peaks(image, min_distance = 1, threshold_abs = None, threshold_rel = None, exclude_border = True, indices = True, num_peaks = inf, footprint = None, labels = None, *, num_peaks_per_label = inf, p_norm = inf)

Summary

Find peaks in corner measure response image.

Extended Summary

This differs from skimage.feature.peak_local_max in that it suppresses multiple connected peaks with the same accumulator value.

Parameters

image : ndarray of shape (M, N)

Input image.

min_distance : int, optional

The minimal allowed distance separating peaks.

* : *

See skimage.feature.peak_local_max.

p_norm : float

Which Minkowski p-norm to use. Should be in the range [1, inf]. A finite large p may cause a ValueError if overflow can occur. inf corresponds to the Chebyshev distance and 2 to the Euclidean distance.

Returns

output : ndarray or ndarray of bools
  • If indices = True(row, column, ...) coordinates of peaks.

  • If indices = FalseBoolean array shaped like image, with peaks represented by True values.

Notes

The num_peaks limit is applied before suppression of connected peaks. To limit the number of peaks after suppression, set num_peaks=np.inf and post-process the output of this function.

Examples

from skimage.feature import peak_local_max
response = np.zeros((5, 5))
response[2:4, 2:4] = 1
response
peak_local_max(response)
corner_peaks(response)
✓

See also

skimage.feature.peak_local_max

Aliases

  • skimage.feature.corner_peaks

Referenced by