KINECT STATS GENERATOR FOR SPORTS VISUALISATION
1.0
|
00001 #ifndef QUADCURVEFIT_H 00002 #define QUADCURVEFIT_H 00003 #include<vector> 00004 #include "opencv2/opencv.hpp" 00005 00012 class QuadCurveFitUtility 00013 { 00014 public: 00016 QuadCurveFitUtility(); 00018 ~QuadCurveFitUtility(); 00019 00020 protected: 00022 std::vector<cv::Point2f> m_dataPoints; 00024 std::vector<cv::Point2f> m_dataPointsAfterInterpol; 00025 00027 double m_a; 00029 double m_b; 00031 double m_c; 00032 00033 public: 00036 void addPoints( cv::Point2f _inputSet ); 00037 00039 void processParametricPoints3D(std::vector<float>& _inputBuffer,float& o_coeffX); 00040 00041 public: 00043 double getATerm(); 00044 00046 double getBTerm(); 00047 00049 double getCTerm(); 00050 00052 double getRSquare(); 00053 00054 protected: 00055 // helper functions 00056 00058 double getSxy( int _nX, int _nY ); 00060 double getYMean(); 00061 00063 double getSStot(); 00065 double getSSerr(); 00067 double getPredictedY( double _x ); 00068 00071 double getDifferential( double _x ); 00072 00073 }; 00074 00075 #endif // QUADCURVEFIT_H