Ask Your Question

Revision history [back]

Problem with exact measurement of tracking balls

Hi, I'm new here and new in OpenCV, so i hope you're not gonna be too hard for me

In my project I want to check the collision tracks two balls on minibilard table gonna cross, assume that they are moving in a uniformly delayed rectilinear motion. So, first i tried detect one of them by HSV model, and it worked out, then I calculated time between frames, speed, acceleration and direction by comparing the last three frames, and based on this I wanted to calculate the expected time and position of the ball when it gonna stop. Unfortunately the results are not satisfactory, I can see that speed is decreasing, but latency is not constans, so the expected position of the ball is diffrent in every new frame, and for the vast majority is not close to the position sought. I know that maybe it's becouse poor quality of my webcamera, time between frames is about 78 msec and the sharpness of the image is not the best.

So, next I tried to use Canny filter, but the result was weak, I had a trouble with detect object, so I did not even try to calculate the final position of the ball. Now I'm thinking about tracking method like Horn-Shunck or Lukas-Kanade methods, but i don't know if final result gonna be better then detecting ball by HSV method.

I know my question is very broad. Are there any methods that will allow me to measure the latency and speed accurately, with the quality of a regular webcam? We are talking for example about 30pixel/msec speed.

I will be grateful for any help given Sorry for poor English Have a nice day :)