Extracting the relative grain boundary free energy and mobility functions from the geometry of microstructures