There is an article on how to detect circles in images using pairs of gradient vectors (assuming the circle is dark and background is bright).
The thing is that gradient of image intensity at each pixel of the edge of the circle is directed outwards the circle, perpendicularly to it.
The algorithm is to find all gradient vector pairs (see the picture) that are in almost opposite directions ($\vec{V_1}$ and $\vec{V_2}$); and, also, $\vec{V_1}$ and $\vec{P_1P_2}$ are almost it opposite directions. As a midpoint of $P_1$ and $P_2$ we get circle center, and the distance between the points divided by 2 is the radius, we found a candidate circle. The extraction of the real circles from our statistics is not described in the paper, but is easy to invent.
And what I want is to make the algorithm to work with ellipses.
What can I do? Maybe add point $P_3$ and corresponding vector $V_3$. I want to find candidate ellipses somehow. Do three points with gradients at these points strictly define an ellipse?