ViSP  2.6.2
vpMomentCommon.h
1 /****************************************************************************
2  *
3  * $Id: vpMomentCommon.h 3760 2012-06-04 08:03:05Z mbakthav $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2012 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 
97 class VISP_EXPORT vpMomentCommon : public vpMomentDatabase{
98 private:
99  vpMomentBasic momentBasic;
100  vpMomentGravityCenter momentGravity;
101  vpMomentCentered momentCentered;
102  vpMomentGravityCenterNormalized momentGravityNormalized;
103  vpMomentAreaNormalized momentSurfaceNormalized;
104  vpMomentCInvariant momentCInvariant;
105  vpMomentAlpha momentAlpha;
106  vpMomentArea momentArea;
107 public:
108  vpMomentCommon(double dstSurface,std::vector<double> ref,double refAlpha,double dstZ=1.0);
109 
110  static double getAlpha(vpMomentObject& objec);
111  static std::vector<double> getMu3(vpMomentObject& object);
112  static double getSurface(vpMomentObject& object);
113 
114  void updateAll(vpMomentObject& object);
115 };
116 
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.
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.
This class defines several 2D (translation+rotation+scale) invariants for both symmetric and non-symm...