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

void Impala::Visualization::RotorBrowser::RotorBrowserGUI::AddVisualToBrowser (  )  [inline, private]

Definition at line 365 of file RotorBrowserGUI.h.

References Impala::Core::Trec::ThreadSet::AddThreadShots(), Impala::Core::Trec::ThreadSet::GetKeyframes(), ILOG_DEBUG, ILOG_WARN, Impala::MakeString(), mLastVisualKeyframe, mLastVisualKeyframes, mLastVisualMode, mThreadSet, and Impala::Core::Trec::VisualQueryEngine::QueryVisual().

Referenced by ImageSelectionEvent().

00366     {
00367         if (mLastVisualMode == 1)
00368         {
00369             ILOG_DEBUG( "adding last query by region result to browser" );
00370             std::list<ShotResult> shots;
00371             std::map<int,bool> seen;
00372             int lastshot = mThreadSet->GetKeyframes()
00373                                 ->GetShotId(mLastVisualKeyframe);
00374             for (KeyframeResultList::iterator i = mLastVisualKeyframes.begin();
00375                  i != mLastVisualKeyframes.end(); i++)
00376             {
00377                 ShotResult r;
00378                 int frameID = i->keyframeid;
00379                 if (frameID == -1)
00380                 {
00381                     ILOG_WARN("AddVisualToBrowser: " <<
00382                               "WARNING: erroneous frame in set." );
00383                     continue;
00384                 }
00385                 int shotID = mThreadSet->GetKeyframes()->GetShotId(frameID);
00386                 if (seen.find(shotID) == seen.end())
00387                 {
00388                     r.shotid = shotID;
00389                     r.score = i->score;
00390                     r.rank = i->rank;
00391                     shots.push_back(r);
00392                     seen[shotID] = true;
00393                 }
00394             }
00395             mThreadSet->AddThreadShots("visual " + MakeString(lastshot), shots);
00396         }
00397         else
00398         {
00399             ILOG_DEBUG( "adding last visually similar result to browser" );
00400             VisualQueryEngine *e = new VisualQueryEngine(mThreadSet, 200);
00401             int lastVis = mLastVisualKeyframe;
00402             KeyframeResultList shots = e->QueryVisual(lastVis,true);
00403             int lastshot = mThreadSet->GetKeyframes()->GetShotId(lastVis);
00404             mThreadSet->AddThreadShots("visual " + MakeString(lastVis), shots);
00405         }
00406     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:25:56 2011 for ImpalaSrc by  doxygen 1.5.1