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

virtual void Impala::Core::VideoSet::IndexAnnotation::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 105 of file IndexAnnotation.h.

References DoKeyframes(), DoShots(), Impala::Core::VideoSet::Mpeg7Doc::EndFrame(), Impala::Core::Stream::RgbDataSrc::FrameRateDen(), Impala::Core::Stream::RgbDataSrc::FrameRateNum(), Impala::Core::Table::AnnotationTableSet::GetLabel(), ILOG_ERROR, Impala::Core::VideoSet::Mpeg7Doc::IsPositiveAnno(), mAnnoExtra, mAnnoShot, mConceptSet, mKeyframes, mQuidExtra, mSegmentation, mTotalNrAnno, mTotalNrAnnoPos, mTotalNrFrames, mTotalNrFramesPos, mTotalNrSingleFrame, mTotalNrSingleFramePos, Impala::Core::VideoSet::Mpeg7Doc::NrShots(), Impala::Core::Table::AnnotationTableSet::Size(), and Impala::Core::VideoSet::Mpeg7Doc::StartFrame().

00106     {
00107         if (mAnnoExtra && (!(mKeyframes && mSegmentation)))
00108         {
00109             ILOG_ERROR("Need keyframes and segmentation for extra annotations");
00110             delete mAnnoExtra;
00111             mAnnoExtra = 0;
00112             delete mQuidExtra;
00113             mQuidExtra = 0;
00114         }
00115         int frameRateNum = (src) ? src->FrameRateNum() : 0;
00116         int frameRateDen = (src) ? src->FrameRateDen() : 0;
00117 
00118         for (int c=0 ; c<mAnnoShot->Size() ; c++)
00119         {
00120             String concept = mAnnoShot->GetLabel(c);
00121             String container = mConceptSet + "/" + vs->GetContainerFile(fileId);
00122             typedef Persistency::Mpeg7DocLocator MP7Loc;
00123             MP7Loc loc(vs->GetLocator(), MP7Loc::MPEG7_ANNOTATION, container,
00124                        concept + ".xml");
00125             if (!Persistency::Mpeg7DocRepository().Exists(loc))
00126                 continue;
00127 
00128             Mpeg7Doc* mp7 = Persistency::Mpeg7DocRepository().Get(loc);
00129             for (int s=0 ; s<mp7->NrShots() ; s++)
00130             {
00131                 mTotalNrAnno[c]++;
00132                 int len = mp7->EndFrame(s) - mp7->StartFrame(s);
00133                 if (len <= 1)
00134                     mTotalNrSingleFrame[c]++;
00135                 else
00136                     mTotalNrFrames[c] += len;
00137                 if (mp7->IsPositiveAnno(s))
00138                 {
00139                     mTotalNrAnnoPos[c]++;
00140                     if (len <= 1)
00141                         mTotalNrSingleFramePos[c]++;
00142                     else
00143                         mTotalNrFramesPos[c] += len;
00144                 }
00145             }
00146             if (mKeyframes)
00147                 DoKeyframes(vs, fileId, c, mp7);
00148             if (mSegmentation)
00149                 DoShots(vs, fileId, c, mp7);
00150             delete mp7;
00151         }
00152     }

Here is the call graph for this function:


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