ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpFeatureMoment.h
1
/****************************************************************************
2
*
3
* $Id: vpFeatureMoment.h 4056 2013-01-05 13:04:42Z fspindle $
4
*
5
* This file is part of the ViSP software.
6
* Copyright (C) 2005 - 2013 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
* Base for all moment features
36
*
37
* Authors:
38
* Filip Novotny
39
*
40
*****************************************************************************/
47
#ifndef __FEATUREMOMENT_H__
48
#define __FEATUREMOMENT_H__
49
50
#include <visp/vpConfig.h>
51
#include <visp/vpBasicFeature.h>
52
#include <visp/vpException.h>
53
#include <vector>
54
55
class
vpMomentObject
;
56
class
vpMomentDatabase
;
57
class
vpFeatureMomentDatabase
;
58
class
vpMoment
;
59
118
145
class
VISP_EXPORT
vpFeatureMoment
:
public
vpBasicFeature
{
146
protected
:
147
vpMoment
*
moment
;
148
vpMoment
&
getMoment
(){
return
*moment;}
149
vpMomentDatabase
&
moments
;
150
vpFeatureMomentDatabase
*
featureMomentsDataBase
;
151
std::vector<vpMatrix>
interaction_matrices
;
152
153
double
A
;
154
double
B
;
155
double
C
;
156
char
_name[255];
157
public
:
167
vpFeatureMoment
(
vpMomentDatabase
& moments,
double
A=0.0,
double
B=0.0,
double
C=0.0,
vpFeatureMomentDatabase
* featureMoments=NULL,
unsigned
int
nbmatrices=1) :
168
moment(NULL),
169
moments(moments),
170
featureMomentsDataBase(featureMoments),
171
interaction_matrices(nbmatrices),
172
A(A),B(B),C(C) {}
173
virtual
~
vpFeatureMoment
();
174
175
virtual
void
compute_interaction (
void
);
176
vpBasicFeature
*
duplicate
()
const
;
177
void
display
(
const
vpCameraParameters
&cam,
const
vpImage< unsigned char >
&I,
178
const
vpColor
&color=
vpColor::green
,
unsigned
int
thickness=1)
const
;
179
void
display
(
const
vpCameraParameters
&cam,
const
vpImage< vpRGBa >
&I,
180
const
vpColor
&color=
vpColor::green
,
unsigned
int
thickness=1)
const
;
181
182
int
getDimension
(
unsigned
int
select=FEATURE_ALL)
const
;
183
void
init
(
void
);
184
vpMatrix
interaction
(
const
unsigned
int
select=FEATURE_ALL);
185
void
linkTo(
vpFeatureMomentDatabase
& featureMoments);
186
191
virtual
const
char
* momentName() = 0;
195
virtual
const
char
* name() = 0;
196
void
print
(
const
unsigned
int
select=FEATURE_ALL)
const
;
197
198
void
update (
double
A,
double
B,
double
C);
199
200
#ifndef DOXYGEN_SHOULD_SKIP_THIS
201
void
operator=(
const
vpFeatureMoment
&){
202
throw
vpException
(
vpException::functionNotImplementedError
,
"Not implemented!"
);
203
}
204
#endif
205
206
};
207
222
class
VISP_EXPORT
vpMomentGenericFeature
:
public
vpFeatureMoment
{
223
public
:
224
vpMomentGenericFeature
(
vpMomentDatabase
& moments,
double
A,
double
B,
double
C,
vpFeatureMomentDatabase
* featureMoments,
vpMoment
* moment) :
vpFeatureMoment
(moments,A,B,C,featureMoments){this->moment =
moment
;}
228
const
char
*
momentName
() {
return
NULL;}
232
virtual
const
char
*
name
() {
return
NULL;}
233
};
234
235
#endif
src
visual-feature
vpFeatureMoment.h
Generated on Fri Apr 26 2013 19:54:36 for ViSP by
1.8.1.2