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

Home » Public Forums » archive » any suggestion about merging small regions
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
any suggestion about merging small regions [message #30571] Tue, 07 May 2002 22:25 Go to next message
Xiaoying Jin is currently offline  Xiaoying Jin
Messages: 20
Registered: May 2002
Junior Member
Hi, there,

After segmentation, I got a lot of regions contiguous with each other.

As Ted Cary descibed in the previous post,
"It is something like a grayscale photograph of a jar of
marbles. All the marbles are touching each other, so there is no
background. Two marbles of the same color may not belong to the same
region.
You want to give a unique label to each marble/region."

But now here is the problem: Even if the gray levels of the regions are
fairly uniform,
there are a lot of holes in a big region assigned to other different
regions. So if I try to
find edges between different regions, the output will get complicated.
To solve this problem, I want to merge regions with small area into the
adjacent regions.

Any suggestion about how to implement it in IDL?

Best regards,

Xiaoying Jin
Re: any suggestion about merging small regions [message #30687 is a reply to message #30571] Thu, 09 May 2002 20:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ted Cary (tedcary@yahoo.com) writes:

> Never mind. I was more right the first time.

These are unmistakable coyote tracks. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
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: any suggestion about merging small regions [message #30694 is a reply to message #30571] Thu, 09 May 2002 11:30 Go to previous message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
Never mind. I was more right the first time.
Re: any suggestion about merging small regions [message #30695 is a reply to message #30571] Thu, 09 May 2002 09:20 Go to previous message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
"Ted Cary" <tedcary@yahoo.com> wrote in message
news:abe81u$ggg$1@netnews.upenn.edu...

> MORPH_CLOSE did not work for this? Out of curiosity, did you apply it to
> your original image or to the bi-level region mask?

Sorry, I think I should have been recommending MORPH_OPEN instead of
MORPH_CLOSE. Hopefully, you figured it out.

Fanning, keep your coyote on a leash...

TC
Re: any suggestion about merging small regions [message #30696 is a reply to message #30571] Thu, 09 May 2002 08:29 Go to previous message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
"Xiaoying Jin" <xje4e@mizzou.edu> wrote in message
news:abacij$lgn$1@dipsy.missouri.edu...

>
> But now here is the problem: Even if the gray levels of the regions are
> fairly uniform,
> there are a lot of holes in a big region assigned to other different
> regions. So if I try to
> find edges between different regions, the output will get complicated.
> To solve this problem, I want to merge regions with small area into the
> adjacent regions.
>

MORPH_CLOSE did not work for this? Out of curiosity, did you apply it to
your original image or to the bi-level region mask?

You might try to SMOOTH the image, or you can reduce the colors in it. You
mentioned this is an unsigned integer image; that's a lot of gray levels, do
you need them all? If the regions are truly almost uniform in gray level,
reducing the number of grays might get rid of the noise.

TC
Re: any suggestion about merging small regions [message #30711 is a reply to message #30571] Wed, 08 May 2002 10:24 Go to previous message
Xiaoying Jin is currently offline  Xiaoying Jin
Messages: 20
Registered: May 2002
Junior Member
"Ted Cary" <tedcary@yahoo.com> wrote in message
news:abb87e$5uo$1@netnews.upenn.edu...
> How about MORPH_CLOSE?
>
> TC

I tried that, it helps, but not good enough. If I choose the small structure
element, there is still lots of small
regions left. If I choose the large structure element, it will merge some
near large regions together and
affects the shape of the regions.

Regards,

Xiaoying Jin
Re: any suggestion about merging small regions [message #30715 is a reply to message #30571] Wed, 08 May 2002 05:14 Go to previous message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
How about MORPH_CLOSE?

TC

"Xiaoying Jin" <xje4e@mizzou.edu> wrote in message
news:abacij$lgn$1@dipsy.missouri.edu...
> Hi, there,
>
> After segmentation, I got a lot of regions contiguous with each other.
>
> As Ted Cary descibed in the previous post,
> "It is something like a grayscale photograph of a jar of
> marbles. All the marbles are touching each other, so there is no
> background. Two marbles of the same color may not belong to the same
> region.
> You want to give a unique label to each marble/region."
>
> But now here is the problem: Even if the gray levels of the regions are
> fairly uniform,
> there are a lot of holes in a big region assigned to other different
> regions. So if I try to
> find edges between different regions, the output will get complicated.
> To solve this problem, I want to merge regions with small area into the
> adjacent regions.
>
> Any suggestion about how to implement it in IDL?
>
> Best regards,
>
> Xiaoying Jin
>
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: RSI Update on IDL for Mac OS X
Next Topic: multiple regression

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

Current Time: Wed Oct 08 14:56:12 PDT 2025

Total time taken to generate the page: 0.00619 seconds