>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  ELLFIT
Libraries

ELLFIT

ELLFIT

Name


      ELLFIT

Purpose


      Fit an ellipse to a 2-d probability distribution.

Category


Calling Sequence


      ellfit, pd, xm, ym, ang, ecc, a, b

Inputs


      pd = 2-d probability distribution. in

Keyword Parameters


Outputs


      xm, ym = Mean X and Y coordinates (array indices). out
      ang = angle of major axis (deg). out
      ecc = eccentricity of fitted ellipse. out
      a, b = semimajor, semiminor axis of fitted ellipse. out

Common Blocks


Notes


      Notes: An ellipse is fit by matching its moment of inertia
        to the given array. A threshold image should be
        normalized to 1 before doing the fit, otherwise the
        ellipse will not be the correct size.
        See also genellipse.
        Here is a simple example:
          loadct,13
          d = rebin(shift(dist(200),100,100),200,400)
          z = rot(d,30) lt 50
          tvscl,z
          ellfit,z,xm,ym,ang,ecc,a,b
          genellipse,xm,ym,ang,a,b,x,y
          plots,x,y,/dev,color=!d.n_colors/2

Modification History


      R. Sterner. 10 June, 1986.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us