Home || Architecture || Video Search || Visual Search || Scripts || Applications || 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 70 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::Core::Table::SimilarityTableSet::GetName(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesShot(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesVideo(), Impala::Core::Table::SimilarityTableSet::GetQuidTable(), 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().

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

Here is the call graph for this function:


Generated on Fri Mar 19 11:29:20 2010 for ImpalaSrc by  doxygen 1.5.1