00001 /***************************************************************** 00002 * 00003 * This file is part of the FLIRTLib project 00004 * 00005 * FLIRTLib Copyright (c) 2010 Gian Diego Tipaldi and Kai O. Arras 00006 * 00007 * This software is licensed under the "Creative Commons 00008 * License (Attribution-NonCommercial-ShareAlike 3.0)" 00009 * and is copyrighted by Gian Diego Tipaldi and Kai O. Arras 00010 * 00011 * Further information on this license can be found at: 00012 * http://creativecommons.org/licenses/by-nc-sa/3.0/ 00013 * 00014 * FLIRTLib is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied 00016 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 * 00019 *****************************************************************/ 00020 00021 00022 00023 #ifndef REGRESSION_H_ 00024 #define REGRESSION_H_ 00025 00026 #include <vector> 00027 #include <geometry/point.h> 00028 #include <cmath> 00029 00043 struct LineParameters{ 00044 double rho; 00045 double alpha; 00046 }; 00047 00053 LineParameters computeNormals(const std::vector<Point2D>& points, const std::vector<double>& weights); 00054 00060 LineParameters computeNormals(const std::vector<Point2D>& points); 00061 00062 #endif