Skeletonization in Python using OpenCV

Let me start off with a (not so) funny joke.

Neeramitra Reddy
Analytics Vidhya
Published in
4 min readJan 7, 2020

--

Why are skeletons so calm?

Because nothing gets under their skin.

What the heck is Skeletonization?

Before talking about skeletonization, let’s understand what Binary Image and BLOBs are.

Binary Image as the name suggests is an image where the value of every pixel in the image is either 0 (Pure Black) or 255 (Pure White).

A binary image

BLOB (Binary Large Object) refers to a group of connected pixels in a binary image.

Black BLOBs are circled in Red in this binary image

Skeletonization is a process of reducing foreground regions in a binary image to a skeletal remnant that largely preserves the extent and connectivity of the original region while throwing away most of the original foreground pixels.

In simpler words, Skeletonization makes a BLOB very thin (typically 1 pixel).

--

--