Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

TaskTable* Impala::Application::VidSet::MakeVideoTaskTableByFrames ( VideoSet *  videoSet,
Walker *  walker 
)

Definition at line 144 of file mainVidSet.cpp.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::Core::VideoSet::Segmentation::GetNrFramesVideo(), Impala::Core::VideoSet::Walker::GetSegmentation(), ILOG_ERROR, ILOG_VAR, and Impala::Core::Database::RawDataSet::NrFiles().

Referenced by MakeVideoTaskTable().

00145 {
00146     ILOG_VAR(Impala.Application.VidSet.MakeVideoTaskTableByFrames);
00147     CmdOptions& options = CmdOptions::GetInstance();
00148     int startFile = options.GetInt("startFile");
00149     int numberFiles = options.GetInt("numberFiles");
00150     int stepSize = options.GetInt("stepSize");
00151     int numberFrames = options.GetInt("numberFrames");
00152     Segmentation* segmentation = walker->GetSegmentation();
00153     if (segmentation == 0)
00154     {
00155         ILOG_ERROR("Need segmentation");
00156         return 0;
00157     }
00158     if (numberFiles == -1)
00159         numberFiles = videoSet->NrFiles();
00160     if (startFile + numberFiles >= videoSet->NrFiles())
00161         numberFiles = videoSet->NrFiles() - startFile;
00162     int curFile = startFile;
00163     int curFrame = 0;
00164     TaskTable* taskTable = new TaskTable();
00165     while (numberFiles > 0)
00166     {
00167         taskTable->Add(curFile, 1, curFrame);
00168         curFrame += numberFrames * stepSize;
00169         if (curFrame > segmentation->GetNrFramesVideo(curFile))
00170         {
00171             curFrame = 0;
00172             curFile++;
00173             numberFiles--;
00174         }
00175     }
00176     return taskTable;
00177 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:56 2011 for ImpalaSrc by  doxygen 1.5.1