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

Home » Public Forums » archive » Re: Image segmentation programs in IDL?
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: Image segmentation programs in IDL? [message #51877] Thu, 14 December 2006 08:37 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tim writes:

> I sent you a message yesterday using "reply to author". Did you get
> that?

Humm. No. Try DAVID at DFANNING dot COM.

Thanks,

David

P.S. Spam has gotten a little out of hand around here, even with
very good filters, but I was looking for something.
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image segmentation programs in IDL? [message #51878 is a reply to message #51877] Thu, 14 December 2006 08:08 Go to previous messageGo to next message
Tim[2] is currently offline  Tim[2]
Messages: 3
Registered: December 2006
Junior Member
David,

I sent you a message yesterday using "reply to author". Did you get
that?

Tim

On Dec 14, 10:06 am, David Fanning <n...@dfanning.com> wrote:
> Tim writes:
>> I think my IDL skills are up to the challenge of calculating the
>> moments, once I learn to identify which black grid points are in which
>> object.I've used FIT_ELLIPSE and FIND_BOUNDARY (found on my
> web page) to do a similar analysis of "blobs" in the
> past. They might give you some ideas.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image segmentation programs in IDL? [message #51879 is a reply to message #51878] Thu, 14 December 2006 07:06 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tim writes:

> I think my IDL skills are up to the challenge of calculating the
> moments, once I learn to identify which black grid points are in which
> object.

I've used FIT_ELLIPSE and FIND_BOUNDARY (found on my
web page) to do a similar analysis of "blobs" in the
past. They might give you some ideas.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image segmentation programs in IDL? [message #51880 is a reply to message #51879] Thu, 14 December 2006 06:54 Go to previous messageGo to next message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Tim wrote:
> Thanks to everyone for their interest.
>
> 3) So my purpose now is to get a list of grid points in each black
> region. Then I will calculate, for example, the moment of inertia of
> each object about its center of mass (to use the physics terms) then
> subtract the moment of inertia of a circle of the same area, then
> divide by the moment of inertia of the circle of the same area.
> Finally, I will average this quantity over all the objects in the
> image. That should give me a number which quantifies the
> "non-circularity" of the objects in the image.

Be careful that you want your quantity of "non-circularity",
however you are defining it, not to depend on rotations of
the system (that is, on the axis with respect to which you
compute the momenta). There is a way of expressing the inertial
momenta in a frame-independent form, but this will give you
two numbers...

Ciao,
Paolo
Re: Image segmentation programs in IDL? [message #51882 is a reply to message #51880] Thu, 14 December 2006 06:41 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tim writes:

> I think my IDL skills are up to the challenge of calculating the
> moments, once I learn to identify which black grid points are in which
> object.

LABEL_REGION is definitely the place to start. Be aware,
though, that it has problems on the boundary. Normally,
the image is embedded in a blank image so that there
is a blank boundary of one pixel along all edges.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Image segmentation programs in IDL? [message #51883 is a reply to message #51882] Thu, 14 December 2006 06:13 Go to previous messageGo to next message
Tim[2] is currently offline  Tim[2]
Messages: 3
Registered: December 2006
Junior Member
Thanks to everyone for their interest.

1) As mentioned, I do not have any experience in identifying objects in
images, so I may be using the terminology incorrectly. By "image
segmentation" what I meant was that I wanted to know, for each black
region in the image, a list of the grid points in that region. (I
didn't mention in my original posting that since I have hundreds of
these images to analyze I wanted a completely automatic algorithm,
unlike some algorithms I have seen described that require user
interaction.)

2) My goal is to come up with a single number that characterizes the
image. For example, a number that is zero for the images composed all
circles, but which gets bigger as the objects depart from circularity.
I have tried some quantities such as the total perimeter to total area
ratio which are global in the sense that they don't require me to know
which grid points are in which object. These numbers show some
systematic variation, but the variations are small and vary with the
average size of the objects, that is, they are not clean measures of
object "circularity". To improve them, I would at least have to know
how many separate objects were in the image.

3) So my purpose now is to get a list of grid points in each black
region. Then I will calculate, for example, the moment of inertia of
each object about its center of mass (to use the physics terms) then
subtract the moment of inertia of a circle of the same area, then
divide by the moment of inertia of the circle of the same area.
Finally, I will average this quantity over all the objects in the
image. That should give me a number which quantifies the
"non-circularity" of the objects in the image.

I think my IDL skills are up to the challenge of calculating the
moments, once I learn to identify which black grid points are in which
object.

Again, thank you all for your time and help.

Tim

On Dec 14, 3:09 am, hel...@gmx.net wrote:
> I think your images are already segmented. There is one value for the
> objects and there is a distinct value for the background. Do you want a
> morphological characterization of the objects, such as how irregular or
> rough the objects are? The seed images are very irregular evolving to
> target images, that are more regular.
> Regards,
> Helmut
>
> Tim wrote:
>> I am looking for image segmentation routines that are available in or
>> written in IDL. I think my images are not very challenging. They have
>> been thresholded, so that the regions I want to segment all have values
>> of -1, and the background is +1. The boundaries are smooth. Examples of
>> the images can be found about a third of the way down the page at
>> http://physics.kenyon.edu/people/sullivan/Research/CahnHilli ard/.
>
>> I am aware of the particle tracking algoriths of Crocker, Weeks, and
>> Spalding, et al., but their problem is identifying same size circular
>> images and my objects vary in widely size and shape.
>
>> There is one complication that I can live without at first, but would
>> eventually need to rectify. My fields are have periodic boundary
>> conditions, so eventually I would like an algorithm that identified as
>> one object, an object that wraps around the top and bottom and left and
>> right sides of the image.
>
>> If I knew anything about image segmentation, I suspect this would be
>> easy. But I don't. Any help would be appreciated.
>
>> Tim Sullivan
>> sulli...@kenyon.edu
Re: Image segmentation programs in IDL? [message #51886 is a reply to message #51883] Thu, 14 December 2006 00:09 Go to previous messageGo to next message
helaha is currently offline  helaha
Messages: 26
Registered: March 2004
Junior Member
I think your images are already segmented. There is one value for the
objects and there is a distinct value for the background. Do you want a
morphological characterization of the objects, such as how irregular or
rough the objects are? The seed images are very irregular evolving to
target images, that are more regular.
Regards,
Helmut

Tim wrote:
> I am looking for image segmentation routines that are available in or
> written in IDL. I think my images are not very challenging. They have
> been thresholded, so that the regions I want to segment all have values
> of -1, and the background is +1. The boundaries are smooth. Examples of
> the images can be found about a third of the way down the page at
> http://physics.kenyon.edu/people/sullivan/Research/CahnHilli ard/ .
>
> I am aware of the particle tracking algoriths of Crocker, Weeks, and
> Spalding, et al., but their problem is identifying same size circular
> images and my objects vary in widely size and shape.
>
> There is one complication that I can live without at first, but would
> eventually need to rectify. My fields are have periodic boundary
> conditions, so eventually I would like an algorithm that identified as
> one object, an object that wraps around the top and bottom and left and
> right sides of the image.
>
> If I knew anything about image segmentation, I suspect this would be
> easy. But I don't. Any help would be appreciated.
>
> Tim Sullivan
> sullivan@kenyon.edu
Re: Image segmentation programs in IDL? [message #51887 is a reply to message #51886] Wed, 13 December 2006 23:46 Go to previous messageGo to next message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Hi, you are showing interesting images. Still I don't understand what you
would like to do.
Do you mean with "Segmentation" that connected objects are labeled and
characterized? Or would you like to quantify the simulation results in
general? Or ... there are infinite possibilities.

I would recommend:
1. Global analysis:
Area
A(time,minority fraction) = total(Simulationresult(time, minority
fraction) ge 0.)
Surface estimate
S(time,minority fraction) = A(time,minority fraction) - $
total(erode(Simulationresult(time,
minority fraction) ge 0.,[[0,1,0],[1,1,1],[0,1,0]]))

2. Object analysis: for each labeled object i
L = label_region(Simulationresult(time, minority fraction) ge 0.)
E = erode(Simulationresult(time, minority fraction) ge
0.,[[0,1,0],[1,1,1],[0,1,0]])
Area
A(i,time,minority fraction) = total(L eq i)
Surface estimate
S(i,time,minority fraction) = A(i,time,minority fraction) - $
total(E * (L eq i))
and so on
3. Object count with wrap around is a bit cumbersome with the label_region
behavior in mind. For that I think a merging routine for border touching
objects have to be written.

Regards
Karsten

Am Wed, 13 Dec 2006 15:39:09 +0100 schrieb Tim <anonymouse@anonymouse.net>:

> I am looking for image segmentation routines that are available in or
> written in IDL. I think my images are not very challenging. They have
> been thresholded, so that the regions I want to segment all have values
> of -1, and the background is +1. The boundaries are smooth. Examples of
> the images can be found about a third of the way down the page at
> http://physics.kenyon.edu/people/sullivan/Research/CahnHilli ard/ .
>
> I am aware of the particle tracking algoriths of Crocker, Weeks, and
> Spalding, et al., but their problem is identifying same size circular
> images and my objects vary in widely size and shape.
>
> There is one complication that I can live without at first, but would
> eventually need to rectify. My fields are have periodic boundary
> conditions, so eventually I would like an algorithm that identified as
> one object, an object that wraps around the top and bottom and left and
> right sides of the image.
>
> If I knew anything about image segmentation, I suspect this would be
> easy. But I don't. Any help would be appreciated.
>
> Tim Sullivan
> sullivan@kenyon.edu



--
Erstellt mit Operas revolutionᅵrem E-Mail-Modul: http://www.opera.com/m2/
Re: Image segmentation programs in IDL? [message #51888 is a reply to message #51887] Wed, 13 December 2006 18:46 Go to previous messageGo to next message
peter.eddy@shaw.ca is currently offline  peter.eddy@shaw.ca
Messages: 19
Registered: March 2005
Junior Member
David,
I would be interested in your article. I have been working with
different segmentation methods through my grad studies and am always
looking for good reference materials.

Pete
Re: Image segmentation programs in IDL? [message #51893 is a reply to message #51888] Wed, 13 December 2006 11:52 Go to previous messageGo to next message
peter.eddy@shaw.ca is currently offline  peter.eddy@shaw.ca
Messages: 19
Registered: March 2005
Junior Member
Tim,
To start you off you may want to look at the Label_Region function
which (from IDL help):

" consecutively labels all of the regions, or blobs, of a bi-level
image with a unique region index. This process is sometimes called
'blob coloring'."

Pete
Re: Image segmentation programs in IDL? [message #51896 is a reply to message #51893] Wed, 13 December 2006 07:07 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tim writes:

> I am looking for image segmentation routines that are available in or
> written in IDL. I think my images are not very challenging. They have
> been thresholded, so that the regions I want to segment all have values
> of -1, and the background is +1. The boundaries are smooth. Examples of
> the images can be found about a third of the way down the page at
> http://physics.kenyon.edu/people/sullivan/Research/CahnHilli ard/ .
>
> [...]
>
> If I knew anything about image segmentation, I suspect this would be
> easy. But I don't. Any help would be appreciated.

Oddly enough, Karsten Rodenacker was just here for the IEPA
Conference of Mathematical Morphologists and we spent a pleasant
weekend walking in the mountains and talking about this very
thing for a chapter of a book I am writing. As a result, I'm
gung ho to start writing some programs to do just this thing.
If you would like to send me some images, I would be happy
to play around with this a little bit.

I can't guarantee exactly when you will see results (the
holidays seem to slow things down, although I have spent free
Christmas afternoons in the past working on IDL programs,
much to the disgust of my family). But you catch me at
a reasonably good time to work on something like this, if
you are interested.

Cheers,

David

P.S. I think this particular problem would be fairly easy,
looking at the images. But perhaps the article that results
would at least give you some notion of how to approach a
problem like this in the future.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Mapping Etopo2 in IDL? [message #51963 is a reply to message #51879] Mon, 18 December 2006 23:54 Go to previous message
skyflow2008 is currently offline  skyflow2008
Messages: 1
Registered: December 2006
Junior Member
Dear Fanning:
Now there is a problem puzzled me. I want to map etopo2 data in
IDL. I know to use color table we can get a false color picture. But I
want to realize hillshade texture and color simutaneously to display in
my map like global mapper. I don't know hwo to realize. Please help me!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 64-bit without IDL_IDLBridge vs. 32-bit with IDL_IDLBridge
Next Topic: Re: 64-bit without IDL_IDLBridge vs. 32-bit with IDL_IDLBridge

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

Current Time: Wed Oct 08 15:48:50 PDT 2025

Total time taken to generate the page: 0.02096 seconds