ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpMbtPolygon.h
1
/****************************************************************************
2
*
3
* $Id: vpMbtPolygon.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
* Implements a polygon of the model used by the model-based tracker.
36
*
37
* Authors:
38
* Nicolas Melchior
39
* Romain Tallonneau
40
* Eric Marchand
41
* Aurelien Yol
42
*
43
*****************************************************************************/
44
50
#ifndef vpMbtPolygon_HH
51
#define vpMbtPolygon_HH
52
53
#include <visp/vpPoint.h>
54
#include <visp/vpMeterPixelConversion.h>
55
#include <visp/vpPixelMeterConversion.h>
56
57
#include <vector>
58
67
class
VISP_EXPORT
vpMbtPolygon
68
{
69
public
:
71
int
index
;
73
unsigned
int
nbpt
;
75
bool
isvisible
;
77
bool
isappearing
;
79
vpPoint
*
p
;
80
81
public
:
82
vpMbtPolygon
() ;
83
virtual
~
vpMbtPolygon
() ;
84
85
void
addPoint(
const
unsigned
int
n,
const
vpPoint
&P) ;
86
87
void
changeFrame(
const
vpHomogeneousMatrix
&cMo) ;
88
94
inline
int
getIndex
()
const
{
return
index ;}
95
101
inline
unsigned
int
getNbPoint
()
const
{
return
nbpt ;}
102
103
vpPoint
& getPoint(
const
unsigned
int
_index);
104
105
std::vector<vpImagePoint> getRoi(
const
vpCameraParameters
&_cam);
106
107
inline
bool
isAppearing
()
const
{
return
isappearing;}
108
bool
isVisible(
const
vpHomogeneousMatrix
&cMo,
const
bool
&depthTest =
false
) ;
109
virtual
bool
isVisible(
const
vpHomogeneousMatrix
&cMo,
const
double
alpha) ;
110
bool
isVisible
()
const
{
return
isvisible;}
111
117
virtual
inline
void
setIndex
(
const
int
i ) { index = i ; }
118
virtual
void
setNbPoint(
const
unsigned
int
nb) ;
119
120
public
:
121
static
void
getMinMaxRoi(
const
std::vector<vpImagePoint> &roi,
int
& i_min,
int
&i_max,
int
&j_min,
int
&j_max);
122
static
bool
roiInsideImage(
const
vpImage<unsigned char>
& I,
const
std::vector<vpImagePoint>& corners);
123
};
124
125
#endif
126
src
tracking
mbt
edge
vpMbtPolygon.h
Generated on Fri Apr 26 2013 19:54:36 for ViSP by
1.8.1.2