title: What is the best way to track an object in a video?
body: <p>I'm trying to learn computer vision and more specifically open-cv in python.</p>
  <p>I want to make a program that would track my barbell in a video and show me its path. (I know apps like this exists but I want to make it myself). I tried using the Canny edge detection and the HoughCircles functions but I seem to get everything but a good result.</p>
  <p>I have been using this code to find the edges of my image:</p>
  <pre><code>gray = cv.cvtColor(src=img, code=cv.COLOR_BGR2GRAY)
  blur = cv.blur(gray, (2,2))
  canny = cv.Canny(blur, 60, 60)
  </code></pre>
  <p>And then this code to find the circle:</p>
  <pre><code>circles = cv.HoughCircles(canny, cv.HOUGH_GRADIENT, dp=2, minDist=1000, circles=None,maxRadius=50)
  </code></pre>
  <p>This is the result:
  <a href="https://i.stack.imgur.com/WwiEk.png" rel="noreferrer">Result</a></p>
  <p><em>left = original image with detected circle // right = canny image</em></p>
  <p>Is this the right way to go or should I use another method?</p>