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

Home » Public Forums » archive » particle detection - a way to speed up things?
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: particle detection - a way to speed up things? [message #57071 is a reply to message #56944] Fri, 30 November 2007 06:02 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 30, 2:22 am, Ingo von Borstel <newsgro...@planetmaker.de>
wrote:
> Hi,
>
>> If I'm reading your program correctly, you have a big image consisting
>> (presumably) of
>> a lot of empty space and numerous particles that you have identified
>> in some way.
>
> Yes, correct. Black image with an arbitrary amount (<= 1000) of small
> blobs with a value different than zero; those blobs numbered using
> either label_region or watershed.
>
>> My guess is that the main reason your program is slow is that for each
>> particle you
>> are summing over the entire image.
>
> Probably. Half the time is consumed by the determination of the position
> for each particle in the overall image.
>
>> I can see two ways to speed things up:
>> 1) Create subsets of the image for each particle and only sum only
>> over the subset containing the particle.
>
> In order to calculate the absolute position of a particle, I need to
> know where on an image it resides. I think I'll loose this information
> with this approach.
>
>> 2) Use something like HISTOGRAM or a multi-dimensional historgam with
>> the REVERSE_INDICES keyword (or equivalent)
>> to get the indices associated with each particle and sum over those.
>> The histogram command would be applied to your
>> particle_image field with a binsize of 1 and starting at 0. See
>> http://www.dfanning.com/tips/histogram_tutorial.html
>> for ideas on how to approach this problem using histograms.
>
> The latter might have potential. I'll give it a try and report back then.
>
> Thanks a lot for your input.
>
> Cheers,
> Ingo
>
> --
> Ingo von Borstel <newsgro...@planetmaker.de>
> Public Key:http://www.planetmaker.de/ingo.asc
>
> If you need an urgent reply, replace newsgroups by vgap.

Have you looked at the LABEL_REGION example in the help?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: reshaping figure
Next Topic: How to modify my IDL library path?

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

Current Time: Fri Oct 10 04:50:42 PDT 2025

Total time taken to generate the page: 0.96422 seconds