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

void Impala::Visualization::SegmentationDocumentGuiAnno::DoAnno ( double  relevance,
bool  isShot 
) [inline, private]

Definition at line 942 of file SegmentationDocumentGuiAnno.h.

References AnnoStats(), CheckAnnoMax(), Impala::FileNameBase(), FindSegFrameShot(), Impala::Core::VideoSet::Mpeg7Doc::FindShot(), Impala::Core::Database::DataDocument::GetConcept(), Impala::Core::VideoSet::Segmentation::GetFirstShotVideo(), Impala::Core::VideoSet::Keyframes::GetFrameNr(), Impala::Core::VideoSet::Keyframes::GetName(), Impala::Core::VideoSet::SegmentationDocument::GetSegmentation(), GoForw(), Impala::Core::VideoSet::SegmentationDocument::HasCurShot(), mCurFile, mCurKey, mCurMpeg7, mCurMpeg7Changed, mCurRankShot, mCurShotFrames, mKeyframes, mRankingMode, mSegDoc, mVideoAnnotations, Impala::Core::VideoSet::Mpeg7Doc::Relevance(), Relevance2Bit(), RelevanceStats(), Impala::Core::VideoSet::Mpeg7Doc::ReplaceAnnotationEx(), ToAnnoHistory(), and UpdateRelevance().

Referenced by ButtonSelectionEvent(), and HandleNewKey().

00943     {
00944         if (!mSegDoc->HasCurShot() || !mCurMpeg7)
00945             return;
00946         String  name      = FileNameBase(mKeyframes->GetName(mCurKey));
00947         int     frameNr   = mKeyframes->GetFrameNr(mCurKey);
00948         bool    empty     = mCurShotFrames.empty();
00949         int     sz        = mCurShotFrames.size();
00950         int     shotStart = (empty||!isShot) ? frameNr : mCurShotFrames[0];
00951         int     shotEnd   = (empty||!isShot) ? frameNr : mCurShotFrames[sz-1];
00952 
00953         int oldIdx = mCurMpeg7->FindShot(frameNr);
00954         if (oldIdx!=-1)
00955             RelevanceStats(mCurMpeg7->Relevance(oldIdx),-1);
00956 
00957         char buf[80];
00958         sprintf(buf, "%s_frame%d_%d", name.c_str(),shotStart,shotEnd);
00959         int idx = mCurMpeg7->ReplaceAnnotationEx(mSegDoc->GetConcept(),
00960                                                  isShot?buf:name,
00961                                                  frameNr,shotStart,
00962                                                  shotEnd,relevance,1);
00963 
00964         Segmentation* seg = mSegDoc->GetSegmentation();
00965         int shot = FindSegFrameShot(frameNr) - seg->GetFirstShotVideo(mCurFile);
00966         (*mVideoAnnotations[mCurFile])[shot] = Relevance2Bit(relevance); 
00967 
00968         mCurMpeg7Changed = true;
00969         ToAnnoHistory(mCurFile, frameNr, mCurRankShot);
00970         AnnoStats(idx, relevance);
00971         UpdateRelevance();
00972         if (!CheckAnnoMax() || !mRankingMode)
00973             GoForw(false);
00974     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:59 2011 for ImpalaSrc by  doxygen 1.5.1