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

Home » Public Forums » archive » Re: checking for connectedness of a given set of pixels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: checking for connectedness of a given set of pixels [message #74182 is a reply to message #73514] Mon, 03 January 2011 13:50 Go to previous message
guillermo.castilla.ca is currently offline  guillermo.castilla.ca
Messages: 27
Registered: September 2008
Junior Member
On Nov 14 2010, 5:56 pm, Guillermo
<guillermo.castilla.castell...@gmail.com> wrote:

> ...REGI0N_GROW that may be faster than
> LABEL_REGION for this purpose when the minimum bounding box for the
> input set of pixels is large. I have modified your function to include
> the former as an alternative method (below). I'll do some tests and
> report back (hopefully within this year :).

Just for the record, today I made a test with a 50 megapixel labeled
image derived from the rasterization of a polygon vector layer
containing 185 elongated features (rivers), of which 65 ended up
consisting of disconnected groups of pixels. Checking for
connectedness of the pixels within each feature took almost 3 times
more using the REGI0N_GROW method than using LABEL_REGION (the latter
taking in average 30 millisecs per feature). I quickly looked into the
REGI0N_GROW code and noticed that it is based on LABEL_REGION itself,
so no wonder. Repeated the test with SEARCH2D instead of REGI0N_GROW
and although it was two times faster than the latter, it was still
slower than LABEL_REGION. So it looks like LABEL_REGION, even if it
does a lot of unnecessary extra work for this task, is the method of
choice for checking for connectedness of a set of pixels.

Happy new year!

Guillermo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Random NetCDF I/O error
Next Topic: Re: Random NetCDF I/O error

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

Current Time: Wed Oct 08 19:33:56 PDT 2025

Total time taken to generate the page: 0.00378 seconds