Stentiford Thinning Algorithm

This code is implemented using the reference paper IMAGE PROCESSING TECHNIQUES FOR MACHINE VISION
430 Downloads
Updated 10 Jan 2012

View License

The Stentiford Algorithm can be stated as following:

1. Find a pixel location (i, j) where the pixels in the image match those in template T1. With this template all pixels along the top of the image are removed moving from left to right and from top to bottom.

2. If the central pixel is not an endpoint, and has connectivity number = 1, then mark this pixel for deletion.

Endpoint pixel: A pixel is considered an endpoint if it is connected to just one other pixel. That is, if a black pixel has only one black neighbour out of the eight possible neighbours.

3. Repeat steps 1 and 2 for all pixel locations matching T1.
4. Repeat steps 1-3 for the rest of the templates: T2, T3, and T4.

T2 will match pixels on the left side of the object, moving from bottom to top and from left to right. T3 will select pixels along the bottom of the image and move from right to left and from bottom to top. T4 locates pixels on the right side of the object, moving from top to bottom and right to left.

5. Set to white the pixels marked for deletion.

Cite As

mohan palani (2024). Stentiford Thinning Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/34517-stentiford-thinning-algorithm), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0