Zhang-Suen thinning algorithm: Difference between revisions
Content deleted Content added
→{{header|Ruby}}: Mark incorrect. |
|||
Line 669: | Line 669: | ||
................................</pre> |
................................</pre> |
||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
{{incorrect|Ruby|See talk page on Y axis inversions}} |
|||
First I define a function zs which given a point and its eight neighbours returns 1 if the point may be culled, 0 otherwise. g indicates if this is step 1 or step 2 in the task description. zs may be changed to remembers the step independently if the reader does not wish to explore the algorithm. |
First I define a function zs which given a point and its eight neighbours returns 1 if the point may be culled, 0 otherwise. g indicates if this is step 1 or step 2 in the task description. zs may be changed to remembers the step independently if the reader does not wish to explore the algorithm. |
||