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

void Impala::Core::Table::Bayes::VerifyAndSetAnnoTableSize (  )  [inline]

Definition at line 205 of file Bayes.h.

References mAnnoTableSize, mConceptNum, mGenreNum, tabConcept, and tabGenre.

Referenced by Bayes().

00206     {
00207         // the table size should be the same as the total keyframes
00208         int nTempTabSize = 0;
00209 
00210         bool bIsConceptValid = true;
00211         bool bIsGenreValid = true;
00212 
00213         // loop for all concepts c_{k}
00214         for (int k=0 ; k< mConceptNum ; k++)
00215         {
00216             int tabSize = tabConcept[k]->Capacity();
00217 
00218             if (0 == nTempTabSize)
00219             {
00220                 nTempTabSize = tabSize;
00221 
00222             } else {
00223                 if (nTempTabSize != tabSize)
00224                 {
00225                     printf("Warnning: Concept %d table size %d is different.\n", k, tabSize);
00226                     bIsConceptValid = false;
00227                 }
00228             }
00229             
00230         }
00231 
00232         // loop for all video genres
00233         for (int j=0 ; j < mGenreNum ; j++)
00234         {
00235             int tabSize = tabGenre[j]->Capacity();
00236 
00237             if (0 == nTempTabSize)
00238             {
00239                 nTempTabSize = tabSize;
00240 
00241             } else {
00242                 if (nTempTabSize != tabSize)
00243                 {
00244                     printf("Warnning: Genre %d table size %d is different.\n", j, tabSize);
00245                     bIsGenreValid = false;
00246                 }
00247             }
00248         }
00249 
00250         if (!bIsConceptValid || !bIsGenreValid)
00251         {
00252             printf("Warnning: Attention! Some tables have different size.\n");
00253         }
00254 
00255         // set table size
00256         mAnnoTableSize = nTempTabSize;
00257         //_ASSERT(mAnnoTableSize>0);
00258 
00259         std::cout << "Anno Table Size = " << mAnnoTableSize << std::endl;
00260 
00261     }


Generated on Fri Mar 19 11:20:12 2010 for ImpalaSrc by  doxygen 1.5.1