Definition at line 217 of file TrecEngine.h. References Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_ENDACTION, ILOG_ERROR, ILOG_INFO, ILOG_LEVEL_INFO, ILOG_STARTACTION, ILOG_WARN, Impala::Core::Table::SimilarityTableSet::MakeFromFile(), Impala::Core::ImageSet::MakeImageSet(), Impala::Core::VideoSet::MakeVideoSet(), mConceptFeature, mConceptModel, mConcepts, mConceptSetName, mKeyframeImages, mKeyframes, mShots, mStillImages, mStills, mThumbHeight, mThumbScale, mThumbWidth, mVideoSetName, mVidSet, Impala::Core::Table::SimilarityTableSet::NrTables(), and Impala::Core::ImageSet::ImageSet::SetImageSrc(). 00218 { 00219 typedef Core::ImageSet::ImageSet ImageSet; 00220 00221 CmdOptions& options = CmdOptions::GetInstance(); 00222 00223 // read the keyframes 00224 ILOG_STARTACTION("reading keyframes", ILOG_LEVEL_INFO);; 00225 ImageSet* imSetKeyfr = 00226 Core::ImageSet::MakeImageSet(options.GetString("imageSetKeyframes")); 00227 00228 if (imSetKeyfr) 00229 imSetKeyfr->SetImageSrc(false, false, true); 00230 else 00231 ILOG_WARN( "No keyframes available" ); 00232 ILOG_ENDACTION("reading keyframes"); 00233 00234 mKeyframeImages = imSetKeyfr; 00235 00236 // read the thumbnails 00237 ILOG_STARTACTION("reading thumbnails", ILOG_LEVEL_INFO);; 00238 ImageSet* imSetThumb = 00239 Core::ImageSet::MakeImageSet(options.GetString("imageSetThumbnails")); 00240 if (imSetThumb) 00241 { 00242 imSetThumb->SetImageSrc(! options.GetBool("noArchive"), 00243 options.GetBool("imFileArchive"), 00244 options.GetBool("imSplitArchive")); 00245 00246 //Core::Array::Array2dVec3UInt8* im = imSetThumb->GetImage(0); 00247 //mThumbWidth = im->CW(); 00248 //mThumbHeight = im->CH(); 00249 //delete im; 00250 00251 // we set this manually to allow for different sizes: 00252 mThumbWidth = 360 / 1.5; //im->CW(); 00253 mThumbHeight = 240 / 1.5; //im->CH(); 00254 00255 mKeyframeImages = imSetThumb; 00256 00257 mThumbScale = 1.0; 00258 } 00259 else 00260 ILOG_WARN( "No thumbnails available" ); 00261 ILOG_ENDACTION("reading thumbnails"); 00262 00263 00264 // read the stills 00265 ILOG_STARTACTION("reading stills", ILOG_LEVEL_INFO);; 00266 ImageSet* imSetStill = 00267 Core::ImageSet::MakeImageSet(options.GetString("imageSetStills")); 00268 if (imSetStill) 00269 imSetStill->SetImageSrc(false, false, true); 00270 else 00271 ILOG_WARN( "No stills available" ); 00272 ILOG_ENDACTION("reading stills"); 00273 00274 mStillImages = imSetStill; 00275 00276 // read the videoset 00277 ILOG_STARTACTION("reading videoset", ILOG_LEVEL_INFO); 00278 mVidSet = Core::VideoSet::MakeVideoSet(mVideoSetName); 00279 ILOG_ENDACTION("reading videoset"); 00280 00281 // read the shots 00282 ILOG_STARTACTION("reading shots", ILOG_LEVEL_INFO); 00283 mShots = new Core::VideoSet::Segmentation(mVidSet, "segmentation"); 00284 ILOG_ENDACTION("reading shots"); 00285 00286 // read the keyframe set 00287 ILOG_STARTACTION("reading keyframe set", ILOG_LEVEL_INFO); 00288 mKeyframes = new Core::VideoSet::Keyframes(mVidSet, "keyframes"); 00289 ILOG_ENDACTION("reading keyframe set"); 00290 00291 ILOG_STARTACTION("reading stills set", ILOG_LEVEL_INFO); 00292 mStills = new Core::VideoSet::Stills(mVidSet, "stills"); 00293 ILOG_ENDACTION("reading stills set"); 00294 00295 //mSegDoc = new Core::VideoSet::SegmentationDocument 00296 // (mVidSet, mShots, mKeyframes, imSetKeyfr, imSetThumb, imSetStill); 00297 00298 /* mThreadSet = new Core::Trec::ThreadSet(mShots, mKeyframes, imSetThumb, imSetKeyfr); 00299 mThreadSet->AddThreadTime(); 00300 mThreadSet->AddThreadBookmarked(mSegDoc->GetBookmarked()); 00301 mThreadSet->AddThreadHistory(); 00302 */ 00303 // read the concepts 00304 if (mConceptSetName != "") { 00305 ILOG_STARTACTION("reading concept ranking", ILOG_LEVEL_INFO); 00306 try { 00307 mConcepts = 00308 Core::Table::SimilarityTableSet::MakeFromFile(mVidSet, 00309 mConceptSetName, 00310 mConceptModel, 00311 mConceptFeature); 00312 } catch (std::length_error) { 00313 ILOG_ERROR("MakeFromFile threw std::length_error"); 00314 ILOG_ERROR("Probable cause: there are no concepts in set '" << mConceptSetName << "'."); 00315 mConceptSetName = ""; 00316 mConcepts = 0; 00317 } 00318 00319 if (mConcepts) { 00320 ILOG_INFO("Found " << mConcepts->NrTables() << " concepts for this set."); 00321 for (int i=0; i< mConcepts->NrTables(); i++) { 00322 //mThreadSet->AddThreadRank(mConceptRanking, i); 00323 } 00324 } 00325 00326 00327 ILOG_ENDACTION("reading concept ranking"); 00328 00329 } else { 00330 ILOG_WARN("concept reading disabled. No concepts available."); 00331 mConcepts = 0; 00332 } 00333 /* 00334 // read the visual similarities: 00335 ILOG_STARTACTION("adding visual similarity", ILOG_LEVEL_INFO); 00336 00337 // ILOG_STARTACTION("adding visual similarity - Lab histograms", ILOG_LEVEL_INFO); 00338 // mThreadSet->AddThreadVisualSimilarity("labhistogram"); 00339 // ILOG_ENDACTION("adding visual similarity - Lab histograms"); 00340 00341 ILOG_STARTACTION("adding visual similarity - Weibull", ILOG_LEVEL_INFO); 00342 mThreadSet->AddThreadVisualSimilarity("vissem"); 00343 ILOG_ENDACTION("adding visual similarity - Weibull"); 00344 00345 ILOG_STARTACTION("adding visual similarity - Gabor", ILOG_LEVEL_INFO); 00346 mThreadSet->AddThreadVisualSimilarity("vissemgabor"); 00347 ILOG_ENDACTION("adding visual similarity - Gabor"); 00348 00349 // ILOG_STARTACTION("adding visual similarity - Fusion", ILOG_LEVEL_INFO); 00350 // mThreadSet->AddThreadVisualSimilarity("fusionvissemgabor"); 00351 // ILOG_ENDACTION("adding visual similarity - Fusion"); 00352 00353 ILOG_ENDACTION("adding visual similarity"); 00354 00355 */ 00356 //mVisualQueryEngine = new Core::Trec::VisualQueryEngine(mThreadSet, 400); 00357 00358 00359 }
Here is the call graph for this function:
|