Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpFeatureMomentCInvariant.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
* Implementation for all supported moment features.
32
*/
33
38
#ifndef _vpFeatureMomentCInvariant_h_
39
#define _vpFeatureMomentCInvariant_h_
40
41
#include <visp3/core/vpConfig.h>
42
#include <visp3/visual_features/vpFeatureMoment.h>
43
44
#ifdef VISP_MOMENTS_COMBINE_MATRICES
45
BEGIN_VISP_NAMESPACE
46
92
class
VISP_EXPORT
vpFeatureMomentCInvariant
:
public
vpFeatureMoment
93
{
94
public
:
105
vpFeatureMomentCInvariant(vpMomentDatabase &moments,
double
A,
double
B,
double
C,
106
vpFeatureMomentDatabase *featureMoments =
nullptr
)
107
: vpFeatureMoment(moments, A, B, C, featureMoments, 16)
108
{ }
109
110
void
compute_interaction
() VP_OVERRIDE;
111
115
const std::
string
momentName() const VP_OVERRIDE
116
{
117
return
"vpMomentCInvariant"
;
118
}
119
123
const
std::string
name
() const VP_OVERRIDE
124
{
125
return
"vpFeatureMomentCInvariant"
;
126
}
127
131
static
unsigned
int
selectC1() {
return
1 << 0; }
135
static
unsigned
int
selectC2() {
return
1 << 1; }
139
static
unsigned
int
selectC3() {
return
1 << 2; }
143
static
unsigned
int
selectC4() {
return
1 << 3; }
147
static
unsigned
int
selectC5() {
return
1 << 4; }
151
static
unsigned
int
selectC6() {
return
1 << 5; }
155
static
unsigned
int
selectC7() {
return
1 << 6; }
159
static
unsigned
int
selectC8() {
return
1 << 7; }
163
static
unsigned
int
selectC9() {
return
1 << 8; }
167
static
unsigned
int
selectC10() {
return
1 << 9; }
171
static
unsigned
int
selectSx() {
return
1 << 10; }
175
static
unsigned
int
selectSy() {
return
1 << 11; }
179
static
unsigned
int
selectPx() {
return
1 << 12; }
183
static
unsigned
int
selectPy() {
return
1 << 13; }
184
};
185
END_VISP_NAMESPACE
186
#else
187
BEGIN_VISP_NAMESPACE
188
class
vpMomentDatabase
;
189
235
class
VISP_EXPORT
vpFeatureMomentCInvariant
:
public
vpFeatureMoment
236
{
237
private
:
238
std::vector<vpMatrix> LI;
239
240
public
:
251
vpFeatureMomentCInvariant
(
vpMomentDatabase
&data_base,
double
A_,
double
B_,
double
C_,
252
vpFeatureMomentDatabase
*featureMoments =
nullptr
)
253
:
vpFeatureMoment
(data_base, A_, B_, C_, featureMoments, 16), LI(16)
254
{ }
255
256
void
compute_interaction
() VP_OVERRIDE;
260
const std::
string
momentName
() const VP_OVERRIDE
261
{
262
return
"vpMomentCInvariant"
;
263
}
264
267
const
std::string
name
() const VP_OVERRIDE
268
{
269
return
"vpFeatureMomentCInvariant"
;
270
}
271
275
static
unsigned
int
selectC1
() {
return
1 << 0; }
279
static
unsigned
int
selectC2
() {
return
1 << 1; }
283
static
unsigned
int
selectC3
() {
return
1 << 2; }
287
static
unsigned
int
selectC4
() {
return
1 << 3; }
291
static
unsigned
int
selectC5
() {
return
1 << 4; }
295
static
unsigned
int
selectC6
() {
return
1 << 5; }
299
static
unsigned
int
selectC7
() {
return
1 << 6; }
303
static
unsigned
int
selectC8
() {
return
1 << 7; }
307
static
unsigned
int
selectC9
() {
return
1 << 8; }
311
static
unsigned
int
selectC10
() {
return
1 << 9; }
315
static
unsigned
int
selectSx
() {
return
1 << 10; }
319
static
unsigned
int
selectSy
() {
return
1 << 11; }
323
static
unsigned
int
selectPx
() {
return
1 << 12; }
327
static
unsigned
int
selectPy
() {
return
1 << 13; }
328
332
void
printLsofInvariants(std::ostream &os)
const
;
333
334
friend
VISP_EXPORT std::ostream &
operator<<
(std::ostream &os,
const
vpFeatureMomentCInvariant
&featcinv);
335
};
336
END_VISP_NAMESPACE
337
#endif
338
#endif
vpFeatureMomentCInvariant
Functionality computation for 2D rotation/translation/scale non-symmetric invariant moment feature....
Definition
vpFeatureMomentCInvariant.h:236
vpFeatureMomentCInvariant::selectC2
static unsigned int selectC2()
Definition
vpFeatureMomentCInvariant.h:279
vpFeatureMomentCInvariant::selectPy
static unsigned int selectPy()
Definition
vpFeatureMomentCInvariant.h:327
vpFeatureMomentCInvariant::selectC3
static unsigned int selectC3()
Definition
vpFeatureMomentCInvariant.h:283
vpFeatureMomentCInvariant::selectC10
static unsigned int selectC10()
Definition
vpFeatureMomentCInvariant.h:311
vpFeatureMomentCInvariant::selectSx
static unsigned int selectSx()
Definition
vpFeatureMomentCInvariant.h:315
vpFeatureMomentCInvariant::name
const std::string name() const VP_OVERRIDE
Definition
vpFeatureMomentCInvariant.h:267
vpFeatureMomentCInvariant::selectC6
static unsigned int selectC6()
Definition
vpFeatureMomentCInvariant.h:295
vpFeatureMomentCInvariant::selectPx
static unsigned int selectPx()
Definition
vpFeatureMomentCInvariant.h:323
vpFeatureMomentCInvariant::selectSy
static unsigned int selectSy()
Definition
vpFeatureMomentCInvariant.h:319
vpFeatureMomentCInvariant::selectC8
static unsigned int selectC8()
Definition
vpFeatureMomentCInvariant.h:303
vpFeatureMomentCInvariant::selectC1
static unsigned int selectC1()
Definition
vpFeatureMomentCInvariant.h:275
vpFeatureMomentCInvariant::selectC7
static unsigned int selectC7()
Definition
vpFeatureMomentCInvariant.h:299
vpFeatureMomentCInvariant::selectC9
static unsigned int selectC9()
Definition
vpFeatureMomentCInvariant.h:307
vpFeatureMomentCInvariant::vpFeatureMomentCInvariant
vpFeatureMomentCInvariant(vpMomentDatabase &data_base, double A_, double B_, double C_, vpFeatureMomentDatabase *featureMoments=nullptr)
Definition
vpFeatureMomentCInvariant.h:251
vpFeatureMomentCInvariant::selectC4
static unsigned int selectC4()
Definition
vpFeatureMomentCInvariant.h:287
vpFeatureMomentCInvariant::momentName
const std::string momentName() const VP_OVERRIDE
Definition
vpFeatureMomentCInvariant.h:260
vpFeatureMomentCInvariant::selectC5
static unsigned int selectC5()
Definition
vpFeatureMomentCInvariant.h:291
vpFeatureMomentDatabase
This class allows to register all feature moments (implemented in vpFeatureMoment....
Definition
vpFeatureMomentDatabase.h:159
vpFeatureMoment
This class defines shared system methods/attributes for 2D moment features but no functional code....
Definition
vpFeatureMoment.h:162
vpFeatureMoment::operator<<
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpFeatureMoment &featM)
Definition
vpFeatureMoment.cpp:267
vpFeatureMoment::vpFeatureMoment
vpFeatureMoment(const vpFeatureMoment &)=delete
vpFeatureMoment::name
virtual const std::string name() const =0
vpFeatureMoment::compute_interaction
virtual void compute_interaction(void)
Definition
vpFeatureMoment.cpp:250
vpMomentDatabase
This class allows to register all vpMoments so they can access each other according to their dependen...
Definition
vpMomentDatabase.h:133
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
visual_features
include
visp3
visual_features
vpFeatureMomentCInvariant.h
Generated by
1.17.0