classcore_1_1Tracklet.tex 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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. 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
  28. \item
  29. void \hyperlink{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}{Flatten} ()
  30. \item
  31. void \hyperlink{classcore_1_1Tracklet_a5bbbf1e2858edaad93c04cc663afeeff}{Combine} (Tracklet\+Ptr other)
  32. \item
  33. Object\+Data\+Ptr \hyperlink{classcore_1_1Tracklet_a5a0e56045f8c1868b46db87700658260}{Get\+Frame\+Object} (size\+\_\+t frame\+\_\+index)
  34. \item
  35. virtual double \hyperlink{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}{Compare\+To} (Object\+Data\+Ptr obj) const override
  36. \item
  37. virtual Object\+Data\+Ptr \hyperlink{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}{Interpolate} (Object\+Data\+Ptr obj, double fraction) const override
  38. \item
  39. virtual void \hyperlink{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}{Visualize} (cv\+::\+Mat \&image, cv\+::\+Scalar \&color) const override
  40. \end{DoxyCompactItemize}
  41. \subsection{Detailed Description}
  42. 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.
  43. \subsection{Constructor \& Destructor Documentation}
  44. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Tracklet@{Tracklet}}
  45. \index{Tracklet@{Tracklet}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  46. \subsubsection[{\texorpdfstring{Tracklet()}{Tracklet()}}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Tracklet\+::\+Tracklet (
  47. \begin{DoxyParamCaption}
  48. {}
  49. \end{DoxyParamCaption}
  50. )}\hypertarget{classcore_1_1Tracklet_aedf59b5a9a068a28bb7570f2a031d4e7}{}\label{classcore_1_1Tracklet_aedf59b5a9a068a28bb7570f2a031d4e7}
  51. Creates a empty tracklet to store path object in. This is N\+OT a virtual object.
  52. \subsection{Member Function Documentation}
  53. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Add\+Path\+Object@{Add\+Path\+Object}}
  54. \index{Add\+Path\+Object@{Add\+Path\+Object}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  55. \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 (
  56. \begin{DoxyParamCaption}
  57. \item[{Object\+Data\+Ptr}]{obj, }
  58. \item[{bool}]{overwrite = {\ttfamily false}}
  59. \end{DoxyParamCaption}
  60. )}\hypertarget{classcore_1_1Tracklet_ab0b397f2d0685a927de886dbd36c3bc8}{}\label{classcore_1_1Tracklet_ab0b397f2d0685a927de886dbd36c3bc8}
  61. Adds the path object sorted into the tracklet.
  62. \begin{DoxyParams}{Parameters}
  63. {\em obj} & The path object to add \\
  64. \hline
  65. {\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 \\
  66. \hline
  67. \end{DoxyParams}
  68. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Combine@{Combine}}
  69. \index{Combine@{Combine}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  70. \subsubsection[{\texorpdfstring{Combine(\+Tracklet\+Ptr other)}{Combine(TrackletPtr other)}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Combine (
  71. \begin{DoxyParamCaption}
  72. \item[{Tracklet\+Ptr}]{other}
  73. \end{DoxyParamCaption}
  74. )}\hypertarget{classcore_1_1Tracklet_a5bbbf1e2858edaad93c04cc663afeeff}{}\label{classcore_1_1Tracklet_a5bbbf1e2858edaad93c04cc663afeeff}
  75. Copies all detections from the specified tracklet to this tracklet
  76. \begin{DoxyParams}{Parameters}
  77. {\em other} & The tracklet to copy the detections from \\
  78. \hline
  79. \end{DoxyParams}
  80. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Compare\+To@{Compare\+To}}
  81. \index{Compare\+To@{Compare\+To}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  82. \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 (
  83. \begin{DoxyParamCaption}
  84. \item[{Object\+Data\+Ptr}]{obj}
  85. \end{DoxyParamCaption}
  86. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}{}\label{classcore_1_1Tracklet_a0357f2fa173941800571432dcbc96dc2}
  87. Compares this object with the given object.
  88. \begin{DoxyParams}{Parameters}
  89. {\em obj} & A pointer to the object to compare this object to \\
  90. \hline
  91. \end{DoxyParams}
  92. \begin{DoxyReturn}{Returns}
  93. A double value indicating the comparison result
  94. \end{DoxyReturn}
  95. Reimplemented from \hyperlink{classcore_1_1ObjectData_afbf7a1e87235f1b204d4d2eb8a37a9a6}{core\+::\+Object\+Data}.
  96. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Flatten@{Flatten}}
  97. \index{Flatten@{Flatten}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  98. \subsubsection[{\texorpdfstring{Flatten()}{Flatten()}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Flatten (
  99. \begin{DoxyParamCaption}
  100. {}
  101. \end{DoxyParamCaption}
  102. )}\hypertarget{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}{}\label{classcore_1_1Tracklet_a2bdb2f2c8249145808e7029dde6e7df0}
  103. 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}}
  104. \index{Get\+First\+Frame\+Index@{Get\+First\+Frame\+Index}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  105. \subsubsection[{\texorpdfstring{Get\+First\+Frame\+Index() const}{GetFirstFrameIndex() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+First\+Frame\+Index (
  106. \begin{DoxyParamCaption}
  107. {}
  108. \end{DoxyParamCaption}
  109. ) const}\hypertarget{classcore_1_1Tracklet_a1b963319d6c65614baec02a925f31691}{}\label{classcore_1_1Tracklet_a1b963319d6c65614baec02a925f31691}
  110. Gets the lowest frame index of all path objects. \begin{DoxyReturn}{Returns}
  111. The lowest frame index
  112. \end{DoxyReturn}
  113. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Frame\+Object@{Get\+Frame\+Object}}
  114. \index{Get\+Frame\+Object@{Get\+Frame\+Object}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  115. \subsubsection[{\texorpdfstring{Get\+Frame\+Object(size\+\_\+t frame\+\_\+index)}{GetFrameObject(size\_t frame\_index)}}]{\setlength{\rightskip}{0pt plus 5cm}Object\+Data\+Ptr core\+::\+Tracklet\+::\+Get\+Frame\+Object (
  116. \begin{DoxyParamCaption}
  117. \item[{size\+\_\+t}]{frame\+\_\+index}
  118. \end{DoxyParamCaption}
  119. )}\hypertarget{classcore_1_1Tracklet_a5a0e56045f8c1868b46db87700658260}{}\label{classcore_1_1Tracklet_a5a0e56045f8c1868b46db87700658260}
  120. Gets the detected object at the given frame index or a nullptr if there is not detection.
  121. \begin{DoxyParams}{Parameters}
  122. {\em frame\+\_\+index} & The index of the frame to take the detection from \\
  123. \hline
  124. \end{DoxyParams}
  125. \begin{DoxyReturn}{Returns}
  126. A pointer to the detection in the given frame
  127. \end{DoxyReturn}
  128. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Last\+Frame\+Index@{Get\+Last\+Frame\+Index}}
  129. \index{Get\+Last\+Frame\+Index@{Get\+Last\+Frame\+Index}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  130. \subsubsection[{\texorpdfstring{Get\+Last\+Frame\+Index() const}{GetLastFrameIndex() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+Last\+Frame\+Index (
  131. \begin{DoxyParamCaption}
  132. {}
  133. \end{DoxyParamCaption}
  134. ) const}\hypertarget{classcore_1_1Tracklet_ad8e195b523cf2021394455cc21867d96}{}\label{classcore_1_1Tracklet_ad8e195b523cf2021394455cc21867d96}
  135. Gets the highest frame index of all path objects. \begin{DoxyReturn}{Returns}
  136. The highest frame index
  137. \end{DoxyReturn}
  138. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Path\+Object@{Get\+Path\+Object}}
  139. \index{Get\+Path\+Object@{Get\+Path\+Object}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  140. \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 (
  141. \begin{DoxyParamCaption}
  142. \item[{size\+\_\+t}]{i}
  143. \end{DoxyParamCaption}
  144. )}\hypertarget{classcore_1_1Tracklet_a9758349e8f25c479ffc4b21a90149a81}{}\label{classcore_1_1Tracklet_a9758349e8f25c479ffc4b21a90149a81}
  145. Gets the path object at the given index. The index is N\+OT the frame index \begin{DoxyReturn}{Returns}
  146. A pointer to the path object
  147. \end{DoxyReturn}
  148. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Get\+Path\+Object\+Count@{Get\+Path\+Object\+Count}}
  149. \index{Get\+Path\+Object\+Count@{Get\+Path\+Object\+Count}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  150. \subsubsection[{\texorpdfstring{Get\+Path\+Object\+Count() const}{GetPathObjectCount() const}}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t core\+::\+Tracklet\+::\+Get\+Path\+Object\+Count (
  151. \begin{DoxyParamCaption}
  152. {}
  153. \end{DoxyParamCaption}
  154. ) const}\hypertarget{classcore_1_1Tracklet_aee4298a7b734b2b7533d4536006a8aa8}{}\label{classcore_1_1Tracklet_aee4298a7b734b2b7533d4536006a8aa8}
  155. Gets the count of all path objects. \begin{DoxyReturn}{Returns}
  156. The path object count
  157. \end{DoxyReturn}
  158. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Interpolate@{Interpolate}}
  159. \index{Interpolate@{Interpolate}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  160. \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 (
  161. \begin{DoxyParamCaption}
  162. \item[{Object\+Data\+Ptr}]{obj, }
  163. \item[{double}]{fraction}
  164. \end{DoxyParamCaption}
  165. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}{}\label{classcore_1_1Tracklet_a5fb5e6ab9df668c3477e8b52f115b188}
  166. Linearly interpolates between this and the given object. Creates a new object to fit between the two objects.
  167. \begin{DoxyParams}{Parameters}
  168. {\em obj} & A pointer to the target object \\
  169. \hline
  170. {\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. \\
  171. \hline
  172. \end{DoxyParams}
  173. \begin{DoxyReturn}{Returns}
  174. The interpolated object
  175. \end{DoxyReturn}
  176. Reimplemented from \hyperlink{classcore_1_1ObjectData_ad681915317decab76c384a635fc8444e}{core\+::\+Object\+Data}.
  177. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Interpolate\+Missing\+Frames@{Interpolate\+Missing\+Frames}}
  178. \index{Interpolate\+Missing\+Frames@{Interpolate\+Missing\+Frames}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  179. \subsubsection[{\texorpdfstring{Interpolate\+Missing\+Frames()}{InterpolateMissingFrames()}}]{\setlength{\rightskip}{0pt plus 5cm}void core\+::\+Tracklet\+::\+Interpolate\+Missing\+Frames (
  180. \begin{DoxyParamCaption}
  181. {}
  182. \end{DoxyParamCaption}
  183. )}\hypertarget{classcore_1_1Tracklet_a10b56b608b24ef547550540e5a755bce}{}\label{classcore_1_1Tracklet_a10b56b608b24ef547550540e5a755bce}
  184. 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}}
  185. \index{Visualize@{Visualize}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  186. \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 (
  187. \begin{DoxyParamCaption}
  188. \item[{cv\+::\+Mat \&}]{image, }
  189. \item[{cv\+::\+Scalar \&}]{color, }
  190. \item[{size\+\_\+t}]{frame, }
  191. \item[{size\+\_\+t}]{predecessor\+\_\+count, }
  192. \item[{size\+\_\+t}]{successor\+\_\+count}
  193. \end{DoxyParamCaption}
  194. ) const}\hypertarget{classcore_1_1Tracklet_a3a2b241939559e47aef701d2e2c4d4bd}{}\label{classcore_1_1Tracklet_a3a2b241939559e47aef701d2e2c4d4bd}
  195. 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.
  196. \begin{DoxyParams}{Parameters}
  197. {\em image} & The image to write into \\
  198. \hline
  199. {\em color} & The color to use \\
  200. \hline
  201. {\em frame} & The frame index to visualize the path objects from \\
  202. \hline
  203. {\em predecessor\+\_\+count} & The number of path objects to visualize before the given frame \\
  204. \hline
  205. {\em successor\+\_\+count} & The number of path objects to visualize after the given frame \\
  206. \hline
  207. \end{DoxyParams}
  208. \index{core\+::\+Tracklet@{core\+::\+Tracklet}!Visualize@{Visualize}}
  209. \index{Visualize@{Visualize}!core\+::\+Tracklet@{core\+::\+Tracklet}}
  210. \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 (
  211. \begin{DoxyParamCaption}
  212. \item[{cv\+::\+Mat \&}]{image, }
  213. \item[{cv\+::\+Scalar \&}]{color}
  214. \end{DoxyParamCaption}
  215. ) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}\hypertarget{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}{}\label{classcore_1_1Tracklet_a85f92a4059bf89f24a83f28935675181}
  216. Visualizes the object in the given image with the given color. This method does nothing, it needs to be overwritten to visualize something.
  217. \begin{DoxyParams}{Parameters}
  218. {\em image} & The image to write into \\
  219. \hline
  220. {\em color} & The color to use \\
  221. \hline
  222. \end{DoxyParams}
  223. Reimplemented from \hyperlink{classcore_1_1ObjectData_aae2c4fceddc529570dbe8909309f9961}{core\+::\+Object\+Data}.
  224. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  225. \item
  226. core/Tracklet.\+h\item
  227. core/Tracklet.\+cpp\end{DoxyCompactItemize}