title: Tracking white ball in white background (Python/OpenCV)
body: <p>i'm using OpenCV in Python 3 to detect a white/black ball on a white field and give it's exact (x,y,radius) and color. </p>
  
  <p>I use the function cv2.Canny() and cv2.findContours() to find it but the problem is cv2.Canny() dont's always detect the complete shape of the circle (most of time only 3/4 of the circle). 
  So when i use cv2.findContours() it don't detect it as a Contour.</p>
  
  <p>Please see :</p>
  
  <p><img src="https://i.stack.imgur.com/hGQnp.png" alt="image 1">  and <img src="https://i.stack.imgur.com/Rx9Ii.png" alt="image 2"></p>
  
  <p>This is the most important code:</p>
  
  <pre><code>gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  blurred = cv2.GaussianBlur(gray, (5, 5), 0)
  edged = cv2.Canny(blurred, 10, 40) # 10 and 40 to be more perceptive
  contours_canny= cv2.findContours(edged.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)[-2]
  </code></pre>
  
  <p>After that i use:
  <code>approx = cv2.approxPolyDP(contour,0.01*cv2.arcLength(contour,True),True)</code></p>
  
  <p><strong>So if you can help me find a solution that would be great!
  Maybe is there a function that complete the shape of the circle so i can detect it?</strong></p>