ViSP  2.9.0
vpMomentCommon.h
1 /****************************************************************************
2  *
3  * $Id: vpMomentCommon.h 4574 2014-01-09 08:48:51Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Pre-filled moment database with all commonly used moments.
36  *
37  * Authors:
38  * Filip Novotny
39  *
40  *****************************************************************************/
45 #ifndef VPCOMMONMOMENTS_H
46 #define VPCOMMONMOMENTS_H
47 
48 #include <visp/vpMomentDatabase.h>
49 #include <visp/vpMomentBasic.h>
50 #include <visp/vpMomentGravityCenter.h>
51 #include <visp/vpMomentCentered.h>
52 #include <visp/vpMomentGravityCenterNormalized.h>
53 #include <visp/vpMomentAreaNormalized.h>
54 #include <visp/vpMomentCInvariant.h>
55 #include <visp/vpMomentAlpha.h>
56 #include <visp/vpMomentArea.h>
57 
58 #include <vector>
59 
60 class vpMomentObject;
61 
98 class VISP_EXPORT vpMomentCommon : public vpMomentDatabase{
99 private:
100  vpMomentBasic momentBasic;
101  vpMomentGravityCenter momentGravity;
102  vpMomentCentered momentCentered;
103  vpMomentGravityCenterNormalized momentGravityNormalized;
104  vpMomentAreaNormalized momentSurfaceNormalized;
105  vpMomentCInvariant* momentCInvariant;
106  vpMomentAlpha momentAlpha;
107  vpMomentArea momentArea;
108 public:
109  vpMomentCommon(double dstSurface,std::vector<double> ref,double refAlpha,double dstZ=1.0, bool flg_sxsyfromnormalized=false);
110 
111  static double getAlpha(vpMomentObject& object);
112  static std::vector<double> getMu3(vpMomentObject& object);
113  static double getSurface(vpMomentObject& object);
114 
115  void updateAll(vpMomentObject& object);
116  ~vpMomentCommon();
117 };
118 #endif // VPCOMMONMOMENTS_H
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
This class defines the 2D basic moment . This class is a wrapper for vpMomentObject wich allows to us...
Definition: vpMomentBasic.h:74
Class describing 2D normalized gravity center moment.
Class for generic objects.
Class handling the surface moment.
Definition: vpMomentArea.h:57
This class allows to register all vpMoments so they can access each other according to their dependen...
virtual void updateAll(vpMomentObject &object)
This class defines the double-indexed centered moment descriptor .
This class defines the orientation of the object inside the plane parallel to the object...
Class describing 2D gravity center moment.
This class initializes and allows access to commonly used moments.