Zhang-Suen thinning algorithm: Difference between revisions

Line 669:
................................</pre>
=={{header|Ruby}}==
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. Izs shallmay probablybe changechanged thisto soremembers thatthe zsstep remembersindependently if the stepreader does not wish to explore the independantlyalgorithm.
 
Substituting for g==0 in the code
2,172

edits