Here is one using open CV in python [1]. While there are many ways to find circles the Hough transform is a fairly simple and popular one, I don't know what Matlab uses internally but it would probably be an optimised version of Hough for circles. you can see some more here [2], implementing this process in raw python (with PIL or pillow) was something we did in our image processing course in undergrad so certainly not out of reach if you wanted to give it a go.
[1]: http://opencv-python-tutroals.readthedocs.io/en/latest/py_tu... [2]: https://en.wikipedia.org/wiki/Circle_Hough_Transform