Image.endpoint#

Image.endpoint(**kwargs: Any) Self[source]#

Find end points on a binary skeleton image

Parameters:

kwargs – options passed to hitormiss

Returns:

Image

Return type:

Image instance

Return a binary image where pixels are True if the corresponding pixel in the binary image is the end point of a single-pixel wide line such as found in an image skeleton.

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.String('000000|011110|000000')
>>> img.print()
   0 0 0 0 0 0
   0 1 1 1 1 0
   0 0 0 0 0 0
>>> img.endpoint().print()
   0 0 0 0 0 0
   0 1 0 0 1 0
   0 0 0 0 0 0

Note

Computed using the hit-or-miss morphological operator.

References:
Seealso:

hitormiss thin triplepoint