KINECT STATS GENERATOR FOR SPORTS VISUALISATION
1.0
|
00001 #ifndef THREEDSTATSGENERATION_H 00002 #define THREEDSTATSGENERATION_H 00003 00004 /* 00005 LICENSING: You are free to use any part of this project provided I am informed about it via email 00006 at santoshwins@hotmail.com and referenced appropriately in your works 00007 */ 00008 00009 #include "opencv2/opencv.hpp" 00010 #include "QuadCurveFitUtility.h" 00011 00018 00019 class ThreeDStatsGeneration 00020 { 00021 public: 00023 ThreeDStatsGeneration(); 00025 ~ThreeDStatsGeneration(); 00026 00034 void generatePitchDensityGraphData(cv::Point& _userDefinedTopXY, int _userDefinedWidth, int _userDefinedHeight, 00035 int _gridResolution, 00036 std::vector<cv::Point> &_playerImpactPtsAllRallies, 00037 std::vector<cv::Point3f>& o_verticesSetOfCubeBarsGraph); 00038 00045 void generateInterpolatedDataForAllRallies(std::vector<std::vector<cv::Point3f> > &_inputPlayerBallPts, 00046 std::vector<std::vector<int> > &_playerDeepestPtIndices, 00047 float _inputDistanceFrmKinectToPlayArea, 00048 std::vector<std::vector<cv::Point3f> > &o_interpPlayerBallPts, 00049 std::vector<float> &o_speedData); 00050 00055 void calculatePlayerImpactPtsIn3DFromIndices(std::vector<std::vector<cv::Point3f> > &_inputPlayerBallPts, 00056 std::vector<std::vector<int> > &_playerDeepestPtIndices, 00057 std::vector<cv::Point3f> &o_playerImpactPtsAllRallies3D); 00058 00059 00060 private: 00062 QuadCurveFitUtility *m_quadFitX,*m_quadFitY,*m_quadFitZ; 00063 00068 void convertToWorldFromScreen(std::vector<cv::Point3f>& _inputPointVec, 00069 std::vector<cv::Point3f>& o_PointsInWorld, 00070 float _inputDistanceFrmKinectToPlayArea); 00071 00072 }; 00073 00074 00075 #endif // 3DSTATSGENERATION_H