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

void Impala::Application::Table::DoDiffSegmentation (  ) 

Definition at line 129 of file mainTable.cpp.

References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get2(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get3(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get4(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), ILOG_INFO, ILOG_VAR, Impala::Core::Table::Read(), and Impala::Core::Table::Table::Size().

Referenced by mainTable().

00130 {
00131     typedef Core::VideoSet::SegmentationBaseType SegmentationBaseType;
00132 
00133     ILOG_VAR(Impala.Application.Table.DoDiffSegmentation);
00134     CmdOptions& options = CmdOptions::GetInstance();
00135     Util::Database* db = &Util::Database::GetInstance();
00136     String fName1 = options.GetArg(1);
00137     SegmentationBaseType table1(0);
00138     Core::Table::Read(&table1, fName1, db);
00139     String fName2 = options.GetArg(2);
00140     SegmentationBaseType table2(0);
00141     Core::Table::Read(&table2, fName2, db);
00142     if (table1.Size() != table2.Size())
00143     {
00144         ILOG_INFO("Different table sizes: " << table1.Size() << " vs "
00145                   << table2.Size());
00146         return;
00147     }
00148     int verb = options.GetInt("verb");
00149     int nDiff = 0;
00150     for (int i=0 ; i<table1.Size() ; i++)
00151     {
00152         if (table1.Get1(i) != table2.Get1(i))
00153         {
00154             nDiff++;
00155             if (verb)
00156                 ILOG_INFO("diff col1 " << i << ": " << table1.Get1(i)
00157                           << " vs " << table2.Get1(i));
00158         }
00159         else if (table1.Get2(i) != table2.Get2(i))
00160         {
00161             nDiff++;
00162             if (verb)
00163                 ILOG_INFO("diff col2 " << i << ": " << table1.Get2(i)
00164                           << " vs " << table2.Get2(i));
00165         }
00166         else if (table1.Get3(i) != table2.Get3(i))
00167         {
00168             nDiff++;
00169             if (verb)
00170                 ILOG_INFO("diff col3 " << i << ": " << table1.Get3(i)
00171                           << " vs " << table2.Get3(i));
00172         }
00173         else if (table1.Get4(i) != table2.Get4(i))
00174         {
00175             nDiff++;
00176             if (verb)
00177                 ILOG_INFO("diff col4 " << i << ": " << table1.Get4(i)
00178                           << " vs " << table2.Get4(i));
00179         }
00180     }
00181     if (nDiff > 0)
00182         ILOG_INFO("Found " << nDiff << " differences");
00183 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:50:48 2010 for ImpalaSrc by  doxygen 1.5.1