title: What are the correct usage/parameter values for HoughCircles in OpenCV for Iris detection?
body: <p>I've been reading about the subject but cannot get the idea in "plain English" about the usage and parameters for <code>HoughCircles</code> (specially the ones after <code>CV_HOUGH_GRADIENT</code>).</p>
  
  <p>What's an accumulator threshold? Are 100 "votes" a right value?</p>
  
  <p>I could find and "mask" the pupil, and worked my way through the <code>Canny</code> function, but I'm struggling beyond that and my problem is the <code>HoughCircles</code> function. There seems to be failing at finding the Iris' circle and I don't know why.</p>
  
  <p><img src="https://i.stack.imgur.com/EMQxw.png" alt="This is what I have so far. LEFT: masked pupil RIGHT: canny result"></p>
  
  <p>And this is the function I'm working on:</p>
  
  <pre><code>def getRadius(area):
      r = 1.0
      r = math.sqrt(area/3.14)
      return (r)
  
  def getIris(frame):
      grayImg = cv.CreateImage(cv.GetSize(frame), 8, 1)
      cv.CvtColor(frame,grayImg,cv.CV_BGR2GRAY)
      cv.Smooth(grayImg,grayImg,cv.CV_GAUSSIAN,9,9)
      cv.Canny(grayImg, grayImg, 32, 2)
      storage = cv.CreateMat(grayImg.width, 1, cv.CV_32FC3)
      minRad = int(getRadius(pupilArea))
      circles = cv.HoughCircles(grayImg, storage, cv.CV_HOUGH_GRADIENT, 2, 10,32,200,minRad, minRad*2)
      cv.ShowImage("output", grayImg)
      while circles:
          cv.DrawContours(frame, circles, (0,0,0), (0,0,0), 2)
          # this message is never shown, therefore I'm not detecting circles
          print "circle!"
          circles = circles.h_next()
      return (frame)
  </code></pre>