00001 /************************************************************************************************** 00002 Software License Agreement (BSD License) 00003 00004 Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, are permitted 00008 provided that the following conditions are met: 00009 00010 *Redistributions of source code must retain the above copyright notice, this list of 00011 conditions and the following disclaimer. 00012 *Redistributions in binary form must reproduce the above copyright notice, this list of 00013 conditions and the following disclaimer in the documentation and/or other materials provided 00014 with the distribution. 00015 *Neither the name of the University of Aveiro nor the names of its contributors may be used to 00016 endorse or promote products derived from this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00020 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00021 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00024 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00025 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 ***************************************************************************************************/ 00032 #ifndef _MTT_KALMAN_H_ 00033 #define _MTT_KALMAN_H_ 00034 00035 #include "mtt_common.h" 00036 00037 extern void SetSearchArea(t_list& list,t_config&config); 00038 extern void AddPointPath(t_path*path,double x,double y); 00039 // void MotionModelsIteration(t_list*list,t_config*config); 00040 void MotionModelsIteration(vector<t_listPtr> &list,t_config& config); 00041 00042 void GetErrorConvariance(t_errors*error); 00043 void AllocMotionModels(t_list&list,t_config&config); 00044 extern int real2print(double x,t_config*config); 00045 extern double point2line_distance(double alpha,double ro,double x,double y); 00046 00047 void UpdateTransitionMatrixCTRV(CvKalman*model,double /*x*/,double /*y*/,double t,double v,double w,double dt); 00048 void UpdateTransitionMatrixCV(CvKalman*model,double dt); 00049 void UpdateTransitionMatrixCV_SC(CvKalman*model,double dt); 00050 00051 void IterateMotionModelCTRV(CvKalman*model,double vm,double wm); 00052 void IterateMotionModelCV(CvKalman*model,double vxm,double vym); 00053 double IterateMotionModelCV_SC(CvKalman*model,double vm); 00054 00055 CvKalman*CreateModelCTRV(void); 00056 CvKalman*CreateModelCV(void); 00057 CvKalman*CreateModelCV_SC(void); 00058 00059 extern double s[6]; 00060 extern double vel,theta; 00061 extern int select_object; 00062 extern FILE*fp; 00063 extern double grxy; 00064 void dA_FwdCt(CvKalman*model,double q[6],double dt,double l=2.54); 00065 void dH_FwdCt(CvKalman*model); 00066 void IterateMotionModelFwdCt(CvKalman*model,double z[2]); 00067 CvKalman*CreateModelFwdCt(void); 00068 00069 #endif