MATLAB: How to skeletal the image

digital image processingimage processingImage Processing Toolbox

Do we find out the exact length (In pixels) of horizontal and vertical line….

Best Answer

To get the skeleton:
skelImage = bwmorph(binaryImage, 'skel', inf);
to find the number of pixels in that:
theNumberOfPixels = sum(skelImage(:));