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

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

Definition at line 409 of file RotorBrowserGUI.h.

References Impala::Core::Trec::ThreadSet::AddThreadShots(), Impala::Core::Trec::ThreadSet::GetKeyframes(), ILOG_DEBUG, ILOG_WARN, mLastVisualKeyframe, mLastVisualKeyframes, mLastVisualMode, mRotorBrowser, mThreadSet, Impala::Core::Trec::VisualQueryEngine::QueryVisual(), Impala::Visualization::RotorBrowser::RotorBrowser::ReloadCrossBrowser(), and Impala::Core::Trec::ThreadSet::RemoveThread().

Referenced by ImageSelectionEvent().

00410     {
00411         if (mLastVisualMode == 1)
00412         {
00413             ILOG_DEBUG("setting shots_initialquery to " <<
00414                        "last query by region result");
00415             mThreadSet->RemoveThread("shots_initialquery");
00416             std::list<ShotResult> shots;
00417             std::map<int,bool> seen;
00418             for (KeyframeResultList::iterator i=mLastVisualKeyframes.begin();
00419                  i !=mLastVisualKeyframes.end(); i++)
00420             {
00421                 ShotResult r;
00422                 int frameID = i->keyframeid;
00423                 if (frameID == -1)
00424                 {
00425                     ILOG_WARN( "SetInitialQueryToVisual: " <<
00426                                "WARNING: erroneous frame in set." );
00427                     continue;
00428                 }
00429                 int shotID = mThreadSet->GetKeyframes()->GetShotId(frameID);
00430                 if (seen.find(shotID) == seen.end())
00431                 {
00432                     r.shotid = shotID;
00433                     r.score = i->score;
00434                     r.rank = i->rank;
00435                     shots.push_back(r);
00436                     seen[shotID] = true;
00437                 }
00438             }
00439             mThreadSet->AddThreadShots("initialquery", shots);
00440             mRotorBrowser->ReloadCrossBrowser();
00441         }
00442         else
00443         {
00444             ILOG_DEBUG("setting shots_initialquery to " <<
00445                        "last visually similar result" );
00446             mThreadSet->RemoveThread("shots_initialquery");
00447             VisualQueryEngine *e = new VisualQueryEngine(mThreadSet, 200);
00448             KeyframeResultList shots = e->QueryVisual(mLastVisualKeyframe,true);
00449             mThreadSet->AddThreadShots("initialquery", shots);
00450             mRotorBrowser->ReloadCrossBrowser();
00451         }
00452     }

Here is the call graph for this function:


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