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

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

Definition at line 131 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().

00132 {
00133     ILOG_VAR(Impala.Application.VidSet.MakeVideoTaskTableByFrames);
00134     CmdOptions& options = CmdOptions::GetInstance();
00135     int startFile = options.GetInt("startFile");
00136     int numberFiles = options.GetInt("numberFiles");
00137     int stepSize = options.GetInt("stepSize");
00138     int numberFrames = options.GetInt("numberFrames");
00139     Segmentation* segmentation = walker->GetSegmentation();
00140     if (segmentation == 0)
00141     {
00142         ILOG_ERROR("Need segmentation");
00143         return 0;
00144     }
00145     if (numberFiles == -1)
00146         numberFiles = videoSet->NrFiles();
00147     if (startFile + numberFiles >= videoSet->NrFiles())
00148         numberFiles = videoSet->NrFiles() - startFile;
00149     int curFile = startFile;
00150     int curFrame = 0;
00151     TaskTable* taskTable = new TaskTable();
00152     while (numberFiles > 0)
00153     {
00154         taskTable->Add(curFile, 1, curFrame);
00155         curFrame += numberFrames * stepSize;
00156         if (curFrame > segmentation->GetNrFramesVideo(curFile))
00157         {
00158             curFrame = 0;
00159             curFile++;
00160             numberFiles--;
00161         }
00162     }
00163     return taskTable;
00164 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:55:36 2010 for ImpalaSrc by  doxygen 1.5.1