ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpMeLine.h
1
/****************************************************************************
2
*
3
* $Id: vpMeLine.h 4062 2013-01-09 10:30:06Z 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
* Moving edges.
36
*
37
* Authors:
38
* Eric Marchand
39
*
40
*****************************************************************************/
41
47
#ifndef vpMeLine_HH
48
#define vpMeLine_HH
49
50
#include <visp/vpMatrix.h>
51
#include <visp/vpMath.h>
52
#include <visp/vpMeTracker.h>
53
54
#include <math.h>
55
#include <iostream>
56
149
class
VISP_EXPORT
vpMeLine
:
public
vpMeTracker
150
{
151
private
:
152
static
void
update_indices(
double
theta,
int
incr,
int
i,
int
j,
int
& i1,
int
& i2,
int
& j1,
int
& j2);
153
154
protected
:
155
vpMeSite
PExt[2] ;
156
157
double
rho,
theta
;
158
double
delta ,
delta_1
;
159
double
angle,
angle_1
;
160
int
sign
;
161
163
bool
_useIntensityForRho
;
164
165
#ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
166
public
:
167
#else
168
protected
:
169
#endif
170
171
double
a
;
172
double
b
;
173
double
c
;
174
175
public
:
176
vpMeLine
() ;
177
vpMeLine
(
const
vpMeLine
&meline);
178
virtual
~
vpMeLine
() ;
179
180
void
display
(
const
vpImage<unsigned char>
& I,
vpColor
col) ;
181
182
void
track
(
const
vpImage<unsigned char>
& Im);
183
184
void
sample
(
const
vpImage<unsigned char>
&image);
185
void
reSample(
const
vpImage<unsigned char>
&I) ;
186
void
leastSquare() ;
187
void
updateDelta();
188
void
setExtremities() ;
189
void
seekExtremities(
const
vpImage<unsigned char>
&I) ;
190
void
suppressPoints() ;
191
192
void
initTracking
(
const
vpImage<unsigned char>
&I) ;
193
void
initTracking
(
const
vpImage<unsigned char>
&I,
194
const
vpImagePoint
&ip1,
195
const
vpImagePoint
&ip2) ;
196
197
void
computeRhoTheta(
const
vpImage<unsigned char>
&I) ;
198
double
getRho()
const
;
199
double
getTheta()
const
;
200
void
getExtremities(
vpImagePoint
&ip1,
vpImagePoint
&ip2) ;
201
205
void
getEquationParam
(
double
&A,
double
&B,
double
&C) { A = a; B = b; C = c; }
206
210
inline
double
getA
()
const
{
return
a; }
211
215
inline
double
getB
()
const
{
return
b; }
216
220
inline
double
getC
()
const
{
return
c; }
221
222
static
bool
intersection(
const
vpMeLine
&line1,
const
vpMeLine
&line2,
223
vpImagePoint
&ip);
224
234
inline
void
computeRhoSignFromIntensity
(
const
bool
useIntensityForRho){
235
_useIntensityForRho = useIntensityForRho;
236
}
237
238
//Static Functions
239
public
:
240
static
void
display
(
const
vpImage<unsigned char>
& I,
const
vpMeSite
&PExt1,
const
vpMeSite
&PExt2,
241
const
double
&A,
const
double
&B,
const
double
&C,
242
const
vpColor
&color =
vpColor::green
,
unsigned
int
thickness=1);
243
static
void
display
(
const
vpImage<vpRGBa>
& I,
const
vpMeSite
&PExt1,
const
vpMeSite
&PExt2,
244
const
double
&A,
const
double
&B,
const
double
&C,
245
const
vpColor
&color =
vpColor::green
,
unsigned
int
thickness=1);
246
247
static
void
display
(
const
vpImage<unsigned char>
& I,
const
vpMeSite
&PExt1,
const
vpMeSite
&PExt2,
248
const
std::list<vpMeSite> &site_list,
249
const
double
&A,
const
double
&B,
const
double
&C,
250
const
vpColor
&color =
vpColor::green
,
unsigned
int
thickness=1);
251
static
void
display
(
const
vpImage<vpRGBa>
& I,
const
vpMeSite
&PExt1,
const
vpMeSite
&PExt2,
252
const
std::list<vpMeSite> &site_list,
253
const
double
&A,
const
double
&B,
const
double
&C,
254
const
vpColor
&color =
vpColor::green
,
unsigned
int
thickness=1);
255
};
256
257
#endif
src
tracking
moving-edges
vpMeLine.h
Generated on Fri Apr 26 2013 19:54:36 for ViSP by
1.8.1.2