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

virtual void Impala::Core::VideoSet::ExportConcepts::HandleDoneFile ( VideoSet vs,
int  fileId,
Stream::RgbDataSrc src 
) [inline, virtual]

Completed given DB_FILE in a "normal" walk.

Reimplemented from Impala::Core::VideoSet::Listener.

Definition at line 56 of file ExportConcepts.h.

References Impala::Core::VideoSet::Mpeg7Doc::AddAnnotation(), Impala::Core::Feature::FeatureDefinition::AsString(), Impala::Core::Feature::FeatureDefinition::Empty(), Impala::Core::Stream::RgbDataSrc::FrameRateDen(), Impala::Core::Stream::RgbDataSrc::FrameRateNum(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::VideoSet::Segmentation::GetNrFramesVideo(), ILOG_DEBUG, ILOG_ERROR, ILOG_INFO, ILOG_NDC_POP, ILOG_NDC_PUSH, Impala::MakeString(), mConceptFileName, mFeatureDef, mFractions, mModel, Impala::Core::VideoSet::Mpeg7DocWrite(), mSegmentation, mWalkType, Impala::QUID_CLASS_FRAME, Impala::QuidClass(), Impala::QuidId(), Impala::Core::VideoSet::Mpeg7Doc::SetAnnoIsConcept(), and Impala::Core::Table::Table::Size().

00057     {
00058         if ((mSegmentation == 0))
00059         {
00060             ILOG_ERROR("Need segmentation");
00061             return;
00062         }
00063         int frameRateNum = (src) ? src->FrameRateNum() : 0;
00064         int frameRateDen = (src) ? src->FrameRateDen() : 0;
00065         String subDir = (mFeatureDef.Empty()) ? "" : mFeatureDef.AsString();
00066         SimilarityTableSetLocator loc(vs->GetLocator(), false, mWalkType,
00067                                       mConceptFileName, mModel, subDir,
00068                                       vs->GetContainer(fileId));
00069         SimilarityTableSet* simSet = SimilarityTableSetRepository().Get(loc);
00070 
00071         for (int c=0 ; c<simSet->NrTables() ; c++)
00072         {
00073             String concept = simSet->GetName(c);
00074             ILOG_INFO("doing concept " << concept);
00075             ILOG_NDC_PUSH(concept);
00076             SimilarityTableSet::SimTableType* table = simSet->GetSimTable(c);
00077             String fileName = vs->GetFile(fileId);
00078             ILOG_DEBUG("doing file " << fileName);
00079             String id = fileName;
00080             int nrFrames = mSegmentation->GetNrFramesVideo(fileId);
00081             Mpeg7Doc mp7(id, fileName, nrFrames, mFractions, false,
00082                          mConceptFileName, concept, frameRateNum, frameRateDen);
00083             mp7.SetAnnoIsConcept();
00084             for (int i=0 ; i<table->Size() ; i++)
00085             {
00086                 Quid quid = simSet->GetQuidTable()->Get1(i);
00087                 if (QuidClass(quid) != QUID_CLASS_FRAME)
00088                     ILOG_ERROR("Quid is not a frame");
00089                 int frameNr = QuidId(quid);
00090                 String name = "frame_" + MakeString(frameNr);
00091                 double sim = table->Get1(i);
00092                 mp7.AddAnnotation(concept, name, frameNr, frameNr, 1, sim);
00093             }
00094             Core::VideoSet::Mpeg7DocWrite(&mp7, vs, fileId);
00095             ILOG_NDC_POP;
00096         }
00097         delete simSet;
00098     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:50 2011 for ImpalaSrc by  doxygen 1.5.1