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

virtual int Impala::Visualization::GUI::ShotResultPreviewBar::GetImageKeyframeID ( int  rank  )  [inline, private, virtual]

Reimplemented from Impala::Visualization::GUI::PreviewBar.

Definition at line 162 of file ShotResultPreviewBar.h.

References Impala::Visualization::GUI::PreviewBar::debug, Impala::Core::VideoSet::Keyframes::GetShotRKF(), mKeyframes, mKeyResults, and mShotResults.

00163     {
00164         // ugly loop-implementation to allow for missing images:
00165         int foundrank = 0;
00166 
00167         if (mShotResults.size() > 0)
00168         {
00169             ShotResultList::iterator shot;
00170             for (shot=mShotResults.begin(); shot!=mShotResults.end(); shot++)
00171             {
00172                 int shotID = shot->shotid;
00173                 if (shotID >= 0)
00174                 {
00175                     if (rank == foundrank)
00176                     {
00177                         // we found our match:
00178                         int frameID = mKeyframes->GetShotRKF(shotID);
00179                         if (debug)
00180                             std::cout << "FOUND shot " << shotID
00181                                       << " translates into " << frameID
00182                                       << std::endl;
00183     
00184                         return frameID;
00185                     }
00186                     foundrank ++;
00187                 }
00188             }
00189         }
00190         else
00191         {
00192             KeyframeResultList::iterator shot;
00193             for (shot = mKeyResults.begin(); shot != mKeyResults.end(); shot++)
00194             {
00195                 int frameID = shot->keyframeid;
00196                 if (frameID >= 0)
00197                 {
00198                     if (rank == foundrank)
00199                     {
00200                         // we found our match:
00201                         std::cout << "FOUND shot " << frameID << std::endl;
00202                         return frameID;
00203                     }
00204                     foundrank ++;
00205                 }
00206             }
00207         }
00208         return -1;
00209     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:52:29 2010 for ImpalaSrc by  doxygen 1.5.1