Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpMbtMeLine.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 of a line used by the model-based tracker.
32 */
33
38
39#ifndef VP_MBT_ME_LINE_H
40#define VP_MBT_ME_LINE_H
41
42#include <visp3/core/vpConfig.h>
43#include <visp3/core/vpPoint.h>
44#include <visp3/me/vpMe.h>
45#include <visp3/me/vpMeLine.h>
46
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
48
67class VISP_EXPORT vpMbtMeLine : public vpMeLine
68{
69public:
70 int imin, imax;
71 int jmin, jmax;
72 double expecteddensity;
73
74public:
75 vpMbtMeLine();
76 vpMbtMeLine(const vpMbtMeLine &meline);
77 vpMbtMeLine &operator=(const vpMbtMeLine &meline);
78
79 void computeProjectionError(const vpImage<unsigned char> &_I, double &_sumErrorRad, unsigned int &_nbFeatures,
80 const vpMatrix &SobelX, const vpMatrix &SobelY, bool display, unsigned int length,
81 unsigned int thickness);
82
83 void display(const vpImage<unsigned char> & /* I */, const vpColor &/* col */, unsigned int /* thickness */) { }
85
92 inline double get_a() const { return m_a; }
93
100 inline double get_b() const { return m_b; }
101
108 inline double get_c() const { return m_c; }
109
110 void initTracking(const vpImage<unsigned char> &I, const vpImagePoint &ip1, const vpImagePoint &ip2, double rho,
111 double theta, bool doNoTrack);
112
113 void track(const vpImage<unsigned char> &I);
114
115 void updateParameters(const vpImage<unsigned char> &I, double rho, double theta);
116 void updateParameters(const vpImage<unsigned char> &I, const vpImagePoint &ip1, const vpImagePoint &ip2, double rho,
117 double theta);
118
119private:
120 virtual unsigned int seekExtremities(const vpImage<unsigned char> &I) VP_OVERRIDE;
121
122 void suppressPoints(const vpImage<unsigned char> &I);
123 // void reSample(const vpImage<unsigned char> &image);
124 void reSample(const vpImage<unsigned char> &image, const vpImagePoint &ip1, const vpImagePoint &ip2);
125};
126END_VISP_NAMESPACE
127#endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
128
129#endif
Class that tracks in an image a line moving edges.
Definition vpMeLine.h:157
void display(const vpImage< unsigned char > &I, const vpColor &color, unsigned int thickness=1)
Definition vpMeLine.cpp:177
void reSample(const vpImage< unsigned char > &I)
Definition vpMeLine.cpp:561
void track(const vpImage< unsigned char > &I)
Definition vpMeLine.cpp:607
void initTracking(const vpImage< unsigned char > &I)
Definition vpMeLine.cpp:187
virtual unsigned int seekExtremities(const vpImage< unsigned char > &I)
Definition vpMeLine.cpp:445
vpMeLine & operator=(const vpMeLine &meline)
Definition vpMeLine.cpp:95
void display(const vpImage< unsigned char > &I)