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

Home » Public Forums » archive » Re: Active Contours and Snakes! Oh, my!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Active Contours and Snakes! Oh, my! [message #37169] Thu, 04 December 2003 07:03 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Haje Korth writes:

> I tested your program and found the subject interesting, too. Presently I
> have no use for the algorithm, but it is always good to know what is out
> there already. Just out of curiosity, which part is crippled. I had some
> trouble snaking the contours directly along the edges. Is that because the
> code is crippled, or did I not play enough with the settings?

Nothing in the snaking algorithm is crippled. I just don't
allow you to pass images to the object directly (you have
to read images from a file) and I don't allow you to
specify the scale factors that would allow you to
report contour perimeter and area in physical values.
These are reported strictly in pixel values in the
demo. Pretty lame crippling (if you enjoy puns).

I'm not sure what you mean by "directly along the
edges". In the application I was working with
originally (the motivation for building an active
contour capability), we first "clipped" the image
with a rectangular mask. This resulted in some
extremely straight edges, which I thought would
be perfect for the algorithm. Not so. The snake
almost always undulates in these areas instead
of converging on a straight line. These kinds
of undulations can be dampened, to some extent,
by increasing either the viscosity (the difficulty
the snake has moving through the medium), or the
elasticity (making it hard to "stretch" the snake).

There is no question you have to play with the
parameters. In fact, that is why the darn application
got so elaborate. You need an infrastructure that allows
you to interact with the algorithm or you are never
going to get it right. I really didn't understand what
I was doing (the bulk of those 100+ hours) until
I had a GUI to play with it.

With some of the snaking algorithms I played with, if
you didn't get the snake parameters just right, the snake
would zip itself up and disappear! Disconcerting after
all those hours making it a pet. :-)

The GVF algorithm was the best of the ones I used
in producing reliable results...well... let me
say *understandable* results most of the time.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Active Contours and Snakes! Oh, my! [message #37170 is a reply to message #37169] Thu, 04 December 2003 06:18 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
David,
I tested your program and found the subject interesting, too. Presently I
have no use for the algorithm, but it is always good to know what is out
there already. Just out of curiosity, which part is crippled. I had some
trouble snaking the contours directly along the edges. Is that because the
code is crippled, or did I not play enough with the settings?

Haje


"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1a3823ad58552bef989766@news.frii.com...
> Folks,
>
> I have spent the past 2+ weeks (please don't tell my wife!)
> obsessing about active contours (sometimes known as snakes).
> I've done some research and the best active contouring
> algorithm I could find was a Gradient Vector Flow (GVF) method
> by Chenyang Xu and Jerry Prince. This is the one I have
> chosen to implement in my ActiveContour program.
>
> The program itself represents some 100+ hours of work,
> so I'm not giving it away. :-)
>
> But I have made available a slightly crippled version
> in the form of an IDL 6.0 save file. This version is
> sufficient for you to explore what active contouring
> can do for you (you can use your own images, if you
> like), but is crippled enough (I hope) that it won't
> be terribly useful to you. ;-)
>
> (I'll be honest with you, I put about 5 minutes
> thought into how to cripple the darn thing. Even
> I could probably break into it in about half that
> time, but you know what I mean. If you like it,
> it is worth something, probably, to both of us.
> This is, uh, how I make a living, such as it is.)
>
> If you don't have IDL 6.0 you can download the
> free IDL Virtual Machine to run the program.
> Instructions are in the article.
>
> I found this whole subject extremely interesting and
> oddly compelling. This is the first time I've had a
> real tool for playing around with snakes. It seems
> like magic. Really!
>
> Enjoy!
>
> http://www.dfanning.com/ip_tips/snakes.html
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
Re: Active Contours and Snakes! Oh, my! [message #37173 is a reply to message #37170] Wed, 03 December 2003 15:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> The program itself represents some 100+ hours of work,
> so I'm not giving it away. :-)

Whoops! Sorry. I forgot to mention that despite the
number of hours I spent programming this, it is NOT
an iTool. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Active Contours and Snakes! Oh, my! [message #37268 is a reply to message #37169] Thu, 04 December 2003 07:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> The GVF algorithm was the best of the ones I used
> in producing reliable results...well... let me
> say *understandable* results most of the time.

I should mention, too, that preparing the image
prior to snaking can be extremely important. Sometimes
it is enough to play with the image contrast to get
good separation between the region you are contouring
and its background. Sometimes a median smooth really,
really helps.

Think of it as art, more than science. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Cleaning up inherited object classes
Next Topic: Re: dwg file in IDL

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

Current Time: Wed Oct 08 11:42:41 PDT 2025

Total time taken to generate the page: 0.00544 seconds