fit_accum.h

00001 /***************************************************************************
00002  *  fit_accum.h - Header for 'fitted circle' accumulator
00003  *                used by Fix-Point RCD Algorithm
00004  *
00005  *  Generated: Sat Sep 10 2005 17:25:55
00006  *  Copyright  2005  Hu Yuxiao      <Yuxiao.Hu@rwth-aachen.de>
00007  *
00008  ****************************************************************************/
00009
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023
00024 #ifndef __FIREVISION_FIT_ACCUM_H_
00025 #define __FIREVISION_FIT_ACCUM_H_
00026 
00027 #include <utils/math/types.h>
00028 #include <fvutils/base/types.h>
00029
00030 class Circle;
00031
00032 class FitAccum
00033 {
00034 private:
00035         static const float TOO_SMALL_DELTA;
00036
00037 private:
00038         int count;
00039         float A00, A01, A02;
00040         float A10, A11, A12;
00041         float A20, A21, A22;
00042
00043         float  b0,  b1,  b2;
00044
00045 public:
00046         FitAccum(void);
00047         ~FitAccum(void);
00048
00049         void reset(void);
00050         void addPoint(const fawkes::point_t&);    // add a point
00051         void removePoint(const fawkes::point_t&); // remove a point
00052
00053         int getCount(void) const;
00054         Circle* getCircle(void) const;
00055 };
00056
00057 #endif // __FIREVISION_FIT_ACCUM_H_