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 #73600 is a reply to message #73589] Wed, 17 November 2010 12:05 Go to previous messageGo to previous message
guillermo.castilla.ca is currently offline  guillermo.castilla.ca
Messages: 27
Registered: September 2008
Junior Member
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
[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: Fri Oct 10 16:08:45 PDT 2025

Total time taken to generate the page: 0.56518 seconds