{ } Raw JSON

bundles / skimage latest / skimage / measure / _regionprops_utils / perimeter

function

skimage.measure._regionprops_utils:perimeter

source: /dev/scikit-image/src/skimage/measure/_regionprops_utils.py:417

Signature

def perimeter(image, neighborhood = 4)

Summary

Calculate total perimeter of all objects in binary image.

Parameters

image : ndarray of shape (M, N)

Binary input image.

neighborhood : 4 or 8, optional

Neighborhood connectivity for border pixel determination. It is used to compute the contour. A higher neighborhood widens the border on which the perimeter is computed.

Returns

perimeter : float

Total perimeter of all objects in binary image.

Examples

import skimage as ski
img_coins = ski.data.coins() > 110
✓
ski.measure.perimeter(img_coins, neighborhood=4)  # doctest: +ELLIPSIS
ski.measure.perimeter(img_coins, neighborhood=8)  # doctest: +ELLIPSIS
✗

Aliases

  • skimage.measure.perimeter

Referenced by