Ask Your Question

ziutoslav's profile - activity

2017-08-25 04:50:09 -0600 received badge  Enthusiast
2017-08-21 03:49:23 -0600 commented answer What's the best method for tracking identical objects?

Thanks for your answer. Maybe you know any good example or tutorial for this method, because it looks very nice

2017-08-16 10:28:45 -0600 asked a question What's the best method for tracking identical objects?

Hi all, I'm sorry that my question is so wide, but I will try to explain in detail what is my problem.

So, I just wrote a program, that checks whether two balls of different colors are on the collision track. I use RGB->HSV transform, have one yellow ball, one blue, I check their position on different frames, I calculate their speed, direction etc and after that, I predict if they may collide. So, after that I thought color-based detection is not the best solution, and I want to detect more than 2 objects, So I thought I should use edge filter, or MOG2 algorithm, or something like that I still think about that, but that's not what I wanted to ask (but if anyone could suggest me something, that's gonna be great :) )

So when I will have a binary image with, for example, 2 object-two balls of the same size, and I'm gonna check their position, ok, so in the first frame one object is located has coordinates X1 and Y1 , second one X2 and Y2. Next I'm gonna analyze second frame, so there are gonna be still two the same objects, first has X3 and Y3 coordinates, and second one X4 and Y4, but how my program gonna now that the first object from 1 and 2 frame is the same object, if those 2 objects gonna have the same shape and size, the program will have a problem to correctly assign a new position to the same object because it can assign it to another object. In HSV it was quite easy because when the computer detected for example yellow object, it knew that its the same yellow object as in the previous frame (because it was only one yellow object). I know I described it a bit chaotic, but I hope you understand what I mean

It seems to me that the only thing that will allow the assignment of detected objects from the previous frame is a slight change of their position, but when I started thinking about it, it's not so easy because, for example, checking the distance between newly found objects and those from the previous frame and link them on the basis of the smallest distance may turn out to be in many cases faulty.

So I wonder if such a solution is possible at all and if there is any ready-made algorithm that will allow me to analyze the position in the previous steps of the object.

Thanks for your time and have a nice day :)

2017-07-29 10:18:02 -0600 asked a question 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 :)