comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Thinning algorithm without for loops
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Thinning algorithm without for loops [message #55233] Mon, 06 August 2007 12:31 Go to previous message
nathan12343 is currently offline  nathan12343
Messages: 14
Registered: August 2007
Junior Member
Hi all-

I'm trying to impliment the Zhang-Suen thinning algorithm in IDL.
This particular algorithm decides whether a pixel needs to be deleted
or not based on properties of the pixels immediately surrounding the
pixel we are concerned with (i.e. a pixel's 8-neighbors). This
naturally lends its self to for loops. Let's say I have an image, a
512X512 array of bytes. The code iteratively scans over each pixel
and determines whether it needs to be set to 0 based on the Zhang-Suen
thinning rules. What I can't figure out is how to scan the images
without for loops. If I use for loops I can easily index the pixels
immediately surrounding image[i,j] by saying image[i-1,j] or image[i
+1,j-1], etc.

Does anyone know of a way to do this kind of indexing in an image
without the use of for loops?

-Nathan Goldbaum
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: indexing arrays with arrays
Next Topic: Re: Mac OS x IDL font handling

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:57:37 PDT 2025

Total time taken to generate the page: 0.00338 seconds