Fawkes API  Fawkes Development Version
fit_accum.h
1 /***************************************************************************
2  * fit_accum.h - Header for 'fitted circle' accumulator
3  * used by Fix-Point RCD Algorithm
4  *
5  * Created: Sat Sep 10 17:25:55 2005
6  * Copyright 2005 Hu Yuxiao <Yuxiao.Hu@rwth-aachen.de>
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_MODELS_SHAPE_ACCUMULATORS_FIT_ACCUM_H_
25 #define __FIREVISION_MODELS_SHAPE_ACCUMULATORS_FIT_ACCUM_H_
26 
27 #include <utils/math/types.h>
28 #include <fvutils/base/types.h>
29 
30 namespace firevision {
31 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
35 class Circle;
36 
37 class FitAccum
38 {
39 private:
40  static const float TOO_SMALL_DELTA;
41 
42 private:
43  int count;
44  float A00, A01, A02;
45  float A10, A11, A12;
46  float A20, A21, A22;
47 
48  float b0, b1, b2;
49 
50 public:
51  FitAccum(void);
52  ~FitAccum(void);
53 
54  void reset(void);
55  void addPoint(const fawkes::upoint_t&); // add a point
56  void removePoint(const fawkes::upoint_t&); // remove a point
57 
58  int getCount(void) const;
59  Circle* getCircle(void) const;
60 };
61 
62 } // end namespace firevision
63 
64 #endif
void addPoint(const fawkes::upoint_t &)
Add point.
Definition: fit_accum.cpp:68
~FitAccum(void)
Destructor.
Definition: fit_accum.cpp:49
void reset(void)
Reset.
Definition: fit_accum.cpp:55
Circle shape.
Definition: circle.h:45
Point with cartesian coordinates as unsigned integers.
Definition: types.h:34
void removePoint(const fawkes::upoint_t &)
Remove point.
Definition: fit_accum.cpp:95
int getCount(void) const
Get count.
Definition: fit_accum.cpp:120
FitAccum(void)
Constructor.
Definition: fit_accum.cpp:43
FIT Accumulator.
Definition: fit_accum.h:37
Circle * getCircle(void) const
Get circle.
Definition: fit_accum.cpp:129