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

Home » Public Forums » archive » Re: Segmentation in ENVI
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: Segmentation in ENVI [message #62429 is a reply to message #62428] Wed, 10 September 2008 11:51 Go to previous messageGo to previous message
Mort Canty is currently offline  Mort Canty
Messages: 134
Registered: March 2003
Senior Member
guillermo.castilla.castellano@gmail.com schrieb:
> Mort,
>
> This involves several calls to Label_Region, but perhaps is easier
> than Pal's suggestion (and will work also for a 8-neighborhood, by
> including the /all kw in the call):
>
> lmig = LABEL_REGION(climg EQ cl[0],/ULONG)
> FOR i = 1, n - 1 DO BEGIN
> mxlb = MAX(limg)
> climgi = climg EQ cl[i]
> limg = TEMPORARY(limg) + (LABEL_REGION(climgi, /ULONG) +
> climgi*maxlb)
> ENDFOR
>
> Where climg is your classified image and cl is an array of n elements
> containing the (numeric) labels of your classes. You might need to
> zero the frame of your image before doing this.
>
> Cheers
>
> Guillermo
>

Thanks, Guillermo. This is very elegant, and it's easier as you say.
Using Tal's method with /all_neighbors I was separating each class plane
in the 3D cube with an empty plane to keep the blobbing from jumping
across class boundaries. Any idea why the ENVI built-in doesn't work?

Mort
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL is not accurate enough!
Next Topic: Undefined variables in structures

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

Current Time: Sun Oct 12 12:05:47 PDT 2025

Total time taken to generate the page: 1.51728 seconds