Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpMomentCommon.h
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4 *
5 * This software is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * See the file LICENSE.txt at the root directory of this source
10 * distribution for additional information about the GNU GPL.
11 *
12 * For using ViSP with software that can not be combined with the GNU
13 * GPL, please contact Inria about acquiring a ViSP Professional
14 * Edition License.
15 *
16 * See https://visp.inria.fr for more information.
17 *
18 * This software was developed at:
19 * Inria Rennes - Bretagne Atlantique
20 * Campus Universitaire de Beaulieu
21 * 35042 Rennes Cedex
22 * France
23 *
24 * If you have questions regarding the use of this file, please contact
25 * Inria at visp@inria.fr
26 *
27 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29 *
30 * Description:
31 * Pre-filled moment database with all commonly used moments.
32 */
33
38#ifndef VP_MOMENT_COMMON_H
39#define VP_MOMENT_COMMON_H
40
41#include <visp3/core/vpMomentAlpha.h>
42#include <visp3/core/vpMomentArea.h>
43#include <visp3/core/vpMomentAreaNormalized.h>
44#include <visp3/core/vpMomentBasic.h>
45#include <visp3/core/vpMomentCInvariant.h>
46#include <visp3/core/vpMomentCentered.h>
47#include <visp3/core/vpMomentDatabase.h>
48#include <visp3/core/vpMomentGravityCenter.h>
49#include <visp3/core/vpMomentGravityCenterNormalized.h>
50
51#include <vector>
52
54class vpMomentObject;
55
101class VISP_EXPORT vpMomentCommon : public vpMomentDatabase
102{
103private:
104 vpMomentBasic momentBasic;
105 vpMomentGravityCenter momentGravity;
106 vpMomentCentered momentCentered;
107 vpMomentGravityCenterNormalized momentGravityNormalized;
108 vpMomentAreaNormalized momentSurfaceNormalized;
109 vpMomentCInvariant *momentCInvariant;
110 vpMomentAlpha momentAlpha;
111 vpMomentArea momentArea;
112
113 // private:
114 //#ifndef DOXYGEN_SHOULD_SKIP_THIS
115 // vpMomentCommon(const vpMomentCommon &)
116 // : vpMomentDatabase(), momentBasic(), momentGravity(),
117 // momentCentered(), momentGravityNormalized(),
118 // momentSurfaceNormalized(0, 0), momentCInvariant(), momentAlpha(),
119 // momentArea()
120 // {
121 // throw vpException(vpException::functionNotImplementedError, "Not
122 // implemented!");
123 // }
124 // vpMomentCommon &operator=(const vpMomentCommon &){
125 // throw vpException(vpException::functionNotImplementedError, "Not
126 // implemented!"); return *this;
127 // }
128 //#endif
129
130#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
131 vpMomentCommon(const vpMomentCommon &) = delete; // non construction-copyable
132 vpMomentCommon &operator=(const vpMomentCommon &) = delete; // non copyable
133#endif
134
135public:
136 vpMomentCommon(double dstSurface, const std::vector<double> &ref, double refAlpha, double dstZ = 1.0,
137 bool flg_sxsyfromnormalized = false);
138
139 virtual ~vpMomentCommon() VP_OVERRIDE;
140
141 static double getAlpha(vpMomentObject &object);
142 static std::vector<double> getMu3(vpMomentObject &object);
143 static double getSurface(vpMomentObject &object);
144
145 void updateAll(vpMomentObject &object) VP_OVERRIDE;
146};
147END_VISP_NAMESPACE
148#endif // VPCOMMONMOMENTS_H
This class defines the orientation of the object inside the plane parallel to the object.
Class handling the normalized surface moment that is invariant in scale and used to estimate depth.
Class handling the surface moment.
This class defines the 2D basic moment . This class is a wrapper for vpMomentObject which allows to u...
This class defines the double-indexed centered moment descriptor .
static std::vector< double > getMu3(vpMomentObject &object)
static double getAlpha(vpMomentObject &object)
static double getSurface(vpMomentObject &object)
vpMomentDatabase & operator=(const vpMomentDatabase &)=default
virtual void updateAll(vpMomentObject &object)
Class describing 2D normalized gravity center moment.
Class describing 2D gravity center moment.
Class for generic objects.