Definition at line 1401 of file mainMonetTest.cpp. References CheckOneSimTable(), Impala::Util::DatabaseReadString(), Impala::CmdOptions::GetArg(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetFilePathAnnotation(), Impala::Core::Database::RawDataSet::GetFilePathSimilarityData(), Impala::CmdOptions::GetInstance(), GetIntInRange(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_INFO, ILOG_NDC_POP, ILOG_NDC_PUSH, ILOG_VAR, InsertOneSimTable(), Impala::Core::VideoSet::MakeVideoSet(), Impala::Core::Database::RawDataSet::NrFiles(), and Impala::Core::Table::Read(). Referenced by mainMonetTest(). 01402 { 01403 ILOG_VAR(Impala.Samples.MonetTest.DoSimilarities); 01404 CmdOptions& options = CmdOptions::GetInstance(); 01405 if (options.GetNrArg() < 8) 01406 { 01407 ILOG_ERROR("Need more parameters"); 01408 return; 01409 } 01410 01411 String vidSetName = options.GetArg(4); 01412 String conceptSet = options.GetArg(5); 01413 String modelName = options.GetArg(6); 01414 String feature = options.GetArg(7); 01415 01416 VideoSet* vidSet = Core::VideoSet::MakeVideoSet(vidSetName); 01417 String path = vidSet->GetFilePathAnnotation(conceptSet, false, false); 01418 if (path.empty()) 01419 return; 01420 KeywordList concepts; 01421 Util::Database* db = vidSet->GetDatabase(); 01422 Util::DatabaseReadString(std::back_inserter(concepts), path, db, true); 01423 01424 int startF = GetIntInRange("startFile", 0, vidSet->NrFiles(), false); 01425 int numberF = GetIntInRange("numberFiles", startF, vidSet->NrFiles(), true); 01426 for (int v=startF ; v<startF+numberF ; v++) 01427 { 01428 QuidTable quidTab(0); 01429 String path = 01430 vidSet->GetFilePathSimilarityData("Frames", conceptSet, modelName, 01431 feature, v, "all_quids.tab", 01432 false, false); 01433 if (path.empty()) 01434 continue; 01435 Core::Table::Read(&quidTab, path, vidSet->GetDatabase()); 01436 ILOG_INFO("quidTab size = " << quidTab.Size()); 01437 int startConcept = GetIntInRange("startConcept", 0, concepts.size(), 01438 false); 01439 int nrConcepts = GetIntInRange("numberConcepts", startConcept, 01440 concepts.size(), true); 01441 for (int c=startConcept ; c<startConcept+nrConcepts ; c++) 01442 { 01443 ILOG_NDC_PUSH("video " << v << " - " << concepts[c]); 01444 if (doInsert) 01445 InsertOneSimTable(conn, vidSet, conceptSet, modelName, 01446 feature, v, concepts[c], &quidTab); 01447 else 01448 CheckOneSimTable(conn, vidSet, conceptSet, modelName, 01449 feature, v, concepts[c], &quidTab); 01450 ILOG_NDC_POP; 01451 } 01452 } 01453 01454 delete vidSet; 01455 }
Here is the call graph for this function:
|