04-11-2019 04:17 AM
I am need a help into find the velocity of the moving particle.
Working project goal is to find the moving particle velocity using two images.
steps
I am taking two images one after one
do image processing
do subtractions of two images first image- second image.
moving particle I can see in final image also drawing bounding box on to that
but I do not know how can I measure how much the particle is moved ? after last step
camera is capturing the images at frame rate 30fps
So I need to know how to find the distance traveled by particle.
I have vision development kit in LabVIEW.
Image shows the distance traveled by particle
two captured image
let me know if anyone have idea to solve my problem.
let me know if any one need VI for more information.
Solved! Go to Solution.
04-11-2019 05:02 AM
If I understand correctly the binary Image shows the distance you particle moved in red. If that is correct you can measure the thickness of your red object using some clamp tool that should be included in the Vision Toolkit. ( I can't tell how it's called because I don't have it). From this function you get the distance in pixels. So you will need some calibration information on what distance one pixel represents and the time that passed between your two images.
Regards
04-11-2019 05:16 AM
If you have the coordinates of the particle (center of the BBox), and the new coordinates of the particle wouldn't subtracting them give you the distance? That is, the distance in pixels.
From pixels to actual distance could be difficult. Ideally, this is just a linear scaling that needs to be calibrated or calculated. But it could be more difficult if you want to correct for perspective distortion. That could be fixed by calibrating your image for perspective correction...
04-11-2019 06:57 AM
@wiebe@CARYA
yes that I have already tried but still I am not getting convincing result, so thought to ask the question in Ni forum.
I have one more question
if my camera is taking images at the speed of 30fps
then while finding the velocity what number I have to write in down side in column of time
Velocity = displacement( micrometer travel distance) \ time(30)?
04-11-2019 07:01 AM
@crabman
Thank you very much for the idea.
Yes you are right I can use clamp function in vision toolkit.
I have tried clamp function it is useless for me while it is not showing promising results, so I use center of mass of X for both particles from two images and do subtraction.
Thank you very much you time and idea
04-11-2019 07:11 AM - edited 04-11-2019 07:12 AM
30 FPS means 1/30 sec. between two frames.
So (I'd think):
Velocity [um/s] = displacement [um] * 30 [1/s]
And the distance should be the Euclidian distance, so sqrt (X*X + Y*Y)
04-12-2019 03:33 AM
As I need to find the velocity of particle which are moving in only in one direction so I am just using the center of mass X of both particles in two images and subtracting values.
X1 - X2 = Delta X (moving distance) in pixel
Convert it into (um) micrometer
find the velocity .
04-12-2019 03:47 AM
To find the distance between two points
Euclidian formula is
dist((x1, y1), (x2, y2)) = √(x1 - x2)² + (y1 - y2)²
Just correcting
Please don't mine.
Thank you
Have a nice day
04-12-2019 04:03 AM
@mi wrote:
dist((x1, y1), (x2, y2)) = √(x1 - x2)² + (y1 - y2)²
Just correcting
Yes, sqrt (X*X + Y*Y), where X and Y are the deltas. I've could indeed have been clearer.