Definition at line 1135 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(). 01136 { 01137 int oldCurFile = mCurFile; 01138 int conceptIdx = mSegDoc->GetConceptIdx(); 01139 01140 if (conceptIdx == -1 || conceptIdx == mCurConcept) 01141 return; 01142 ClearVideoAnnotations(); 01143 Segmentation* seg = mSegDoc->GetSegmentation(); 01144 int nrVideos = seg->GetNrVideos(); 01145 01146 ILOG_INFO("Reading Mpeg7 video annotations for concept " 01147 + mSegDoc->GetConcept(conceptIdx)); 01148 mSegDoc->CursorToDir(0); 01149 do { 01150 CheckLoadMpeg7(); 01151 printf("Video annotation %d of %d \r",mCurFile,nrVideos); 01152 int firstShot = seg->GetFirstShotVideo(mCurFile); 01153 int sz = seg->GetNrShotsVideo(mCurFile); 01154 int lastShot = firstShot+sz; 01155 VideoAnnotation* vidAnno = new VideoAnnotation(sz); 01156 mVideoAnnotations.push_back(vidAnno); 01157 for (int i=firstShot; i<lastShot; i++) 01158 { 01159 int kFrame = mKeyframes->GetShotRKF(i); 01160 int frame = mKeyframes->GetFrameNr(kFrame); 01161 int idx = mCurMpeg7->FindShot(frame); 01162 bool unknown = (idx==-1); 01163 float rel = unknown ? 0.5 : mCurMpeg7->Relevance(idx); 01164 bool positive = rel > 0.99; 01165 bool negative = rel < 0.01; 01166 bool skipped = !unknown && !positive && !negative; 01167 if (skipped) 01168 (*vidAnno)[i-firstShot] = SKIPPED_BIT; 01169 if (positive) 01170 (*vidAnno)[i-firstShot] = POSITIVE_BIT; 01171 if (negative) 01172 (*vidAnno)[i-firstShot] = NEGATIVE_BIT; 01173 } 01174 } while (mSegDoc->CursorNextFile()); 01175 mCurFile = -1; 01176 AllHandleNewCursor(mSegDoc->CursorToFile(oldCurFile), false); 01177 }
Here is the call graph for this function: ![]()
|