IMPLEMENTATION OF THE FOUR CONNECTED ALGORITHM OF ROSENFELD FOR SKELETONIZATION
- INPUT : "binaryfile.pbm" a binary image file .
- OUTPUT : "Skelet.pbm" the skeleton of the pattern based
on the four connected Rosenfeld's algorithm.
- ACCESS : User can view the sourse code of program or download the executable file.
- IMPLEMENTATION : After the user has given the name of the image file (which has
to be a binary file), the program stores it in an array.Then the algorithm
eight connected is called and the following steps are performed :
- step1 changes all black points to white if they are north border
points that are 4_simple but neither 4_isolated nor 4_endpoint.
- step2 changes all black points to white if they are south border
points that are 4_simple but neither 4_isolated nor 4_endpoint
- step3 changes all black points to white if they are east border
points that are 4_simple but neither 4_isolated nor 4_endpoint
- step4 changes all black points to white if they are west border
points that are 4_simple but neither 4_isolated nor 4_endpoint
Notice that all changes in each step are done in an
temporary array and then the result of these changes is copied in the first array.
Then next step is executed in parallel on the result of the previouse step so
steps 1 to 4 are done in sequense until no pixels are changed from black to white
Finally when the skeleton is obtained, the array will be copied in a file
which is called "skelet.pbm".
The user can see the result by using "XV"
These are a few examples of executing the program :
The original pattern The skeleton of
the pattern
The original pattern The skeleton of
the pattern
The original pattern The skeleton of
the pattern
The original pattern The skeleton
of
the pattern
We can see that four connected algorithm is noise sensitive and also it
reserves the four connectivity of the skeleton of the pattern .
Home