Stentiford Thinning Algorithm
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
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Morphological Operations >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |