Implements Impala::Core::Database::DataDocumentListener.
Definition at line 106 of file FeatureTableSetRank.h.
References Impala::Visualization::ImagesWindow::AddImage(), Impala::Core::Table::SimilarityTableSet::ComputeRanksTopN(), Impala::Core::VideoSet::SegmentationDocument::CurKeyfr(), Impala::Core::Vector::VectorTem< ElemT >::Elem(), Impala::Core::Feature::FeatureTable::FindFeature(), Impala::Core::Table::SimilarityTableSet::FindQuid(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn2(), OglGui::StringSelector::GetCurrentStringIdx(), Impala::Core::VideoSet::Keyframes::GetFrameId(), Impala::Core::VideoSet::Keyframes::GetQuidFrame(), Impala::Core::Table::SimilarityTableSet::GetRankTable(), Impala::Core::Table::SimilarityTableSet::GetSimTable(), Impala::Core::Feature::FeatureTableSet::GetTable(), Impala::Core::VideoSet::SegmentationDocument::HasCursor(), ILOG_ERROR, mCurCompare, mCurFeat, mFeatSet, mImagesSet, Impala::Min(), mKeyframes, mKeyframeSet, mLineData1, mLineData2, mLineData3, mLineSize1, mPlot1, mSegDoc, mSimSet, mStringSelector, Impala::Visualization::ImagesWindow::RemoveImages(), Impala::Visualization::ImageSet::SetFirstVisY(), Impala::Core::Vector::Similarity(), Impala::Core::Vector::VectorTem< ElemT >::Size(), Impala::Core::Table::Table::Size(), UpdateLinePlot(), and UpdateLineSize().
Referenced by StringSelectionEvent().
00107 {
00108 mImagesSet->RemoveImages();
00109 mImagesSet->SetFirstVisY(0, true);
00110 mCurCompare = -1;
00111 if (!(mSegDoc->HasCursor() && mKeyframes && mKeyframeSet))
00112 return;
00113 mCurFeat = mStringSelector->GetCurrentStringIdx();
00114 FeatureTable* featTab = mFeatSet->GetTable(mCurFeat);
00115 int curKey = mSegDoc->CurKeyfr();
00116 Quid curQuid = mKeyframes->GetQuidFrame(curKey);
00117 VectorReal64 curKeyVec = featTab->FindFeature(curQuid);
00118 Real64* s = mSimSet->GetSimTable(0)->GetColumn1()->GetData();
00119 Core::Vector::Similarity(s, curKeyVec, featTab->GetColumn2(),
00120 0, 1, Core::Vector::Norm1Dist<Real64>);
00121 int nr = Min(featTab->Size(), 200);
00122 mSimSet->ComputeRanksTopN(nr, false);
00123 UpdateLineSize(nr, curKeyVec.Size());
00124 if (mPlot1)
00125 {
00126 for (int i=0 ; i<curKeyVec.Size() ; i++)
00127 {
00128 mLineData2[i] = curKeyVec.Elem(i);
00129 mLineData3[i] = curKeyVec.Elem(0);
00130 }
00131 }
00132 RankTableType* rankTable = mSimSet->GetRankTable(0);
00133 SimTableType* simTable = mSimSet->GetSimTable(0);
00134 for (int i=0 ; i<nr ; i++)
00135 {
00136 Quid quid = rankTable->Get1(i);
00137 int rank = mSimSet->FindQuid(quid);
00138 int keyfr = mKeyframes->GetFrameId(quid);
00139 if (keyfr == -1)
00140 {
00141 ILOG_ERROR("Unable to find keyframe for " << QuidObj(quid));
00142 }
00143 else
00144 {
00145 mImagesSet->AddImage(keyfr, mKeyframeSet);
00146 }
00147 if (mPlot1)
00148 if (i<mLineSize1)
00149 mLineData1[i] = simTable->Get1(rank);
00150 }
00151 UpdateLinePlot();
00152 }
Here is the call graph for this function: