Zhang-Suen thinning algorithm: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: in-lined source 'image') |
(→{{header|J}}: use semi tacit adverb) |
||
Line 2,106: | Line 2,106: | ||
frameImg=: 0 ,. 0 , >:@$ {. ] NB. adds border of 0's to image |
frameImg=: 0 ,. 0 , >:@$ {. ] NB. adds border of 0's to image |
||
neighbrs=: |
neighbrs=: 1 :'(1 1 ,: 3 3)&(u;._3)' NB. applies verb u to neighbourhoods |
||
(1 1 ,: 3 3) u;._3 y |
|||
) |
|||
Bdry=: 1 2 5 8 7 6 3 0 1 NB. map pixel index to neighbour order |
Bdry=: 1 2 5 8 7 6 3 0 1 NB. map pixel index to neighbour order |