Rating:
I implemented my own algorithm to detect circles and find the minimum distance, running on $O(wh + n^2)$.
I don't remember