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::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 00116 for (int c=0 ; c<mAnnoShot->Size() ; c++) 00117 { 00118 String concept = mAnnoShot->GetLabel(c); 00119 #ifndef REPOSITORY_USED // Here comes the deprecated stuff 00120 String fName; 00121 fName = vs->GetFilePathMpeg7Anno(fileId, mConceptSet, 00122 concept + ".xml", false, true); 00123 if (fName.empty()) 00124 continue; 00125 00126 Mpeg7Doc mp7(fName, vs->GetDatabase()); 00127 for (int s=0 ; s<mp7.NrShots() ; s++) 00128 { 00129 mTotalNrAnno[c]++; 00130 int len = mp7.EndFrame(s) - mp7.StartFrame(s); 00131 if (len <= 1) 00132 mTotalNrSingleFrame[c]++; 00133 else 00134 mTotalNrFrames[c] += len; 00135 if (mp7.IsPositiveAnno(s)) 00136 { 00137 mTotalNrAnnoPos[c]++; 00138 if (len <= 1) 00139 mTotalNrSingleFramePos[c]++; 00140 else 00141 mTotalNrFramesPos[c] += len; 00142 } 00143 } 00144 if (mKeyframes) 00145 DoKeyframes(vs, fileId, c, &mp7); 00146 if (mSegmentation) 00147 DoShots(vs, fileId, c, &mp7); 00148 #else // REPOSITORY_USED 00149 String container = mConceptSet + "/" + vs->GetContainerFile(fileId); 00150 typedef Persistency::Mpeg7DocLocator MP7Loc; 00151 MP7Loc loc(vs->GetLocator(), MP7Loc::MPEG7_ANNOTATION, container, 00152 concept + ".xml"); 00153 if (!Persistency::Mpeg7DocRepository().Exists(loc)) 00154 continue; 00155 00156 Mpeg7Doc* mp7 = Persistency::Mpeg7DocRepository().Get(loc); 00157 for (int s=0 ; s<mp7->NrShots() ; s++) 00158 { 00159 mTotalNrAnno[c]++; 00160 int len = mp7->EndFrame(s) - mp7->StartFrame(s); 00161 if (len <= 1) 00162 mTotalNrSingleFrame[c]++; 00163 else 00164 mTotalNrFrames[c] += len; 00165 if (mp7->IsPositiveAnno(s)) 00166 { 00167 mTotalNrAnnoPos[c]++; 00168 if (len <= 1) 00169 mTotalNrSingleFramePos[c]++; 00170 else 00171 mTotalNrFramesPos[c] += len; 00172 } 00173 } 00174 if (mKeyframes) 00175 DoKeyframes(vs, fileId, c, mp7); 00176 if (mSegmentation) 00177 DoShots(vs, fileId, c, mp7); 00178 delete mp7; 00179 #endif // REPOSITORY_USED 00180 } 00181 }
Here is the call graph for this function:
|