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

void Impala::Core::VideoSet::Mpeg7Doc::ExportShot ( Util::IOBuffer ioBuf,
int  idx 
) [inline, private]

Definition at line 597 of file Mpeg7Doc.h.

References ExportMediaTime(), HasAnnotations(), HasFeatures(), Impala::MakeString(), mAnnotation, mConfidence, mEndFrame, mFeatureName, mFeatureValues, mKeyframeFrame, mKeyframeName, mOriginalHadKeyframes, mRelevance, mShotName, mStartFrame, and Impala::Util::IOBuffer::Puts().

Referenced by ExportXml().

00598     {
00599         ioBuf->Puts("<VideoSegment id=\"" + mShotName[idx] + "\">");
00600         ExportMediaTime(ioBuf, mStartFrame[idx],
00601                         mEndFrame[idx] - mStartFrame[idx] + 1);
00602         if (HasAnnotations())
00603         {
00604             String r = "relevance=\"" + MakeString(mRelevance[idx]) + "\"";
00605             String c = "confidence=\"" + MakeString(mConfidence[idx]) + "\"";
00606             ioBuf->Puts("<TextAnnotation " + r + " " + c + ">");
00607             ioBuf->Puts("<KeywordAnnotation>");
00608             ioBuf->Puts("<Keyword>" + mAnnotation[idx] + "</Keyword>");
00609             ioBuf->Puts("</KeywordAnnotation>");
00610             ioBuf->Puts("</TextAnnotation>"); 
00611            
00612         }
00613         if (mOriginalHadKeyframes)
00614         {
00615             ioBuf->Puts("<TemporalDecomposition>");
00616             std::vector<String> names = mKeyframeName[idx];
00617             std::vector<int> frames = mKeyframeFrame[idx];
00618             for (int i=0 ; i<names.size() ; i++)
00619             {
00620                 ioBuf->Puts("<VideoSegment id=\"" + names[i] + "\">");
00621                 ExportMediaTime(ioBuf, frames[i], -1);
00622                 ioBuf->Puts("</VideoSegment>");
00623             }
00624             ioBuf->Puts("</TemporalDecomposition>");
00625         }
00626         if (HasFeatures())
00627         {
00628             ioBuf->Puts("<DescriptorUnit xsi:type=\"DescriptorCollectionType\">");
00629             ioBuf->Puts("<Descriptor xsi:type=\"" + mFeatureName[idx] + "\">");
00630             ioBuf->Puts("<Coefficients>");
00631             std::vector<double> v = mFeatureValues[idx];
00632             int nr = 0;
00633             String s;
00634             for (int i=0 ; i<v.size() ; i++)
00635             {
00636                 s += MakeString(v[i]) + " ";
00637                 if (++nr == 10)
00638                 {
00639                     ioBuf->Puts(s);
00640                     s = "";
00641                     nr = 0;
00642                 }
00643             }
00644             if (nr != 0)
00645                 ioBuf->Puts(s);
00646             ioBuf->Puts("</Coefficients>");
00647             ioBuf->Puts("</Descriptor>");
00648             ioBuf->Puts("</DescriptorUnit>");
00649             
00650         }
00651         ioBuf->Puts("</VideoSegment>");
00652     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:30:47 2010 for ImpalaSrc by  doxygen 1.5.1