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

void Impala::Core::VideoSet::Keyframes::WriteImageSets ( bool  writeIsUpdate = false  )  [inline]

Definition at line 340 of file Keyframes.h.

References Impala::Core::Database::RawDataSet::AddFile(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get4(), Impala::Core::Database::RawDataSet::GetAsPath(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetDirOfFile(), Impala::Core::Database::RawDataSet::GetFile(), GetFirstKeyframeShot(), Impala::Core::Database::RawDataSet::GetLocator(), GetNrKeyframesShot(), GetNrShots(), Impala::Core::Database::RawDataSet::GetSectionOfFile(), ILOG_ERROR, mVidSet, Impala::Core::ImageSet::ImageSet::SaveImageSet(), Impala::StringReplace(), UpdateGroups(), and Impala::Core::ImageSet::ImageSet::UpdateImageSet().

Referenced by Impala::Core::IDash::VideoSetWrapper::Add(), Impala::Core::Trec::TrecTopic::GenerateDataSets(), Impala::Core::VideoSet::ReadBlocksFile::HandleDoneWalk(), Impala::Core::VideoSet::IndexSegmentation::HandleDoneWalk(), and Impala::Core::Trec::Collection::WriteVideoSet().

00341     {
00342         UpdateGroups();
00343 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00344         ImageSet::ImageSet keySet(mVidSet->GetDatabase(), "keyframes.txt", false);
00345         ImageSet::ImageSet thumbSet(mVidSet->GetDatabase(), "thumbnails.txt", false);
00346 #else // REPOSITORY_USED
00347         ImageSet::ImageSet keySet("keyframes.txt");
00348         ImageSet::ImageSet thumbSet("thumbnails.txt");
00349 #endif // REPOSITORY_USED
00350         for (int s=0 ; s<GetNrShots() ; s++)
00351         {
00352             int start = GetFirstKeyframeShot(s);
00353             int end = start + GetNrKeyframesShot(s);
00354 
00355             //int vid = Get1(start);
00356             int vid = Get1(start) - Get1(0); // assume id's are contiguous
00357             String vidName = mVidSet->GetFile(vid);
00358             String vidSec = mVidSet->GetSectionOfFile(vid);
00359             String vidDir = mVidSet->GetDirOfFile(vid);
00360 
00361             String keySec = "keyframes/";
00362             if (Link::DiskImage::DiskImageUsed())
00363             {
00364                 String videoPath = mVidSet->GetAsPath(vid);
00365                 int posSep = videoPath.find_last_of('/');
00366                 keySec += videoPath.substr(0, posSep);
00367             }
00368             else
00369             {
00370                 keySec += vidSec + "/" + vidDir;
00371             }
00372 
00373             String thumbSec = StringReplace(keySec, "keyframes", "thumbnails");
00374             for (int k=start ; k<end ; k++)
00375             {
00376                 keySet.AddFile(Get4(k), keySec, vidName);
00377                 thumbSet.AddFile(Get4(k), thumbSec, vidName);
00378             }
00379         }
00380         if (writeIsUpdate)
00381         {
00382 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00383             keySet.UpdateImageSet();
00384             thumbSet.UpdateImageSet();
00385 #else // REPOSITORY_USED
00386             ILOG_ERROR("WriteImageSets: Update not implemented yet");
00387 #endif // REPOSITORY_USED
00388         }
00389         else
00390         {
00391 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00392             keySet.SaveImageSet();
00393             thumbSet.SaveImageSet();
00394 #else // REPOSITORY_USED
00395             Persistency::ImageSetLocator keyLoc(mVidSet->GetLocator(),
00396                                                 "keyframes.txt");
00397             Persistency::ImageSetRepository().Add(keyLoc, &keySet);
00398             Persistency::ImageSetLocator thumbLoc(mVidSet->GetLocator(),
00399                                                   "thumbnails.txt");
00400             Persistency::ImageSetRepository().Add(thumbLoc, &thumbSet);
00401 #endif // REPOSITORY_USED
00402         }
00403     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:30:12 2010 for ImpalaSrc by  doxygen 1.5.1