Image.thin#
- Image.thin(**kwargs: Any) Self[source]#
Morphological skeletonization
Return the thinned version (skeleton) of the binary image as another binary image. Any non-zero region is replaced by a network of single-pixel wide lines.
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.String('000000|011110|011110|000000') >>> img.print() 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 >>> img.thin().print() 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 >>> img = Image.Read("shark2.png") >>> skeleton = img.thin()
- References:
P. Corke, Robotics, Vision & Control for Python, Springer, 2023, Section 11.6.3.
- Seealso: