Definition at line 1175 of file SegmentationDocumentGuiAnno.h. References Impala::Visualization::AppControlDoc::AllHandleNewCursor(), CheckLoadMpeg7(), ClearVideoAnnotations(), Impala::Core::VideoSet::SegmentationDocument::CursorNextFile(), Impala::Core::VideoSet::SegmentationDocument::CursorToDir(), Impala::Core::VideoSet::SegmentationDocument::CursorToFile(), Impala::Core::VideoSet::Mpeg7Doc::FindShot(), Impala::Core::Database::DataDocument::GetConcept(), Impala::Core::Database::DataDocument::GetConceptIdx(), Impala::Core::VideoSet::Segmentation::GetFirstShotVideo(), Impala::Core::VideoSet::Keyframes::GetFrameNr(), Impala::Core::VideoSet::Segmentation::GetNrShotsVideo(), Impala::Core::VideoSet::Segmentation::GetNrVideos(), Impala::Core::VideoSet::SegmentationDocument::GetSegmentation(), Impala::Core::VideoSet::Keyframes::GetShotRKF(), ILOG_INFO, mCurConcept, mCurFile, mCurMpeg7, mKeyframes, mSegDoc, mVideoAnnotations, NEGATIVE_BIT, POSITIVE_BIT, Impala::Core::VideoSet::Mpeg7Doc::Relevance(), and SKIPPED_BIT. Referenced by HandleNewConcept(). 01176 { 01177 int oldCurFile = mCurFile; 01178 int conceptIdx = mSegDoc->GetConceptIdx(); 01179 01180 if (conceptIdx == -1 || conceptIdx == mCurConcept) 01181 return; 01182 ClearVideoAnnotations(); 01183 Segmentation* seg = mSegDoc->GetSegmentation(); 01184 int nrVideos = seg->GetNrVideos(); 01185 01186 ILOG_INFO("Reading Mpeg7 video annotations for concept " 01187 + mSegDoc->GetConcept(conceptIdx)); 01188 mSegDoc->CursorToDir(0); 01189 do { 01190 CheckLoadMpeg7(); 01191 printf("Video annotation %d of %d \r",mCurFile,nrVideos); 01192 int firstShot = seg->GetFirstShotVideo(mCurFile); 01193 int sz = seg->GetNrShotsVideo(mCurFile); 01194 int lastShot = firstShot+sz; 01195 VideoAnnotation* vidAnno = new VideoAnnotation(sz); 01196 mVideoAnnotations.push_back(vidAnno); 01197 for (int i=firstShot; i<lastShot; i++) 01198 { 01199 int kFrame = mKeyframes->GetShotRKF(i); 01200 int frame = mKeyframes->GetFrameNr(kFrame); 01201 int idx = mCurMpeg7->FindShot(frame); 01202 bool unknown = (idx==-1); 01203 float rel = unknown ? 0.5 : mCurMpeg7->Relevance(idx); 01204 bool positive = rel > 0.99; 01205 bool negative = rel < 0.01; 01206 bool skipped = !unknown && !positive && !negative; 01207 if (skipped) 01208 (*vidAnno)[i-firstShot] = SKIPPED_BIT; 01209 if (positive) 01210 (*vidAnno)[i-firstShot] = POSITIVE_BIT; 01211 if (negative) 01212 (*vidAnno)[i-firstShot] = NEGATIVE_BIT; 01213 } 01214 } while (mSegDoc->CursorNextFile()); 01215 mCurFile = -1; 01216 AllHandleNewCursor(mSegDoc->CursorToFile(oldCurFile), false); 01217 }
Here is the call graph for this function:
|