classcore_1_1Tracklet.tex 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. \hypertarget{classcore_1_1Tracklet}{}\section{core\+:\+:Tracklet Class Reference}
  2. \label{classcore_1_1Tracklet}\index{core\+::\+Tracklet@{core\+::\+Tracklet}}
  3. {\ttfamily \#include $<$Tracklet.\+h$>$}
  4. Inheritance diagram for core\+:\+:Tracklet\+:\begin{figure}[H]
  5. \begin{center}
  6. \leavevmode
  7. \includegraphics[height=2.000000cm]{classcore_1_1Tracklet}
  8. \end{center}
  9. \end{figure}
  10. \subsection*{Public Member Functions}
  11. \begin{DoxyCompactItemize}
  12. \item
  13. \hyperlink{classcore_1_1Tracklet_aedf59b5a9a068a28bb7570f2a031d4e7}{Tracklet} ()
  14. \item
  15. void \hyperlink{classcore_1_1Tracklet_ab0b397f2d0685a927de886dbd36c3bc8}{Add\+Path\+Object} (Object\+Data\+Ptr obj, bool overwrite=false)
  16. \item
  17. size\+\_\+t \hyperlink{classcore_1_1Tracklet_a1b963319d6c65614baec02a925f31691}{Get\+First\+Frame\+Index} () const
  18. \item
  19. size\+\_\+t \hyperlink{classcore_1_1Tracklet_ad8e195b523cf2021394455cc21867d96}{Get\+Last\+Frame\+Index} () const
  20. \item
  21. Object\+Data\+Ptr \hyperlink{classcore_1_1Tracklet_a9758349e8f25c479ffc4b21a90149a81}{Get\+Path\+Object} (size\+\_\+t i)
  22. \item
  23. size\+\_\+t \hyperlink{classcore_1_1Tracklet_aee4298a7b734b2b7533d4536006a8aa8}{Get\+Path\+Object\+Count} () const
  24. \item
  25. void \hyperlink{classcore_1_1Tracklet_a10b56b608b24ef547550540e5a755bce}{Interpolate\+Missing\+Frames} ()
  26. \item
  27. virtual double \hyperlink{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}{Compare\+To} (Object\+Data\+Ptr obj) const override
  28. \item
  29. virtual Object\+Data\+Ptr \hyperlink{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}{Interpolate} (Object\+Data\+Ptr obj, double fraction) const override
  30. \item
  31. virtual void \hyperlink{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}{Visualize} (cv\+::\+Mat \&image, cv\+::\+Scalar \&color) const override
  32. \item
  33. void \hyperlink{classcore_1_1Tracklet_a3a2b241939559e47aef701d2e2c4d4bd}{Visualize} (cv\+::\+Mat \&image, cv\+::\+Scalar \&color, size\+\_\+t frame, size\+\_\+t predecessor\+\_\+count, size\+\_\+t successor\+\_\+count) const
  34. \item
  35. void \hyperlink{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}{Flatten} ()
  36. \end{DoxyCompactItemize}
  37. \subsection{Detailed Description}
  38. A class for storing multiple object data objects. The object data objects are handled as a path. All objects are stored sorted ascending by their frame index.
  39. \subsection{Constructor \& Destructor Documentation}
  40. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Tracklet@{Tracklet}}
  41. \index{Tracklet@{Tracklet}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  42. \subsubsection[{\texorpdfstring{Tracklet()}{Tracklet()}}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Tracklet\+::\+Tracklet (
  43. \begin{DoxyParamCaption}
  44. {}
  45. \end{DoxyParamCaption}
  46. )}\hypertarget{classcore_1_1Tracklet_aedf59b5a9a068a28bb7570f2a031d4e7}{}\label{classcore_1_1Tracklet_aedf59b5a9a068a28bb7570f2a031d4e7}
  47. Creates a empty tracklet to store path object in. This is N\+OT a virtual object.
  48. \subsection{Member Function Documentation}
  49. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Add\+Path\+Object@{Add\+Path\+Object}}
  50. \index{Add\+Path\+Object@{Add\+Path\+Object}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  51. \subsubsection[{\texorpdfstring{Add\+Path\+Object(\+Object\+Data\+Ptr obj, bool overwrite=false)}{AddPathObject(ObjectDataPtr obj, bool overwrite=false)}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Add\+Path\+Object (
  52. \begin{DoxyParamCaption}
  53. \item[{Object\+Data\+Ptr}]{obj, }
  54. \item[{bool}]{overwrite = {\ttfamily false}}
  55. \end{DoxyParamCaption}
  56. )}\hypertarget{classcore_1_1Tracklet_ab0b397f2d0685a927de886dbd36c3bc8}{}\label{classcore_1_1Tracklet_ab0b397f2d0685a927de886dbd36c3bc8}
  57. Adds the path object sorted into the tracklet.
  58. \begin{DoxyParams}{Parameters}
  59. {\em obj} & The path object to add \\
  60. \hline
  61. {\em overwrite} & If true and an object in the same frame as the given object already exists, the old one will be replaced by the new one \\
  62. \hline
  63. \end{DoxyParams}
  64. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Compare\+To@{Compare\+To}}
  65. \index{Compare\+To@{Compare\+To}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  66. \subsubsection[{\texorpdfstring{Compare\+To(\+Object\+Data\+Ptr obj) const override}{CompareTo(ObjectDataPtr obj) const override}}]{\setlength{\rightskip}{0pt plus 5cm}double core\+::\+Tracklet\+::\+Compare\+To (
  67. \begin{DoxyParamCaption}
  68. \item[{Object\+Data\+Ptr}]{obj}
  69. \end{DoxyParamCaption}
  70. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}{}\label{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}
  71. Compares this object with the given object.
  72. \begin{DoxyParams}{Parameters}
  73. {\em obj} & A pointer to the object to compare this object to \\
  74. \hline
  75. \end{DoxyParams}
  76. \begin{DoxyReturn}{Returns}
  77. A double value indicating the comparison result
  78. \end{DoxyReturn}
  79. Reimplemented from \hyperlink{classcore_1_1ObjectData_afbf7a1e87235f1b204d4d2eb8a37a9a6}{core\+::\+Object\+Data}.
  80. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Flatten@{Flatten}}
  81. \index{Flatten@{Flatten}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  82. \subsubsection[{\texorpdfstring{Flatten()}{Flatten()}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Flatten (
  83. \begin{DoxyParamCaption}
  84. {}
  85. \end{DoxyParamCaption}
  86. )}\hypertarget{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}{}\label{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}
  87. Flattens the current tracklet one level. That means, that if this tracklet contains other tracklets as path objects, their path objects are all extracted and used as the new path objects of this tracklet. The old tracklet path objects are removed. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+First\+Frame\+Index@{Get\+First\+Frame\+Index}}
  88. \index{Get\+First\+Frame\+Index@{Get\+First\+Frame\+Index}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  89. \subsubsection[{\texorpdfstring{Get\+First\+Frame\+Index() const}{GetFirstFrameIndex() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+First\+Frame\+Index (
  90. \begin{DoxyParamCaption}
  91. {}
  92. \end{DoxyParamCaption}
  93. ) const}\hypertarget{classcore_1_1Tracklet_a1b963319d6c65614baec02a925f31691}{}\label{classcore_1_1Tracklet_a1b963319d6c65614baec02a925f31691}
  94. Gets the lowest frame index of all path objects. \begin{DoxyReturn}{Returns}
  95. The lowest frame index
  96. \end{DoxyReturn}
  97. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Last\+Frame\+Index@{Get\+Last\+Frame\+Index}}
  98. \index{Get\+Last\+Frame\+Index@{Get\+Last\+Frame\+Index}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  99. \subsubsection[{\texorpdfstring{Get\+Last\+Frame\+Index() const}{GetLastFrameIndex() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+Last\+Frame\+Index (
  100. \begin{DoxyParamCaption}
  101. {}
  102. \end{DoxyParamCaption}
  103. ) const}\hypertarget{classcore_1_1Tracklet_ad8e195b523cf2021394455cc21867d96}{}\label{classcore_1_1Tracklet_ad8e195b523cf2021394455cc21867d96}
  104. Gets the highest frame index of all path objects. \begin{DoxyReturn}{Returns}
  105. The highest frame index
  106. \end{DoxyReturn}
  107. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Path\+Object@{Get\+Path\+Object}}
  108. \index{Get\+Path\+Object@{Get\+Path\+Object}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  109. \subsubsection[{\texorpdfstring{Get\+Path\+Object(size\+\_\+t i)}{GetPathObject(size\_t i)}}]{\setlength{\rightskip}{0pt plus 5cm}Object\+Data\+Ptr core\+::\+Tracklet\+::\+Get\+Path\+Object (
  110. \begin{DoxyParamCaption}
  111. \item[{size\+\_\+t}]{i}
  112. \end{DoxyParamCaption}
  113. )}\hypertarget{classcore_1_1Tracklet_a9758349e8f25c479ffc4b21a90149a81}{}\label{classcore_1_1Tracklet_a9758349e8f25c479ffc4b21a90149a81}
  114. Gets the path object at the given index. The index is N\+OT the frame index \begin{DoxyReturn}{Returns}
  115. A pointer to the path object
  116. \end{DoxyReturn}
  117. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Path\+Object\+Count@{Get\+Path\+Object\+Count}}
  118. \index{Get\+Path\+Object\+Count@{Get\+Path\+Object\+Count}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  119. \subsubsection[{\texorpdfstring{Get\+Path\+Object\+Count() const}{GetPathObjectCount() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+Path\+Object\+Count (
  120. \begin{DoxyParamCaption}
  121. {}
  122. \end{DoxyParamCaption}
  123. ) const}\hypertarget{classcore_1_1Tracklet_aee4298a7b734b2b7533d4536006a8aa8}{}\label{classcore_1_1Tracklet_aee4298a7b734b2b7533d4536006a8aa8}
  124. Gets the count of all path objects. \begin{DoxyReturn}{Returns}
  125. The path object count
  126. \end{DoxyReturn}
  127. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Interpolate@{Interpolate}}
  128. \index{Interpolate@{Interpolate}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  129. \subsubsection[{\texorpdfstring{Interpolate(\+Object\+Data\+Ptr obj, double fraction) const override}{Interpolate(ObjectDataPtr obj, double fraction) const override}}]{\setlength{\rightskip}{0pt plus 5cm}Object\+Data\+Ptr core\+::\+Tracklet\+::\+Interpolate (
  130. \begin{DoxyParamCaption}
  131. \item[{Object\+Data\+Ptr}]{obj, }
  132. \item[{double}]{fraction}
  133. \end{DoxyParamCaption}
  134. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}{}\label{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}
  135. Linearly interpolates between this and the given object. Creates a new object to fit between the two objects.
  136. \begin{DoxyParams}{Parameters}
  137. {\em obj} & A pointer to the target object \\
  138. \hline
  139. {\em fraction} & Describes where the interpolation should be done. A fraction of zero is a clone of this object, a fraction of one is a clone of the target object. \\
  140. \hline
  141. \end{DoxyParams}
  142. \begin{DoxyReturn}{Returns}
  143. The interpolated object
  144. \end{DoxyReturn}
  145. Reimplemented from \hyperlink{classcore_1_1ObjectData_ad681915317decab76c384a635fc8444e}{core\+::\+Object\+Data}.
  146. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Interpolate\+Missing\+Frames@{Interpolate\+Missing\+Frames}}
  147. \index{Interpolate\+Missing\+Frames@{Interpolate\+Missing\+Frames}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  148. \subsubsection[{\texorpdfstring{Interpolate\+Missing\+Frames()}{InterpolateMissingFrames()}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Interpolate\+Missing\+Frames (
  149. \begin{DoxyParamCaption}
  150. {}
  151. \end{DoxyParamCaption}
  152. )}\hypertarget{classcore_1_1Tracklet_a10b56b608b24ef547550540e5a755bce}{}\label{classcore_1_1Tracklet_a10b56b608b24ef547550540e5a755bce}
  153. Interpolates between the current path objects until every missing frame has an object. Only frames between the first frame index and the last frame index are interpolated. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Visualize@{Visualize}}
  154. \index{Visualize@{Visualize}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  155. \subsubsection[{\texorpdfstring{Visualize(cv\+::\+Mat \&image, cv\+::\+Scalar \&color) const override}{Visualize(cv::Mat \&image, cv::Scalar \&color) const override}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Visualize (
  156. \begin{DoxyParamCaption}
  157. \item[{cv\+::\+Mat \&}]{image, }
  158. \item[{cv\+::\+Scalar \&}]{color}
  159. \end{DoxyParamCaption}
  160. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}{}\label{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}
  161. Visualizes the object in the given image with the given color. This method does nothing, it needs to be overwritten to visualize something.
  162. \begin{DoxyParams}{Parameters}
  163. {\em image} & The image to write into \\
  164. \hline
  165. {\em color} & The color to use \\
  166. \hline
  167. \end{DoxyParams}
  168. Reimplemented from \hyperlink{classcore_1_1ObjectData_aae2c4fceddc529570dbe8909309f9961}{core\+::\+Object\+Data}.
  169. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Visualize@{Visualize}}
  170. \index{Visualize@{Visualize}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  171. \subsubsection[{\texorpdfstring{Visualize(cv\+::\+Mat \&image, cv\+::\+Scalar \&color, size\+\_\+t frame, size\+\_\+t predecessor\+\_\+count, size\+\_\+t successor\+\_\+count) const}{Visualize(cv::Mat \&image, cv::Scalar \&color, size\_t frame, size\_t predecessor\_count, size\_t successor\_count) const}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Visualize (
  172. \begin{DoxyParamCaption}
  173. \item[{cv\+::\+Mat \&}]{image, }
  174. \item[{cv\+::\+Scalar \&}]{color, }
  175. \item[{size\+\_\+t}]{frame, }
  176. \item[{size\+\_\+t}]{predecessor\+\_\+count, }
  177. \item[{size\+\_\+t}]{successor\+\_\+count}
  178. \end{DoxyParamCaption}
  179. ) const}\hypertarget{classcore_1_1Tracklet_a3a2b241939559e47aef701d2e2c4d4bd}{}\label{classcore_1_1Tracklet_a3a2b241939559e47aef701d2e2c4d4bd}
  180. Visualizes the tracklet by visualizing the path object in the given frame and the number of path objects in the given range before and after the given frame.
  181. \begin{DoxyParams}{Parameters}
  182. {\em image} & The image to write into \\
  183. \hline
  184. {\em color} & The color to use \\
  185. \hline
  186. {\em frame} & The frame index to visualize the path objects from \\
  187. \hline
  188. {\em predecessor\+\_\+count} & The number of path objects to visualize before the given frame \\
  189. \hline
  190. {\em successor\+\_\+count} & The number of path objects to visualize after the given frame \\
  191. \hline
  192. \end{DoxyParams}
  193. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  194. \item
  195. core/Tracklet.\+h\item
  196. core/Tracklet.\+cpp\end{DoxyCompactItemize}