code: def ellipse_axes(bwimage):
      """Parameters of the 'image ellipse'
  
      semimajor,semiminor = ellipse_axes(bwimage)
  
      Returns the parameters of the constant intensity ellipse with the same mass
      and second order moments as the original image.
  
      Parameters
      ----------
      bwimage : ndarray
          Interpreted as a boolean image
  
      Returns
      -------
      semimajor : float
      semiminor : float
  
      References
      ----------
      Prokop, RJ, and Reeves, AP.  1992. CVGIP: Graphical Models and Image
      Processing 54(5):438-460
  
      """
      from .moments import moments
  
      bwimage = _make_binary(bwimage)
  
      if not np.any(bwimage):
          return 0.0, 0.0
  
      cof = mh.center_of_mass(bwimage)
      hull_mu00 = moments(bwimage, 0, 0, cof)
      hull_mu11 = moments(bwimage, 1, 1, cof)
      hull_mu02 = moments(bwimage, 0, 2, cof)
      hull_mu20 = moments(bwimage, 2, 0, cof)
  
      semimajor = np.sqrt(
          (
              2
              * (
                  hull_mu20
                  + hull_mu02
                  + np.sqrt(
                      (hull_mu20 - hull_mu02) ** 2 + 4 * hull_mu11**2
                  )
              )
          )
          / hull_mu00
      )
  
      semiminor = np.sqrt(
          (
              2
              * (
                  hull_mu20
                  + hull_mu02
                  - np.sqrt(
                      (hull_mu20 - hull_mu02) ** 2 + 4 * hull_mu11**2
                  )
              )
          )
          / hull_mu00
      )
      return semimajor, semiminor
  
file_path: mahotas/mahotas/features/shape.py
imports: from __future__ import division
  import numpy
  import mahotas
  from ..labeled import bwperim
  from ..internal import _make_binary
label_desc: Use image node_id 2 for calling a global function with example usage: ellipse_axes(bwimage) and returns: semimajor,  semiminor, int,  int