Zhang-Suen thinning algorithm: Difference between revisions

m
Line 918:
 
=={{header|Fortran}}==
With F90 came standardisation of a variety of array manipulation facilities. Since the image array is to be inspected as a whole then adjusted rather than adjusted step-by-step as it is inspected, the first thought was to employ the special facility of the FOR ALL statement, which is that in an expression such as <lang Fortarn>FOR ALL (i = 2:n - 1) A(i) = (A(i - 1) + A(i) + A(Ii + 1))/3</lang> all right-hand-side expressions will be evaluated with the original values of the array, while in the less special array assignment <lang Fortran>A(2:N - 1) = (A(1:N - 2) + A(2:N - 1) + A(3:N))/3</lang> as in the case of the equivalent DO-loop, the processing will be with a mixture of old and new values as the loop proceeds.
 
So, that suggests something like <lang Fortran> FOR ALL (I = 2:N - 1, J = 2:M - 1)
1,220

edits