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

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

Definition at line 967 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().

00968     {
00969         if (!mSegDoc->HasCurShot() || !mCurMpeg7)
00970             return;
00971         String  name      = FileNameBase(mKeyframes->GetName(mCurKey));
00972         int     frameNr   = mKeyframes->GetFrameNr(mCurKey);
00973         bool    empty     = mCurShotFrames.empty();
00974         int     sz        = mCurShotFrames.size();
00975         int     shotStart = (empty||!isShot) ? frameNr : mCurShotFrames[0];
00976         int     shotEnd   = (empty||!isShot) ? frameNr : mCurShotFrames[sz-1];
00977 
00978         int oldIdx = mCurMpeg7->FindShot(frameNr);
00979         if (oldIdx!=-1)
00980             RelevanceStats(mCurMpeg7->Relevance(oldIdx),-1);
00981 
00982         char buf[80];
00983         sprintf(buf, "%s_frame%d_%d", name.c_str(),shotStart,shotEnd);
00984         int idx = mCurMpeg7->ReplaceAnnotationEx(mSegDoc->GetConcept(),
00985                                                  isShot?buf:name,
00986                                                  frameNr,shotStart,
00987                                                  shotEnd,relevance,1);
00988 
00989         Segmentation* seg = mSegDoc->GetSegmentation();
00990         int shot = FindSegFrameShot(frameNr) - seg->GetFirstShotVideo(mCurFile);
00991         (*mVideoAnnotations[mCurFile])[shot] = Relevance2Bit(relevance); 
00992 
00993         mCurMpeg7Changed = true;
00994         ToAnnoHistory(mCurFile, frameNr, mCurRankShot);
00995         AnnoStats(idx, relevance);
00996         UpdateRelevance();
00997         if (!CheckAnnoMax() || !mRankingMode)
00998             GoForw(false);
00999     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:46:45 2010 for ImpalaSrc by  doxygen 1.5.1