Woolz Image Processing  Version 1.8.3
WlzPrinicipalAngle.c File Reference

Calculates the angle which the long principal axis makes with the given object. The functions are based on a combination of methods by Rees and Hibbard. (D.W.A. Rees, Mechanics of Solids and Structures). More...

Functions

double WlzPrincipalAngle (WlzObject *srcObj, WlzDVertex2 cMass, int binObjFlag, WlzErrorNum *dstErrNum)
 Calculates the angle which the long principal axis makes with the x-axis in the given object.

\[ \theta = \frac{1}{2} \arctan{(2 \frac{I_{xy}}{I_{yy}-I_{xx}})} \]

where

\[ I_{xx} = \sum_y \sum_x ((y - C_y) (y - C_y) G(x, y)) \]

\[ I_{yy} = \sum_y \sum_x ((x - C_x) (x - C_x) G(x, y)) \]

\[ I_{xy} = - \sum_y \sum_x (((x - C x) (y - C_y) G(x, y)) \]

and \((C_x, C_y)\) are the coordinates of the centre of mass. More...

 

Detailed Description

Calculates the angle which the long principal axis makes with the given object. The functions are based on a combination of methods by Rees and Hibbard. (D.W.A. Rees, Mechanics of Solids and Structures).

Author
Elizabeth Guest, Bill Hill
Date
March 1999
Version
Id
08519d7aa941621dea5bbec5a42d6309d7ed4511
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.