OpenCV - cvBlob

时间:2016-03-28 10:21:33

标签: opencv blob

请解释以下代码:

 struct CvTrack  
 {
   CvID id; ///< Track identification number. 
   CvLabel label; ///< Label assigned to the blob related to this track.

   unsigned int minx; ///< X min.
   unsigned int maxx; ///< X max.
   unsigned int miny; ///< Y min.
   unsigned int maxy; ///< y max.

   CvPoint2D64f centroid; ///< Centroid.

   unsigned int lifetime; ///< Indicates how much frames the object has been in scene.
   unsigned int active; ///< Indicates number of frames that has been active from last inactive period.
   unsigned int inactive; ///< Indicates number of frames that has been missing.
   unsigned int speed;
 };

变量activeinactive的目的是什么?

1 个答案:

答案 0 :(得分:0)

我认为关于对象跟踪的问题和代码中的注释几乎可以回答你的问题。

假设您正在追踪一张粉红色的球在桌子上滚动。

无效是球被遮挡的帧数,并且对于相机仍然不可见。

有效是球对相机可见的连续帧数。

如果球持续可见并且在当前帧中突然变得不可见,则会发生以下情况:

lifetime++;
inactive++;
active = 0;

这个matlab post将让您更好地了解如何跟踪被跟踪的对象。