Sunday, 20 November 2011

Ball Detection

There were 2 possible ways of detecting the balls:

  1. Using the Hough Transform and 
  2. By searching for white pixels in own algorithm
The Hough method didn't work so option 2 is being used.  With correct filtering, the canny image will leave a circle for each ball.  As it is a circle, the radius should be constant..


A vertical search is run for a white pixel then it continues searching for the next white pixel, it calculates the distance between them and this gives the diameter.  


The search then moves to the centre of these two white pixels and searches left and right.  If these measurements are the same as the vertical diameter, then the centre point is established.

No comments:

Post a Comment