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

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

Arrived at given DB_FILE in a "normal" walk.

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

Definition at line 64 of file ImportAudioConcepts.h.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::VideoSet::Keyframes::GetFirstKeyframeShot(), Impala::Core::VideoSet::Keyframes::GetFirstKeyframeVideo(), Impala::Core::VideoSet::Keyframes::GetFrameNr(), Impala::Persistency::RepositoryInFileSystem::GetInstance(), Impala::Core::Table::SimilarityTableSet::GetName(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesShot(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesVideo(), Impala::Core::Table::SimilarityTableSet::GetQuidTable(), Impala::Persistency::File::GetReadBuffer(), Impala::Core::VideoSet::Segmentation::GetShotIds(), Impala::Core::Table::SimilarityTableSet::GetSimTable(), ILOG_INFO, mConceptSet, mKeyframes, mSegmentation, mSimSet, Impala::Core::Table::SimilarityTableSet::NrTables(), and Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Set1().

00065     {
00066         String vidName = vs->GetFile(fileId);
00067         for (int c=0 ; c<mSimSet->NrTables() ; c++)
00068         {
00069             int startKey = mKeyframes->GetFirstKeyframeVideo(fileId);
00070             int nrKeys = mKeyframes->GetNrKeyframesVideo(fileId);
00071             if (c == 0)
00072             {
00073                 Table::QuidTable* qTable = mSimSet->GetQuidTable();
00074                 for (int k=0 ; k<nrKeys ; k++)
00075                 {
00076                     int frameNr = mKeyframes->GetFrameNr(startKey + k);
00077                     Quid quid = vs->GetQuidFrame(fileId, frameNr);
00078                     qTable->Add(quid);
00079                 }
00080             }
00081             String concept = mSimSet->GetName(c);
00082             SimTableType* table = mSimSet->GetSimTable(c);
00083             for (int k=0 ; k<nrKeys ; k++)
00084                 table->Add(0.0);
00085             String fName = "MetaData/similarities/" + mConceptSet + "/"
00086                 + vs->GetContainerFile(fileId) + "/" + concept + ".xml";
00087             ILOG_INFO("Reading " << fName);
00088             Persistency::File file =
00089                 Persistency::RepositoryInFileSystem::GetInstance().GetFile
00090                     (vs->GetLocator(), fName, false, false);
00091             Mpeg7DocAudio mp7(fName, file.GetReadBuffer());
00092             for (int s=0 ; s<mp7.NrSegments() ; s++)
00093             {
00094                 double sim = mp7.Confidence(s);
00095                 int startFrame = mp7.StartFrameReFraction(s, 25);
00096                 int endFrame = mp7.EndFrameReFraction(s, 25);
00097                 std::vector<int> shotList;
00098                 shotList = mSegmentation->GetShotIds(fileId, startFrame,
00099                                                      endFrame, 12);
00100                 for (int i=0 ; i<shotList.size() ; i++)
00101                 {
00102                     int shot = shotList[i];
00103                     int sKey = mKeyframes->GetFirstKeyframeShot(shot);
00104                     int nKey = mKeyframes->GetNrKeyframesShot(shot);
00105                     for (int k=sKey ; k<sKey+nKey ; k++) 
00106                         table->Set1(k, sim);
00107                 }
00108             }
00109         }
00110     }

Here is the call graph for this function:


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