Definition at line 383 of file mainMonetTest.cpp. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::FileNameBase(), Impala::Core::VideoSet::VideoSet::GetQuidFrame(), Impala::Core::VideoSet::VideoSet::GetQuidVideo(), Impala::Core::Database::RawDataSet::GetSetNameBase(), ILOG_VAR, and Impala::MakeString(). Referenced by CheckOneSimTable(). 00387 { 00388 typedef SimilarityTableSet::SimTableType SimTableType; 00389 00390 ILOG_VAR(Impala.Samples.MonetTest.MakeSimTableMapi); 00391 00392 String vidSetBase = vidSet->GetSetNameBase(); 00393 String conceptSetBase = FileNameBase(conceptSet); 00394 Quid vidQuid = vidSet->GetQuidVideo(fileIdx, true); 00395 String query = 00396 "select fr.fragment_start, s.confidence \ 00397 from video_sets vss, video_set vs, keyword_sets kss, keyword_set ks, \ 00398 keyword k, model_sets_name msn, model_sets mss, model_ref mr, \ 00399 file f, fragment fr, score s \ 00400 where vss.set_name = '" + vidSetBase + "' and \ 00401 kss.set_name = '" + conceptSetBase + "' and \ 00402 kss.video_sets_id = vss.video_sets_id and \ 00403 msn.set_name = '" + feature + "' and \ 00404 mss.model_sets_name_id = msn.model_sets_name_id and \ 00405 k.keyword_name = '" + concept + "' and \ 00406 ks.keyword_sets_id = kss.keyword_sets_id and \ 00407 ks.keyword_id = k.keyword_id and \ 00408 mr.model_name = '" + model + "' and \ 00409 mr.keyword_set_id = ks.keyword_set_id and \ 00410 mr.model_ref_id = mss.model_ref_id and \ 00411 vs.video_sets_id = vss.video_sets_id and \ 00412 f.file_id = vs.file_id and \ 00413 f.quid = " + MakeString(vidQuid) + " and \ 00414 fr.media_id = f.media_id and \ 00415 fr.fragment_length = 1 and \ 00416 fr.keyframe = false and \ 00417 s.fragment_id = fr.fragment_id and \ 00418 s.model_sets_id = mss.model_sets_id and \ 00419 s.file_id = f.file_id \ 00420 order by fr.fragment_start;"; 00421 00422 MapiHdl hdl = conn->QueryPartStart(query); 00423 if (hdl == 0) 00424 return; 00425 00426 int* start = 0; 00427 int startSize = 0; 00428 if (!conn->QueryPartFetchInt(hdl, 0, start, startSize)) 00429 return; 00430 00431 double* sims = 0; 00432 int simSize = 0; 00433 if (!conn->QueryPartFetchDouble(hdl, 1, sims, simSize)) 00434 return; 00435 00436 conn->QueryPartEnd(hdl); 00437 00438 simTab = new SimTableType(startSize); 00439 quidTab = new QuidTable(startSize); 00440 for (int i=0 ; i<startSize ; i++) 00441 { 00442 simTab->Add(sims[i]); 00443 Quid q = vidSet->GetQuidFrame(fileIdx, start[i], true); 00444 quidTab->Add(q); 00445 } 00446 00447 delete start; 00448 delete sims; 00449 }
Here is the call graph for this function:
|