Ask Your Question

vahidbas's profile - activity

2015-09-19 00:06:34 -0500 answered a question Right method for color object tracking

you can use color detection + Kalman filter

  • transform the video frames into HSV color space using cvtColor
  • find a lower and upper bound of HSV values of the color of your balls
  • use inRange to detect the ball, this gives you a binary image where the ones are the pixels of the ball
  • then you may calculate the average of positions of ball pixels to find the center position of ball

you can then feed the position of ball into Kalman filter tracker.