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

void Impala::Core::VideoSet::Mpeg7Doc::AddShot ( DOMNode segment  )  [inline, private]

Definition at line 879 of file Mpeg7Doc.h.

References Impala::atof(), Impala::Util::XmlDoc::GetAttributeValue(), Impala::Util::XmlDoc::GetChildNode(), Impala::Util::XmlDoc::GetElementValue(), GetMediaDuration(), GetMediaTimePoint(), GetTemporalDecomposition(), ILOG_DEBUG, mAnnoFileName, mAnnotation, mConfidence, mEndFrame, mKeyframeFrame, mKeyframeName, mOriginalHadKeyframes, mRelevance, mShotName, and mStartFrame.

00880     {
00881         String id = GetAttributeValue(segment, "id");
00882         ILOG_DEBUG("shot id = " << id);
00883         mShotName.push_back(id);
00884         DOMNode* textAnno = GetChildNode(segment, "TextAnnotation", false);
00885         if (textAnno)
00886         {
00887             String rel = GetAttributeValue(textAnno, "relevance");
00888             mRelevance.push_back(atof(rel));
00889             String conf = GetAttributeValue(textAnno, "confidence");
00890             mConfidence.push_back(atof(conf));
00891             String anno;
00892             DOMNode* freeText = GetChildNode(textAnno, "FreeTextAnnotation",
00893                                              false);
00894             if (freeText)
00895             {
00896                 anno = GetElementValue(freeText);
00897             }
00898             else
00899             {
00900                 DOMNode* keyAnno = GetChildNode(textAnno, "KeywordAnnotation",
00901                                                 true);
00902                 DOMNode* keyWord = GetChildNode(keyAnno, "Keyword", true);
00903                 anno = GetElementValue(keyWord);
00904             }
00905             mAnnotation.push_back(anno);
00906             mAnnoFileName = anno;
00907         }
00908         else
00909         {
00910             mAnnoFileName = "";
00911         }
00912         DOMNode* mediaTime = GetChildNode(segment, "MediaTime", true);
00913         long frame = GetMediaTimePoint(mediaTime);
00914         long duration = GetMediaDuration(mediaTime);
00915         mStartFrame.push_back(frame);
00916         mEndFrame.push_back(frame + duration - 1);
00917 
00918         std::vector<String> keyframeNames;
00919         std::vector<int> keyframeFrames;
00920         DOMNode* td = GetChildNode(segment, "TemporalDecomposition", false);
00921         if (td)
00922         {
00923             mOriginalHadKeyframes = true;
00924             GetTemporalDecomposition(td, keyframeNames, keyframeFrames);
00925         }
00926         else
00927         {
00928             mOriginalHadKeyframes = false;
00929             keyframeNames.push_back(id + "_RKF");
00930             keyframeFrames.push_back(frame + duration/2);
00931         }
00932         mKeyframeName.push_back(keyframeNames);
00933         mKeyframeFrame.push_back(keyframeFrames);
00934     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:05 2011 for ImpalaSrc by  doxygen 1.5.1