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