KINECT STATS GENERATOR FOR SPORTS VISUALISATION
1.0
|
00001 #ifndef MAINWINDOW_H 00002 #define MAINWINDOW_H 00003 00004 #include <QtGui/QMainWindow> 00005 #include <QGLContext> 00006 #include <QMdiArea> 00007 #include <QPushButton> 00008 #include <QComboBox> 00009 #include <QLabel> 00010 #include <QDoubleSpinBox> 00011 00012 #include "ExtendedQMdiSubWindow.h" 00013 #include "KinectInterface.h" 00014 00021 00022 class StatsVisualization; 00023 class BallPointsProcessing; 00024 class BallTrackingUtility; 00025 class BallTrackingVisualization; 00026 class DepthDebugVisualization; 00027 class RGBboundsVisualization; 00028 class PlayerData; 00029 00030 typedef enum 00031 { 00032 TRACKING_WINDOW, 00033 VISUALISATION_WINDOW 00034 }WHICH_WINDOW; 00035 00036 class MainWindow : public QMainWindow 00037 { 00038 Q_OBJECT 00039 public: 00042 MainWindow( 00043 QWidget *_parent = 0 00044 ); 00046 ~MainWindow(); 00047 00049 void deleteCurrentStatsvz(); 00050 00052 void deleteCurrentTrackingvz(); 00053 00055 void deleteCurrentRGBvz(); 00056 00058 void deleteCurrentDepthvz(); 00059 00060 private slots : 00061 00063 void setTrackingFlag(); 00065 void setWhichStatToView(int _whichStat); 00067 void setWhoseStatToView(int _whoseStat); 00068 00070 void readFile(); 00071 00073 void processTrackingData(); 00074 00076 void buildImportWindowSetUp(); 00077 00079 void buildLiveWindowSetUp(); 00080 00082 void buildTrackingVzWindowSetUp(); 00083 00084 protected : 00087 void keyPressEvent( 00088 QKeyEvent *_event 00089 ); 00092 00093 void resizeEvent ( 00094 QResizeEvent * _event 00095 ); 00096 00097 private: 00099 QMdiArea *m_mdiArea; 00100 00102 KinectInterface *m_kinect; 00103 00105 QToolBar *m_toolbar,*m_toolbarOrig, *m_toolBarStart,*m_toolbarImport,*m_toolbarPlayer; 00106 00107 // live system tools 00108 QPushButton *m_startTracking; 00109 QPushButton *processStats; 00110 QPushButton *m_writeFile; 00111 QComboBox *m_quadSelection; 00112 QComboBox *m_playerSelection; 00113 QComboBox *m_statsSelection; 00114 00115 00116 // to setup the system 00117 QLabel *m_lowerDepthLabel; 00118 QDoubleSpinBox *m_depthVolumeLowerThresh; 00119 QLabel *m_higherDepthLabel; 00120 QDoubleSpinBox *m_depthVolumeHigherThresh; 00121 QLabel *m_lowerBinLabel; 00122 QDoubleSpinBox *m_binLowerSpinBox; 00123 QLabel *m_cannyLowerLabel; 00124 QDoubleSpinBox *m_cannyLowerSpinBox; 00125 QLabel *m_cannyHigherLabel; 00126 QDoubleSpinBox *m_cannyHigherSpinBox; 00127 QLabel *m_contourAreaLabel; 00128 QDoubleSpinBox *m_contourAreaThresh; 00129 QLabel *m_impPointDepthMinLabel; 00130 QDoubleSpinBox *m_impactPtMinDepth; 00131 QLabel *m_impPointDepthMaxLabel; 00132 QDoubleSpinBox *m_impactPtMaxDepth; 00133 QLabel *m_diffAreaLabel; 00134 QDoubleSpinBox *m_diffAreaThresh; 00135 QLabel *m_ellipseLabel; 00136 QSlider *m_ellipseSize; 00137 QLabel *m_blurLabel; 00138 QSlider *m_blurSize; 00139 QLabel *m_dialationLabel; 00140 QSlider *m_dialation; 00141 QLabel *m_choosePlayerLabel; 00142 QLabel *m_chooseStatsLabel; 00143 QLabel *m_chooseCourtSideLabel; 00144 QLabel *m_distanceToTableLabel; 00145 QDoubleSpinBox *m_kinectToPlayArea; 00146 QLabel *m_diameterBallLabel; 00147 QDoubleSpinBox *m_diameterOfBall; 00148 00150 StatsVisualization *m_vz; 00151 BallPointsProcessing *m_processingUtility; 00152 BallTrackingUtility *m_trackingInBackground; 00153 BallTrackingVisualization *m_trackingInForeground; 00154 DepthDebugVisualization *m_depthVz; 00155 RGBboundsVisualization *m_rgb; 00156 PlayerData *m_playerA,*m_playerB; 00157 00158 bool m_liveWindowBuilt; 00159 00161 void killExistingWindows(); 00162 00164 void setImportToolBarVisibility(bool _visibility); 00166 void setLiveStartUpToolBarVisibility(bool _visibility); 00168 void setLiveSetUpToolBarVisibility(bool _visibility); 00169 00171 void setPlayerToolBarVisibility(bool _visibility); 00172 00173 00174 }; 00175 00176 00177 00178 #endif // MAINWINDOW_H