Definition at line 1201 of file mainTable.cpp. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::CmdOptions::GetArg(), Impala::Core::VideoSet::Keyframes::GetFirstKeyframeVideo(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), Impala::Core::VideoSet::Keyframes::GetNrKeyframesVideo(), Impala::Core::VideoSet::Keyframes::GetQuidFrame(), ILOG_ERROR, ILOG_VAR, Impala::Core::VideoSet::MakeVideoSet(), and Impala::Core::Database::RawDataSet::NrFiles(). Referenced by mainTable(). 01202 { 01203 typedef Core::Table::SimilarityTableSet SimilarityTableSet; 01204 typedef Core::Table::SimilarityTableSet::SimTableType SimTableType; 01205 01206 ILOG_VAR(Impala.Application.Table.DoSimFeatureTable); 01207 //ILOG_WARNING("DoMakeRandomSimilarityTableSet broken by svn rev 4145"); 01208 //ILOG_ERROR("DoMakeRandomSimilarityTableSet broken by svn rev 4145"); 01209 01210 CmdOptions& options = CmdOptions::GetInstance(); 01211 if (options.GetNrArg() < 2) 01212 { 01213 ILOG_ERROR("Need more arguments"); 01214 return; 01215 } 01216 String setName = options.GetArg(1); 01217 Core::VideoSet::VideoSet* vidSet = Core::VideoSet::MakeVideoSet(setName); 01218 Core::VideoSet::Keyframes keyframes(vidSet, "keyframes"); 01219 01220 std::vector<String> names; 01221 names.push_back("RandomKeyframes"); 01222 01223 01224 for (int v=0 ; v<vidSet->NrFiles() ; v++) 01225 { 01226 int nrKeys = keyframes.GetNrKeyframesVideo(v); 01227 SimilarityTableSet simSet(names, nrKeys); 01228 int idx = 0; 01229 SimTableType* simTable = simSet.GetSimTable(idx); 01230 Core::Table::QuidTable* qTable = simSet.GetQuidTable(); 01231 int firstKey = keyframes.GetFirstKeyframeVideo(v); 01232 for (int k=0 ; k<nrKeys ; k++) 01233 { 01234 Quid q = keyframes.GetQuidFrame(firstKey + k); 01235 qTable->Add(q); 01236 Real64 sim = (Real64) rand() / RAND_MAX; 01237 simTable->Add(sim); 01238 } 01239 simSet.ComputeRank(0, true); 01240 simSet.Save(vidSet, "Keyframes", "artificialConcepts.txt", "no_model", 01241 "Random", v, true); 01242 } 01243 01244 }
Here is the call graph for this function:
|