Definition at line 98 of file IndexConcepts.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::VideoSet::Segmentation::GetFirstShotVideo(), Impala::Core::Table::SimilarityTableSet::GetName(), Impala::Core::Table::SimilarityTableSet::GetNames(), Impala::Core::VideoSet::Segmentation::GetNrShotsVideo(), Impala::Core::VideoSet::Segmentation::GetQuidShot(), Impala::Core::Table::SimilarityTableSet::GetQuidTable(), Impala::Core::VideoSet::Segmentation::GetShotId(), Impala::Core::Table::SimilarityTableSet::GetSimTable(), ILOG_ERROR, mSegmentation, Impala::Core::Table::SimilarityTableSet::NrTables(), and Impala::Core::Table::Table::Size(). Referenced by HandleDoneFile(). 00099 { 00100 Table::QuidTable* frameQuids = simSet->GetQuidTable(); 00101 int firstShot = mSegmentation->GetFirstShotVideo(vidId); 00102 int nrShots = mSegmentation->GetNrShotsVideo(vidId); 00103 SimilarityTableSet* res = new SimilarityTableSet(simSet->GetNames(), 00104 nrShots); 00105 Table::QuidTable* shotQuids = res->GetQuidTable(); 00106 for (int i=firstShot ; i<firstShot+nrShots ; i++) 00107 { 00108 Quid q = mSegmentation->GetQuidShot(i); 00109 shotQuids->Add(q); 00110 } 00111 for (int t=0 ; t<simSet->NrTables() ; t++) 00112 { 00113 SimTableType* frameSimTable = simSet->GetSimTable(t); 00114 SimTableType* shotSimTable = res->GetSimTable(t); 00115 int lastShot = -1; 00116 Real64 lastSim = 0; 00117 for (int i=0 ; i<frameSimTable->Size() ; i++) 00118 { 00119 Quid frameQ = frameQuids->Get1(i); 00120 Real64 frameSim = frameSimTable->Get1(i); 00121 int shot = mSegmentation->GetShotId(frameQ); 00122 if (shot != lastShot) 00123 { 00124 if (lastShot != -1) 00125 { 00126 Quid check = mSegmentation->GetQuidShot(lastShot); 00127 int rank = shotSimTable->Size(); 00128 if (check != shotQuids->Get1(rank)) 00129 { 00130 ILOG_ERROR("Quids do not match"); 00131 } 00132 shotSimTable->Add(lastSim); 00133 } 00134 lastSim = frameSim; 00135 lastShot = shot; 00136 } 00137 else 00138 { 00139 if (frameSim > lastSim) 00140 { 00141 lastSim = frameSim; 00142 } 00143 } 00144 } 00145 if (lastShot != -1) 00146 { 00147 Quid check = mSegmentation->GetQuidShot(lastShot); 00148 int rank = shotSimTable->Size(); 00149 if (check != shotQuids->Get1(rank)) 00150 { 00151 ILOG_ERROR("Quids do not match"); 00152 } 00153 shotSimTable->Add(lastSim); 00154 } 00155 if (shotSimTable->Size() < shotQuids->Size()) 00156 { 00157 ILOG_ERROR("Missing shot similarities for " << 00158 simSet->GetName(t)); 00159 for (int i=shotSimTable->Size() ; i<shotQuids->Size() ; i++) 00160 shotSimTable->Add(0.0); 00161 } 00162 } 00163 return res; 00164 }
Here is the call graph for this function:
|