Detect circles using Hough Transform
<p>I found this code that applies the Hough Transform to drawn shapes, but I want to repurpose it to detect circles in camera-taken images. Here is the github repository: <a href="https://github.com/gmarty/hough-transform-js" rel="nofollow">https://github.com/gmarty/hough-transform-js</a></p>

<p>On the wikipedia page for the Circe Hough Transform, it states that in a two dimensional space, a circle can by described by:</p>

<p>(x-a)^2 + (y-b)^2 = r^2 , where (a,b) is the center of the circle, and r is the radius. If a 2D point (x,y) is fixed, then the parameters can be found according to (1).</p>

<p>I sort of understand the mathematics behind it, but not really. I've seen a lot of resources that can do it but they are all in Mathlab and not javascript. What would I have to add to the code to make it detect circles?</p>