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

int Impala::Visualization::SegmentationDocumentGuiAnno::FindAdjacentAnnoShot ( int  curFile,
int  bit,
int  shotIdx,
bool  next 
) [inline]

Definition at line 349 of file SegmentationDocumentGuiAnno.h.

References Impala::Core::VideoSet::Segmentation::GetFirstShotVideo(), Impala::Core::VideoSet::Keyframes::GetFrameNr(), Impala::Core::VideoSet::Segmentation::GetNrShotsVideo(), Impala::Core::VideoSet::SegmentationDocument::GetSegmentation(), Impala::Core::VideoSet::Keyframes::GetShotRKF(), mKeyframes, mSegDoc, mVideoAnnotations, NEGATIVE_BIT, POSITIVE_BIT, SKIPPED_BIT, and UNKNOWN_BIT.

Referenced by CheckAnnoMax(), FindAdjacentAnnoShot(), FindNextAnno(), and GoToAdjacentAnnoShot().

00350     {
00351         if (curFile == -1) return -1;
00352 
00353         Segmentation* seg         = mSegDoc->GetSegmentation();
00354         int           firstShot   = seg->GetFirstShotVideo(curFile);
00355         int           sz          = seg->GetNrShotsVideo(curFile);
00356         int           lastShot    = firstShot+sz;
00357         int           foundShotNr = -1;
00358 
00359         for (int i=firstShot; i<lastShot; i++)
00360         {
00361             int   kFrame   = mKeyframes->GetShotRKF(i);
00362             int   frame    = mKeyframes->GetFrameNr(kFrame);
00363             int   val      = (*mVideoAnnotations[curFile])[i-firstShot];
00364             bool  unknown  = (val == 0);
00365             bool  skipped  = (val == SKIPPED_BIT);
00366             bool  positive = (val == POSITIVE_BIT);
00367             bool  negative = (val == NEGATIVE_BIT);
00368             bool  passTest = ((bit==POSITIVE_BIT) && positive ||
00369                              (bit==NEGATIVE_BIT) && negative ||
00370                              (bit==SKIPPED_BIT)  && skipped  ||
00371                              (bit==UNKNOWN_BIT)  && unknown);
00372             if (passTest && next && i > shotIdx)
00373                 return i;
00374             if (i!=shotIdx && passTest && !next)
00375                 foundShotNr = i;
00376             if (!next && i>=shotIdx)
00377                 return foundShotNr;
00378         }
00379         return foundShotNr;
00380     }

Here is the call graph for this function:


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