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

Home » Public Forums » archive » Re: Label Region trouble
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: Label Region trouble [message #38000 is a reply to message #37996] Wed, 11 February 2004 06:28 Go to previous messageGo to previous message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Thanks for the solution, Ben. Well, it's little bit embarrassing to me. I've
read the description of the Label_Region function, but obviously not that
careful.



I'm not sure if I understood your suggestion of using histogram function. I
read the description of the function and perhaps I still don't get it.



If I make

hist = HISTOGRAM(data, REVERSE_INDICES=R)



To get de indices for first region defined by label region (the indices that
are equal to 1) I should do... (according to the reference guide.)



i = 1

blob = data( R[ R(i):R(i+1)-1 ] )

Is that it? If I haven't made any mistake I'm trying this and I get nothing
back (or I get strange array with two indices when should have much more)



Cheers,



Nuno.




"Ben Tupper" <btupper@bigelow.org> wrote in message
news:c0b9sg$15875l$1@ID-189398.news.uni-berlin.de...
>
> Hello,
>
> Yes, it is a bit aggravating. The Label_Region function treats the
> boundary of the image as background. Here's the blurb on the input
> argument from the documentation....
>
> " A n-dimensional image to be labeled. Data is converted to integer type
> if necessary. Pixels at the edges of Data are considered to be zero."
>
> If you have a lot of blobs within an image, you might prefer to use the
> HISTOGRAM function with REVERSE_INDICES to navigate around the blobs.
> It will save repeated calls to WHERE which has to search the entire array.
>
> Ben
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: modify widget base colour
Next Topic: Re: Doing Nothing Takes Longer Than Doing... Nothing?

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

Current Time: Sat Oct 11 11:43:28 PDT 2025

Total time taken to generate the page: 0.24068 seconds