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

Home » Public Forums » archive » polygon filling - binary image
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
polygon filling - binary image [message #39809] Wed, 23 June 2004 08:54 Go to next message
Francois is currently offline  Francois
Messages: 8
Registered: May 2004
Junior Member
Hello,

I have a binary image with lines (255) and background (0).
I would like to fill areas closed by lines with a unique ID.
Hence obtaining an image with grey levels going from 1 to
number_of_polygons.

Do you have any hints about how to do this ?

Thank you,

Fran�ois L.
Re: polygon filling - binary image [message #39906 is a reply to message #39809] Fri, 25 June 2004 08:39 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Francois wrote:

> Hello,
>
> I have a binary image with lines (255) and background (0).
> I would like to fill areas closed by lines with a unique ID.
> Hence obtaining an image with grey levels going from 1 to
> number_of_polygons.
>
> Do you have any hints about how to do this ?
>
> Thank you,
>
> Franᅵois L.

Dear Franᅵois

is it something like this what you are looking for?

img=dist(20)
contour,img,/fill,level=findgen(20)

Or is it more like the path_xy example described in the online help by
contour?


cheers
Reimar


--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: polygon filling - binary image [message #39910 is a reply to message #39809] Sat, 26 June 2004 11:35 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
result = label_region(bytscl(-image))

-Paul Sorenson
www.paulsorenson.com

"Francois" <leduc_francois@hotmail.com> wrote in message
news:1088006119.566831@news.drenet.dnd.ca...
> Hello,
>
> I have a binary image with lines (255) and background (0).
> I would like to fill areas closed by lines with a unique ID.
> Hence obtaining an image with grey levels going from 1 to
> number_of_polygons.
>
> Do you have any hints about how to do this ?
>
> Thank you,
>
> Fran�ois L.
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to crate an mask image from ROI?
Next Topic: Q: !p.multi - changing the plotting order

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

Current Time: Wed Oct 08 13:38:49 PDT 2025

Total time taken to generate the page: 0.00389 seconds