Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

EstimateEllipse.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Geometry_EstimateEllipse_h
00002 #define Impala_Core_Geometry_EstimateEllipse_h
00003 
00004 namespace Impala
00005 {
00006 namespace Core
00007 {
00008 namespace Geometry
00009 {
00010 
00011 void
00012 EstimateEllipse(double value[4], double& large, double& small, double& ori)
00013 {
00014     double xx=0, xy=0, yy=0;
00015     double x;
00016 
00017     xx += value[0];
00018     x = 0.5*value[1]*sqrt(2.);
00019     xy += x;
00020     xx += x;
00021     yy += x;
00022     yy += value[2];
00023     x = 0.5*value[3]*sqrt(2.);
00024     xy -= x;
00025     xx += x;
00026     yy += x;
00027 
00028     double H, D, Ia, Ib;
00029     H = 0.5*(xx+yy);
00030     D = H*H-xx*yy+xy*xy;
00031     Ia = H+sqrt(D);
00032     Ib = H-sqrt(D);
00033     large = 2.*Ia/4.;
00034     small = 2.*Ib/4.;
00035     ori = 0; // this seems to not be computed
00036 }
00037 
00038 } // namespace Geometry
00039 } // namespace Core
00040 } // namespace Impala
00041 
00042 #endif

Generated on Fri Mar 19 09:31:08 2010 for ImpalaSrc by  doxygen 1.5.1