How to approximate an ellipse in "Fit Ellipse"


Hello, I am Dan. I study about measuring Phenotype from the image.

In my study, I use the function “Fit ellipse” in ImageJ.

The behavior of this fit ellipse sometimes unpredictable and not meet my demand so I want to know how to run this Fit ellipse (in terms of algorithm, math)

But I can’t find any document and explanation.

Could you tell me where it is?