Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a velocity measurement from *.avi recorded from IMAQ?

Hello,

I'm using the PCI-1411 to capture and record *.avi movies. My recording has a number of tiny particles moving around. I want to analyze the velocity and acceleration of the particles. Any advice on how I'll be able to do this using LabView?

Thank you!
0 Kudos
Message 1 of 5
(3,615 Views)
Classical Physics tells us that velocity is distance traveled over time (speed) and acceleration is the change in velocity over time.

Assuming that your particles are not moving in a vector that is toward or away from the camera (the Z-plane), and also assuming that the frame rate is constant, it should be fairly straight-forward. Each frame is a certain time from the previous frame, so you can easily find the time. If you can locate a particular particle in successive frames, you can take the change in position (distance traveled) divided by the delta T from frame to frame. This should give velocity.

Acceleration is the change in velocity. The easy way to calculate that with this type of setup is to just take successive delta Vs and divide the time.

Now, if either of my assumptions is wrong, it becomes much harder. If there is travel in the Z-plane it becomes very difficult to figure out. Also if the frame rate is not a constant, you will have to find some way to calculate the change in time.

And if you cannot differentiate your particles, I have no idea how it would work.

I hope that this helps,
Bob
0 Kudos
Message 2 of 5
(3,610 Views)
Hello Bob,

Thanks for the reply. 🙂

In fact both cases occur in my experiment. In the first experimental condition, the particles have erratic movement, including traveling in z-direction. In the second experimental condition, the particles are rather stable, with neglectable z-direction traveling. However, I'm more interest in the second case. I believe the theory part is quite straight forward. The difficulty that I'm having now is to try to automate the whole object recognition, tracking and analysis process. There are around 10-50 particles on the screen. And, I would have to repeat the experiment using different experimental parameters. Thus, there would be at least 50-100 *.avi that I need to analyze.

I do aware that there are numbers of commercial software which can do this. Since I'm having LabView and IMAQ, I'm thinking of giving it a try first. Do let me know if you come across any NI example which can solve this problem. Thank you!

C.H.
0 Kudos
Message 3 of 5
(3,604 Views)
Hi C.H.,

Assuming a couple of things, you can definitely automate the analysis of each object's velocity. Probably most important is that you are able to identify each object. If you have an image with 50 objects that are identical, there is no way to identify that any one particular object is the same as another seen in a previous image. On the other hand, if you can identify each object, your code can measure the distance between the object's location in one image as compared to another.

Another possibility is that it is assumed that the object cannot move more than a specified amount. Assuming two objects' path do not cross, you might identify each object in the following frame by assuming that its location has only changed by a particular amount.

Good luck on your application, let me know if I can be of any other help!

Robert Manion
Applications Engineering
National Instruments
0 Kudos
Message 4 of 5
(3,595 Views)
Hello Robert,

I think that is a brilliant idea. I think I should be able to write a simple algorithm to identify the track assuming that the particles new location only change a small value from previous location.

Cheers..
C.H.
0 Kudos
Message 5 of 5
(3,586 Views)