00001 #ifndef MAINFRAME_H 00002 #define MAINFRAME_H 00003 00004 #include <QMainWindow> 00005 #include <QtGui> 00006 #include <QDir> 00007 #include <QStringList> 00008 //#include <iostream> 00009 //#include <math.h> 00010 #include <vector> 00011 00012 #include "cv.h" 00013 #include "highgui.h" 00014 #include "ui_mainFrame.h" 00015 #include "dialogMatrix.h" 00016 #include "preprocess.h" 00017 #include "segmentation.h" 00018 #include "blobs.h" 00019 #include "tracking.h" 00020 00024 class MainFrame : public QMainWindow { 00025 Q_OBJECT 00026 00027 public: 00032 MainFrame(QWidget *parent = 0, Qt::WFlags flags = 0); 00033 //~MainFrame(); 00034 00035 protected: 00039 void closeEvent(QCloseEvent *event); 00040 private slots: 00041 /**** Open Menu ****/ 00043 void openDir(); 00044 00045 /**** Predefined Menu ****/ 00047 void loadPreLaplace4(); 00049 void loadPreLaplace8(); 00051 void loadPreSobelX(); 00053 void loadPreSobelMin(); 00055 void loadPreGaussianLoG(); 00057 void loadPreLoG(); 00059 void loadPreThres(); 00061 void loadPreCanny(); 00063 void initPre(); 00065 void loadSegContourThres(); 00067 void loadSegContourSnake(); 00069 void loadSegHoughStdCanny(); 00071 void loadSegHoughProCanny(); 00073 void loadSegScaleSpace(); 00075 void loadSegScaleSpaceThres(); 00077 void loadSegBlobsThres(); 00079 void loadSegBlobsCanny(); 00081 void initSeg(); 00082 00083 /**** Matrix filter Menu ****/ 00085 void openDialogMatrix(); 00086 00087 /**** Help Menu ****/ 00089 void showAbout(); 00090 00091 /**** Image sequence Panel ****/ 00093 void loadImageSeq(); 00095 void loadAutoSeq(); 00097 void loadStepSeq(); 00099 void loadBackSeq(); 00101 void loadNextSeq(); 00102 00103 /**** Contour check ****/ 00105 void changeContourCheck(bool); 00106 /**** Hough Area ****/ 00108 void changeHoughParam(int); 00109 /**** Blob Area ****/ 00111 void changeBlobToTrack(bool); 00113 void changeBlobKalmanOpts(bool); 00114 /**** Kalman Area ****/ 00116 void addKalmanPrediction(); 00118 void addKalmanBlobPrediction(); 00120 void updateKalmanPrediction(); 00122 void updateKalmanBlobPrediction(); 00124 void clearKalman(); 00126 void clearBlobKalman(); 00127 private: 00129 Ui::mainFrameClass ui; 00131 void initFilterMatrix(); 00133 QStringList loadSeq(); 00135 void clearCommonKalman(); 00139 void loadStepImage(int imageListCount); 00140 //void ableOptions(); 00141 //void disableOptions(); 00143 void ableStepOptions(); 00145 void disableStepOptions(); 00149 IplImage* paintCutImage(IplImage* src); 00150 00152 QString qPathLoaded; 00154 int closeCvWindow; 00156 QStringList fileList; 00158 CBlobResult filterBlobs; 00160 CBlob blobBegin; 00162 QString sSeparator; 00164 int iStepFrame; 00165 00167 IplImage* getGrayImage(IplImage*); 00169 void getDlgMatrixValues(); 00171 float filterData[9]; 00173 dialogMatrix dlgMat; 00175 static Tracking track; 00177 static void onMouseSelect(int event, int x, int y, int flags, void* param); 00179 static void onMouseUpdate(int event, int x, int y, int flags, void* param); 00180 }; 00181 00182 #endif
1.6.2