Definition at line 45 of file ShotSegmenterGUI.h. References Impala::Visualization::Plot::Plot::Add(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::Core::VideoSet::ShotSegmenter::GetCUTs(), Impala::Core::VideoSet::ShotSegmenter::GetDISs(), Impala::CmdOptions::GetDouble(), Impala::Core::VideoSet::ShotSegmenter::GetFOIs(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::Core::VideoSet::ShotSegmenter::GetOTHs(), Impala::Core::VideoSet::ShotSegmenter::GetPredictions(), Impala::Core::VideoSet::ShotSegmenter::GetProbThresh(), Impala::Core::VideoSet::ShotSegmenter::GetScores(), Impala::Visualization::AppControlSrc::GetSrc(), Impala::Core::VideoSet::ShotSegmenter::GetWeights(), OglGui::OglWindow::H(), Impala::Core::VideoSet::ShotSegmenter::HandleNewFile(), Impala::Visualization::AppController::Instance(), Impala::Core::Stream::RgbDataSrc::LastFrame(), Impala::Visualization::AppController::MainLoop(), mBlurDer, mBlurSigma, mCUTPlottable, mDecisionBoundary, mDecisionBoundaryPlottable, mDecisionRange, mDISPlottable, mDr, mFOIPlottable, OglGui::OglWindow::mOglWnd, mOTHPlottable, mPlotScale1, mPlotScale2, mPlotScale3, mPlotScale4, mPlotScale5, mPr, mPredictSrc, mProbsPlottable, mProcessRange, mScoresPlot, mScoresPlottable, mShotSeg, mVideoDecision, mVideoProcess, mWeights, mWeightsView, OglGui::OglWindow::SetAlwaysDraw(), OglGui::OglWindow::SetBackground(), Impala::Visualization::Plot::Plottable::SetColor(), Impala::Visualization::Plot::Line::SetData(), OglGui::Window::SetDisableGlobalKeyListener(), OglGui::Window::SetDisableOGLViewKeys(), Impala::Visualization::Plot::Line::SetDomain(), SetSource(), Impala::Core::Array::SetVal(), Impala::Visualization::VideoNav::SetVideoNavListener(), and OglGui::OglWindow::W(). 00046 : 00047 Window(x, y, SuggestWndWidth(1, 2*src->FrameWidth()+src->FrameHeight()) + 30, 00048 SuggestWndHeight(1, 2*src->FrameHeight())+30, mainIs2d), 00049 AppControlSrc(1) 00050 { 00051 //Get The Command line options 00052 CmdOptions& options = CmdOptions::GetInstance(); 00053 mBlurSigma = options.GetDouble("SSBlurSigma"); 00054 mBlurDer = options.GetInt("SSBlurDer"); 00055 mShotSeg = new ShotSegmenter(0,options); 00056 mShotSeg->HandleNewFile(0,0,src); 00057 00058 //Set the source 00059 SetSource(src); 00060 00061 //standart video navigation stuff 00062 mVideoDecision = new VideoNav(this,mPredictSrc); 00063 mVideoDecision->SetVideoNavListener(this); 00064 00065 new OglGui::Strut(this,src->FrameHeight()+5,1); 00066 00067 mVideoProcess = new VideoNav(this, src); 00068 mVideoProcess->SetVideoNavListener(this); 00069 00070 //Initialize plots and views 00071 int WindowWidth=W()-10; 00072 int HalfWindowWidth=WindowWidth/2; 00073 00074 /*mHistogramPlot = new Plot::Plot(this, 5, 175, 00075 HalfWindowWidth, 150); 00076 mHistogramPlottable = new Plot::Line(0, true); 00077 mHistogramPlottable->SetColor(0,0.5,1); 00078 mHistogramPlot->Add(mHistogramPlottable); 00079 00080 //Histogram from SrcWindow 00081 mHistogramPlotW = new Plot::Plot(this, HalfWindowWidth+10, 175, 00082 HalfWindowWidth, 150); 00083 mHistogramPlottableW = new Plot::Line(0, true); 00084 mHistogramPlottableW->SetColor(1,0.5,0); 00085 mHistogramPlotW->Add(mHistogramPlottableW); 00086 */ 00087 mScoresPlot = new Plot::Plot(this, 5, 30, 00088 W()-10,src->FrameHeight()-30); 00089 mScoresPlot->SetDisableGlobalKeyListener(false); 00090 mScoresPlot->SetDisableOGLViewKeys(false); 00091 00092 mScoresPlottable = new Plot::Line(0, true); 00093 mProbsPlottable = new Plot::Line(0, true); 00094 mCUTPlottable = new Plot::Line(0, true); 00095 mDISPlottable = new Plot::Line(0, true); 00096 mOTHPlottable = new Plot::Line(0, true); 00097 mFOIPlottable = new Plot::Line(0, true); 00098 mProcessRange = new Plot::Line(0, true); 00099 mDecisionRange = new Plot::Line(0, true); 00100 00101 mPlotScale1 = new Plot::Line(0, true); 00102 mPlotScale2 = new Plot::Line(0, true); 00103 mPlotScale3 = new Plot::Line(0, true); 00104 mPlotScale4 = new Plot::Line(0, true); 00105 mPlotScale5 = new Plot::Line(0, true); 00106 00107 mDecisionBoundaryPlottable = new Plot::Line(0, true); 00108 00109 mScoresPlot->Add(mPlotScale1); 00110 mScoresPlot->Add(mPlotScale2); 00111 mScoresPlot->Add(mPlotScale3); 00112 mScoresPlot->Add(mPlotScale4); 00113 mScoresPlot->Add(mPlotScale5); 00114 mScoresPlot->Add(mProcessRange); 00115 mScoresPlot->Add(mDecisionRange); 00116 mScoresPlot->Add(mScoresPlottable); 00117 mScoresPlot->Add(mProbsPlottable); 00118 mScoresPlot->Add(mCUTPlottable); 00119 mScoresPlot->Add(mDISPlottable); 00120 mScoresPlot->Add(mOTHPlottable); 00121 mScoresPlot->Add(mFOIPlottable); 00122 00123 mScoresPlot->Add(mDecisionBoundaryPlottable); 00124 mScoresPlot->SetBackground(0xff000000); 00125 00126 mScoresPlottable->SetDomain(0,src->LastFrame()); 00127 mProbsPlottable->SetDomain(0,src->LastFrame()); 00128 mCUTPlottable->SetDomain(0,src->LastFrame()); 00129 mDISPlottable->SetDomain(0,src->LastFrame()); 00130 mOTHPlottable->SetDomain(0,src->LastFrame()); 00131 mFOIPlottable->SetDomain(0,src->LastFrame()); 00132 mProcessRange->SetDomain(0,src->LastFrame()); 00133 mDecisionRange->SetDomain(0,src->LastFrame()); 00134 mPlotScale1->SetDomain(0,src->LastFrame()); 00135 mPlotScale2->SetDomain(0,src->LastFrame()); 00136 mPlotScale3->SetDomain(0,src->LastFrame()); 00137 mPlotScale4->SetDomain(0,src->LastFrame()); 00138 mPlotScale5->SetDomain(0,src->LastFrame()); 00139 mDecisionBoundaryPlottable->SetDomain(0,src->LastFrame()); 00140 00141 mScoresPlottable->SetColor(1,0,0);//Red 00142 mProbsPlottable->SetColor(1,1,0);//Yellow 00143 mCUTPlottable->SetColor(1,0.5,0);//Orange 00144 mDISPlottable->SetColor(0,1,0.5);//Green 00145 mOTHPlottable->SetColor(0,0.5,1);//Blue 00146 mFOIPlottable->SetColor(0.5,0,1);//Purple 00147 00148 mPlotScale1->SetColor(0.4,0.4,0.4); 00149 mPlotScale2->SetColor(0.4,0.4,0.4); 00150 mPlotScale3->SetColor(0.4,0.4,0.4); 00151 mPlotScale4->SetColor(0.4,0.4,0.4); 00152 mPlotScale5->SetColor(0.4,0.4,0.4); 00153 00154 mProcessRange->SetColor(1,1,1); 00155 mDecisionRange->SetColor(1,1,0); 00156 00157 mDecisionBoundaryPlottable->SetColor(0,1,0);//green 00158 00159 mDecisionBoundary = ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00160 SetVal(mDecisionBoundary,mShotSeg->GetProbThresh()); 00161 00162 mWeightsView=new View(mOglWnd, 00163 src->FrameWidth()+10, 00164 this->H()-src->FrameHeight()-3, 00165 src->FrameHeight(), 00166 src->FrameHeight(),1,true,true,true); 00167 00168 mWeights = mShotSeg->GetWeights(); 00169 00170 mScoresPlottable->SetData(mShotSeg->GetScores()); 00171 00172 mProbsPlottable->SetData(mShotSeg->GetPredictions()); 00173 mCUTPlottable->SetData(mShotSeg->GetCUTs()); 00174 mDISPlottable->SetData(mShotSeg->GetDISs()); 00175 mOTHPlottable->SetData(mShotSeg->GetOTHs()); 00176 mFOIPlottable->SetData(mShotSeg->GetFOIs()); 00177 00178 mDecisionBoundaryPlottable->SetData(mDecisionBoundary); 00179 Array2dScalarReal64* s1=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00180 Array2dScalarReal64* s2=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00181 Array2dScalarReal64* s3=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00182 Array2dScalarReal64* s4=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00183 Array2dScalarReal64* s5=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00184 mPr=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00185 mDr=ArrayCreate<Array2dScalarReal64>(GetSrc()->LastFrame(),1,0,0); 00186 00187 SetVal(s1,0.25); 00188 SetVal(s2,0.5); 00189 SetVal(s3,1.); 00190 SetVal(s4,2.); 00191 SetVal(s5,4.); 00192 SetVal(mPr,0); 00193 SetVal(mDr,0); 00194 00195 mPlotScale1->SetData(s1); 00196 mPlotScale2->SetData(s2); 00197 mPlotScale3->SetData(s3); 00198 mPlotScale4->SetData(s4); 00199 mPlotScale5->SetData(s5); 00200 mProcessRange->SetData(mPr); 00201 mDecisionRange->SetData(mDr); 00202 00203 00204 00205 #ifdef OGL_USING_GLUT 00206 SetAlwaysDraw(); // UpdateScene() doesn't work. 00207 #endif 00208 AppController::Instance().MainLoop(); 00209 00210 }
Here is the call graph for this function:
|