0

A quick question, I'm using the Circle Hough Transform to detect balls in an image. Since the algorithm is computationally expensive, I've been wondering if it is possible to calculate the radius of the ball in pixels using camera calibration data. I've read the following question (see below) and figured that if I can find the distance between the camera and the ball, I could calculate the radius somehow, is this possible?

Finding distance from camera to object of known size

Many thanks!

Community
  • 1
  • 1
Adam
  • 610
  • 1
  • 7
  • 21
  • When you have a contour of a circle, you can simply detect its parameters. For example, calculate its gravcenter, then by some iterations calculate its radius and correct center. Or make some approximations. Hough in this case is a very bad algorithm. – Eddy_Em Aug 15 '13 at 21:00
  • How do you find the contour of the circle from an edge image such as this: http://stackoverflow.com/questions/18194870/canny-edge-image-noise-removal – Adam Aug 15 '13 at 21:08
  • Substitute background. – Eddy_Em Aug 16 '13 at 04:34
  • I'm not sure this method is as robust as the Circle Hough Transform, especially in the presence of partial occlusions. – Adam Aug 16 '13 at 07:31
  • Any method would be more robust than Circle Hough! – Eddy_Em Aug 16 '13 at 08:55
  • Ok, so help me out here, if I was to use an iterative technique, how would I eliminate the outliers, for example in edge image in the link above? – Adam Aug 16 '13 at 08:58
  • In simplest case you should just substitute background from that image and find outern closed contour. – Eddy_Em Aug 16 '13 at 09:28
  • The trouble is, is that the ball is not a closed contour, but consists of broken edges, especially if the ball is occluded. – Adam Aug 16 '13 at 09:31
  • That's your work. I don't compel you not to use Hough. But with Hough be ready for very slow speed and need of large memory volumes. – Eddy_Em Aug 16 '13 at 09:39
  • This is true, however I use CUDA and the GPU to get around these issues. Whichever method I use, I'd like to remove some of the obvious outliers, do you know of any techniques that I can use to achieve this? – Adam Aug 16 '13 at 09:44
  • I've told you: first you need substract background! In case of imossibility of that step, compute difficulty very increases. – Eddy_Em Aug 16 '13 at 09:48
  • Yes thats fine, but what if someones hand is on the ball moving it about. The hand is part of the foreground yet is still classed as part of the outliers? – Adam Aug 16 '13 at 09:52

0 Answers0