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

void Impala::Core::VideoSet::ShotSegmenter::WritePredictions (  )  [inline]

Definition at line 336 of file ShotSegmenter.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::FileNameBase(), Impala::Util::Database::GetInstance(), Impala::Core::Stream::RgbDataSrc::GetName(), ILOG_INFO, mBinCount, mPredictions, mProbThresh, mRadius, mRunName, mSigma, mSrc, Impala::Util::IOBuffer::Puts(), Impala::Util::IOBuffer::Valid(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::Value().

Referenced by HandleDoneFile().

00337     {
00339         //TRECVID Evaluation output
00340 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00341         ILOG_INFO("Writing Predictions");
00342         String SrcName = mSrc->GetName();
00343         SrcName=Impala::FileNameBase(SrcName);
00344 
00345         char OutFileName[300];
00346         sprintf(OutFileName,"%s_%d-%g-%d.xml",SrcName.c_str(),
00347                                     mRadius,mSigma,mBinCount);
00348         Util::Database& Db = Util::Database::GetInstance();
00349         Db.MakeDir("ShotSegmentation","Predict",mRunName);
00350         String FileName=Db.GetFilePath("ShotSegmentation","Predict",mRunName,OutFileName,true,false);
00351         Util::IOBuffer* Output=Db.GetIOBuffer(FileName,false,false,"tmp");
00352         if(Output && Output->Valid())
00353         {
00354             ILOG_INFO("Writing Results to "<<FileName);
00355             Output->Puts(" <seg src=\""+SrcName+".mpg\">\n");
00356             int start=0;
00357             int cut;
00358             std::ostringstream oss;
00359 
00360             for (int i=mRadius+1;i<mPredictions->CW();i++){
00361                 
00362                 if(mPredictions->Value(i,0)>=mProbThresh){
00363                     start=i;
00364                     while(mPredictions->Value(i,0)>=mProbThresh)
00365                         i++;
00366 //                        if(i-start<6)
00367 //                            continue;
00368                     cut=(start+i)/2;
00369                     oss<<"  <trans type=\"CUT\" preFNum=\""<<cut<<"\" postFNum=\""<<cut+1<<"\"/>\n";
00370                     Output->Puts(oss.str());
00371                 }
00372             }
00373             Output->Puts(" </seg>\n");
00374             delete Output;
00375 
00376         }
00377 #endif // REPOSITORY_USED
00378     }

Here is the call graph for this function:


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