Definition at line 258 of file Bayes.h. References mAnnoTableSize, mConceptNum, mGenreNum, tabConcept, and tabGenre. Referenced by Bayes(). 00259 { 00260 // the table size should be the same as the total keyframes 00261 int nTempTabSize = 0; 00262 00263 bool bIsConceptValid = true; 00264 bool bIsGenreValid = true; 00265 00266 // loop for all concepts c_{k} 00267 for (int k=0 ; k< mConceptNum ; k++) 00268 { 00269 int tabSize = tabConcept[k]->Capacity(); 00270 00271 if (0 == nTempTabSize) 00272 { 00273 nTempTabSize = tabSize; 00274 00275 } else { 00276 if (nTempTabSize != tabSize) 00277 { 00278 printf("Warnning: Concept %d table size %d is different.\n", k, tabSize); 00279 bIsConceptValid = false; 00280 } 00281 } 00282 00283 } 00284 00285 // loop for all video genres 00286 for (int j=0 ; j < mGenreNum ; j++) 00287 { 00288 int tabSize = tabGenre[j]->Capacity(); 00289 00290 if (0 == nTempTabSize) 00291 { 00292 nTempTabSize = tabSize; 00293 00294 } else { 00295 if (nTempTabSize != tabSize) 00296 { 00297 printf("Warnning: Genre %d table size %d is different.\n", j, tabSize); 00298 bIsGenreValid = false; 00299 } 00300 } 00301 } 00302 00303 if (!bIsConceptValid || !bIsGenreValid) 00304 { 00305 printf("Warnning: Attention! Some tables have different size.\n"); 00306 } 00307 00308 // set table size 00309 mAnnoTableSize = nTempTabSize; 00310 //_ASSERT(mAnnoTableSize>0); 00311 00312 std::cout << "Anno Table Size = " << mAnnoTableSize << std::endl; 00313 00314 }
|