LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tracking a particle and plotting a histogram of it's position.

So, I'm working on a research project in my undergraduate physics studies where I want to track the motion of a droplet of oil as it moves around in container. Basically, what I have is a camera pointed down over the container and I've got a setup that allows me to take the image of the container and subtract it from the image of the container and the particle so I'm only seeing the particle. What I want to do is track the motion of that particle from that incoming video and make a 2D (x and y) position histogram that would show the position distribution of the particle in the container. Can anyone either point me toward a thread that discusses something like this or send me some advice on how to set up a VI to do this? 

 

I'm currently trying to learn LabVIEW and am still spectacularly inexperienced with the program so if there's any advice to throw my way I'd appreciate a novice-level explaination, please. 

 

Any help at all would be wonderful, thanks in advance! 

 

 

0 Kudos
Message 1 of 3
(2,777 Views)

There are some histogram VI's in Mathematics.  Altenbach also points out in this thread that the Waveform Chart can be set to a bar plot and passed data already formatted as a histogram - http://forums.ni.com/t5/LabVIEW/Can-labview-display-a-histogram-plot-of-data/td-p/971038

 

 

Also,


I'm currently trying to learn LabVIEW and am still spectacularly inexperienced with the program language so if there's any advice to throw my way I'd appreciate a novice-level explaination, please. 


Smiley Happy



0 Kudos
Message 2 of 3
(2,773 Views)

The word "histogram" implies that you have a finite set of bins and the value of each in is a count (how iften the particla was found in that area.

 

All you need is a 2D array of sufficient size and increment the relevant element whenever the particle is found in that location. You would keep the 2D array in a shift register and increment the current location using the "in place element" structure (array mode). (simple example)

 

How fast is the movement compared to the frame rate? If the particle is fast, you might need to do interpolation to get all locations. You might even want to do some antaliasing (i.e. propotionally fill a 2x2 array subset according to the fractional location) to get a smoother histogram.

 

Another option would be to simply average all filtered (i.e. only showing the particle) frames over all frames.

0 Kudos
Message 3 of 3
(2,750 Views)