Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpMeTracker.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
* Moving edges.
32
*/
33
38
39
#ifndef VP_ME_TRACKER_H
40
#define VP_ME_TRACKER_H
41
42
#include <visp3/core/vpColVector.h>
43
#include <visp3/core/vpTracker.h>
44
#include <visp3/me/vpMe.h>
45
#include <visp3/me/vpMeSite.h>
46
47
#include <iostream>
48
#include <list>
49
#include <math.h>
50
51
BEGIN_VISP_NAMESPACE
52
68
class
VISP_EXPORT
vpMeTracker
:
public
vpTracker
69
{
70
public
:
74
vpMeTracker
();
75
79
vpMeTracker
(
const
vpMeTracker
&meTracker);
80
84
virtual
~vpMeTracker
() VP_OVERRIDE;
85
88
101
void
display
(
const
vpImage<unsigned char>
&I);
102
115
void
display
(
const
vpImage<vpRGBa>
&I);
116
124
void
display
(
const
vpImage<unsigned char>
&I,
vpColVector
&w,
unsigned
int
&index_w);
125
135
static
bool
inRoiMask
(
const
vpImage<bool>
*mask,
unsigned
int
i,
unsigned
int
j);
136
146
static
bool
inMeMaskCandidates
(
const
vpImage<bool>
*meMaskCandidates,
unsigned
int
i,
unsigned
int
j);
147
153
inline
vpMe
*
getMe
() {
return
m_me
; }
154
160
inline
std::list<vpMeSite> &
getMeList
() {
return
m_meList
; }
161
167
inline
std::list<vpMeSite>
getMeList
()
const
{
return
m_meList
; }
168
174
inline
int
getNbPoints
()
const
{
return
m_nGoodElement
; }
175
179
void
init
();
180
187
void
initTracking(
const
vpImage<unsigned char>
&I);
188
192
unsigned
int
numberOfSignal();
193
197
vpMeTracker
&
operator=
(
vpMeTracker
&meTracker);
198
208
bool
outOfImage(
int
i,
int
j,
int
border,
int
nrows,
int
ncols);
209
218
bool
outOfImage(
const
vpImagePoint
&iP,
int
border,
int
nrows,
int
ncols);
219
223
void
reset();
224
228
virtual
void
sample
(
const
vpImage<unsigned char>
&image,
bool
doNotTrack =
false
) = 0;
229
234
void
setDisplay
(
vpMeSite::vpMeSiteDisplayType
select) {
m_selectDisplay
= select; }
235
241
virtual
void
setMask
(
const
vpImage<bool>
&mask) {
m_mask
= &mask; }
242
248
virtual
void
setMaskCandidates
(
const
vpImage<bool>
*maskCandidates) {
m_maskCandidates
= maskCandidates; }
249
255
void
setMe
(
vpMe
*me) {
m_me
= me; }
256
262
void
setMeList
(
const
std::list<vpMeSite> &meList) {
m_meList
= meList; }
263
267
unsigned
int
totalNumberOfSignal();
268
276
void
track(
const
vpImage<unsigned char>
&I);
278
279
#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
284
294
VP_DEPRECATED
static
bool
inMask
(
const
vpImage<bool>
*mask,
unsigned
int
i,
unsigned
int
j)
295
{
296
return
inRoiMask
(mask, i, j);
297
}
298
299
#endif
300
301
protected
:
304
306
std::list<vpMeSite>
m_meList
;
308
vpMe
*
m_me
;
310
int
m_nGoodElement
;
312
const
vpImage<bool>
*
m_mask
;
314
const
vpImage<bool>
*
m_maskCandidates
;
316
vpMeSite::vpMeSiteDisplayType
m_selectDisplay
;
318
319
};
320
321
END_VISP_NAMESPACE
322
323
#endif
vpColVector
Implementation of column vector and the associated operations.
Definition
vpColVector.h:191
vpImagePoint
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition
vpImagePoint.h:82
vpImage
Definition of the vpImage class member functions.
Definition
vpImage.h:131
vpMeSite::vpMeSiteDisplayType
vpMeSiteDisplayType
Definition
vpMeSite.h:81
vpMeTracker
Contains abstract elements for a Distance to Feature type feature.
Definition
vpMeTracker.h:69
vpMeTracker::m_mask
const vpImage< bool > * m_mask
Mask used to disable tracking on a part of image.
Definition
vpMeTracker.h:312
vpMeTracker::getMeList
std::list< vpMeSite > & getMeList()
Definition
vpMeTracker.h:160
vpMeTracker::m_selectDisplay
vpMeSite::vpMeSiteDisplayType m_selectDisplay
Moving-edges display type.
Definition
vpMeTracker.h:316
vpMeTracker::getNbPoints
int getNbPoints() const
Definition
vpMeTracker.h:174
vpMeTracker::sample
virtual void sample(const vpImage< unsigned char > &image, bool doNotTrack=false)=0
vpMeTracker::setMaskCandidates
virtual void setMaskCandidates(const vpImage< bool > *maskCandidates)
Definition
vpMeTracker.h:248
vpMeTracker::getMeList
std::list< vpMeSite > getMeList() const
Definition
vpMeTracker.h:167
vpMeTracker::m_me
vpMe * m_me
Moving edges initialisation parameters.
Definition
vpMeTracker.h:308
vpMeTracker::inRoiMask
static bool inRoiMask(const vpImage< bool > *mask, unsigned int i, unsigned int j)
Definition
vpMeTracker.cpp:103
vpMeTracker::display
void display(const vpImage< unsigned char > &I)
Definition
vpMeTracker.cpp:252
vpMeTracker::setDisplay
void setDisplay(vpMeSite::vpMeSiteDisplayType select)
Definition
vpMeTracker.h:234
vpMeTracker::setMe
void setMe(vpMe *me)
Definition
vpMeTracker.h:255
vpMeTracker::m_nGoodElement
int m_nGoodElement
Number of good moving-edges that are tracked.
Definition
vpMeTracker.h:310
vpMeTracker::vpMeTracker
vpMeTracker()
Definition
vpMeTracker.cpp:56
vpMeTracker::m_maskCandidates
const vpImage< bool > * m_maskCandidates
Mask used to determine candidate points for initialization in an image.
Definition
vpMeTracker.h:314
vpMeTracker::getMe
vpMe * getMe()
Definition
vpMeTracker.h:153
vpMeTracker::m_meList
std::list< vpMeSite > m_meList
Definition
vpMeTracker.h:306
vpMeTracker::inMask
static VP_DEPRECATED bool inMask(const vpImage< bool > *mask, unsigned int i, unsigned int j)
Definition
vpMeTracker.h:294
vpMeTracker::inMeMaskCandidates
static bool inMeMaskCandidates(const vpImage< bool > *meMaskCandidates, unsigned int i, unsigned int j)
Definition
vpMeTracker.cpp:113
vpMeTracker::setMask
virtual void setMask(const vpImage< bool > &mask)
Definition
vpMeTracker.h:241
vpMeTracker::setMeList
void setMeList(const std::list< vpMeSite > &meList)
Definition
vpMeTracker.h:262
vpMe
Definition
vpMe.h:143
vpTracker::operator=
vpTracker & operator=(const vpTracker &tracker)
Copy operator.
Definition
vpTracker.cpp:49
vpTracker::init
void init()
Default initialization.
Definition
vpTracker.cpp:43
vpTracker::vpTracker
vpTracker()
Default constructor.
Definition
vpTracker.cpp:45
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
tracker
me
include
visp3
me
vpMeTracker.h
Generated by
1.17.0