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

Home » Public Forums » archive » Re: Problems with ERODE and DILATE functions
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: Problems with ERODE and DILATE functions [message #73589] Thu, 18 November 2010 00:55 Go to previous message
Oriol Güell Riera is currently offline  Oriol Güell Riera
Messages: 7
Registered: September 2010
Junior Member
On 17 nov, 21:05, Guillermo <guillermo.castilla.castell...@gmail.com>
wrote:
> Hola Oriol,
>
> I haven't read thoroughly your post or your code, but since you say
> that "erode" and "dilate" modify separate your ellipses sometimes, it
> may be the case that then you have too many individual regions and
> your code gets too slow. Instead of using WHERE and SEARCH_2D, you can
> use LABEL_REGION and HISTOGRAM to locate individual regions in a much
> more efficient way:
>
> hst= histogram(label_region(slice, min=1, omax=nreg, rev=r)
> for j=0L, nreg-1 do begin
>   region= r[r[j]:r[j+1]-1]
>   ...
>   numpts= hst[j]
>   ...
> endfor
>
> Also, instead of dilate and erode, you could simply use the MEDIAN
> function to remove small regions or holes within small regions
>
> Bona sort!
>
> Guillermo

Hola Guillermo

Thank you very much for your suggestions!
I have thought in another way to approach the problem, and it seems
that it works fine, fingers crossed!

Moltes gràcies per l'ajuda!

Oriol
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLPong, a Pong game in IDL.
Next Topic: Extracting info from the ASCII file with IDL

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

Current Time: Wed Oct 08 17:23:18 PDT 2025

Total time taken to generate the page: 0.00432 seconds