Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Application::Util::DoCreateCaAnno (  ) 

Definition at line 445 of file mainUtil.cpp.

References Impala::Core::Table::AnnotationTableSet::Add(), Impala::Core::Database::RawDataSet::GetLocator(), ILOG_VAR, Impala::Core::VideoSet::MakeVideoSet(), Impala::Core::Database::RawDataSet::NrFiles(), and Impala::QUID_CLASS_FRAME.

Referenced by mainUtil().

00446 {
00447     typedef Core::VideoSet::VideoSet VideoSet;
00448     typedef Core::VideoSet::Keyframes Keyframes;
00449     typedef Core::Table::AnnotationTable AnnotationTable;
00450 
00451     ILOG_VAR(Impala.Application.Util.DoCreateCaAnno);
00452 
00453     Core::Table::AnnotationTableSet tSet;
00454     AnnotationTable* tab = new AnnotationTable("CaMaterial", 0);
00455     tSet.Add(tab);
00456 
00457     VideoSet* vidSetPosi = Core::VideoSet::MakeVideoSet("idash_annotator.txt");
00458     KeyframesLocator kLocPosi(vidSetPosi->GetLocator(), "keyframes");
00459     Keyframes* keyframesPosi = KeyframesRepository().Get(kLocPosi, vidSetPosi);
00460     for (int v=0 ; v<vidSetPosi->NrFiles() ; v++)
00461     //for (int v=0 ; v<2 ; v++)
00462     {
00463         int nrKeys = keyframesPosi->GetNrKeyframesVideo(v);
00464         int keyId = keyframesPosi->GetFirstKeyframeVideo(v) + nrKeys - 1;
00465         Quid q = keyframesPosi->GetQuidFrame(keyId);
00466         tab->AddPositive(q);
00467     }
00468 
00469     //VideoSet* vidSetNega = Core::VideoSet::MakeVideoSet("idashtest4.txt");
00470     VideoSet* vidSetNega = Core::VideoSet::MakeVideoSet("EwijkMID.txt");
00471     KeyframesLocator kLocNega(vidSetNega->GetLocator(), "keyframes");
00472     Keyframes* keyframesNega = KeyframesRepository().Get(kLocNega, vidSetNega);
00473     for (int v=0 ; v<vidSetNega->NrFiles() ; v++)
00474     //for (int v=0 ; v<2 ; v++)
00475     {
00476         int nrKeys = keyframesNega->GetNrKeyframesVideo(v);
00477         int keyId = keyframesNega->GetFirstKeyframeVideo(v) + nrKeys - 1;
00478         Quid q = keyframesNega->GetQuidFrame(keyId);
00479         tab->AddNegative(q);
00480     }
00481 
00482     AnnotationTableSetLocator aLoc(vidSetPosi->GetLocator(), QUID_CLASS_FRAME,
00483                                    "conceptsAnnotator.txt");
00484     AnnotationTableSetRepository().Add(aLoc, &tSet);
00485     delete keyframesPosi;
00486     delete vidSetPosi;
00487     delete keyframesNega;
00488     delete vidSetNega;
00489 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:27 2011 for ImpalaSrc by  doxygen 1.5.1