# Measure eccentricity of a polygon

I am trying to compute the eccentricity of a polygon in Mathematica.

I see that I can do something similar with ComponentMeasurements, but I am not sure how to get a Graphics[Polygon[]] expression to play nicely with it.

This seems to work for me:

ComponentMeasurements[
Graphics[
Graphics[
RegularPolygon[5]
]
]
, "Eccentricity"]


However, I think you need to invert the colors. Using a test, you need:

ComponentMeasurements[
Graphics[
{White, Disk[{0, 0}, 1]}
, Background -> Black]
, "Eccentricity"]


to get 0