MATLAB: How to find distribution of thickness?

binarydigital image processingimage analysisimage processingImage Processing Toolboximage segmentationplotting

Best Answer

This is how:
1. Use bwdist() to calculate the Euclidean Distance Transform.
2. Use bwmorph() to calculate the skeleton.
3. Get the ridgelines by taking the EDT image at the skeleton locations. The values along the ridgelines of the EDT will be the distance from the ridgeline (backbone, skeleton) to the background. You may want to double these values to get the width all the way across instead of only half way across.
4. Take the histogram of those values.
It should only be 4-6 lines of code (not including comments, calls to display and plot things etc.). Give it a shot.
Related Question