We use structures cvtrack and cvblob in programs for blob detection but I am unable to find the difference between the two structures as the structure members for both the types are same.
-
In which OpenCV module is CvTrack defined? I couldn't see it in either OpenCV or Cvblobslib. – Bull Oct 13 '13 at 11:34
-
CvTrack is defined in Cvblobslib only. You can check its code in the header file at /usr/local/include/cvblob.h. – user2874456 Oct 13 '13 at 13:35
-
I think you must be using the cvblob library, not cvblobslib (which doesn't have a cvblob.h) – Bull Oct 13 '13 at 14:31
2 Answers
You can use cvBlob
to detect and draw figures defined by contours (blobs). then you can track them, from one frame to another. For this you use cvTracks
, which gives you a label and a lifetime. you can give also a lifetime limit (if the blob is not detected in one frame, it is saved for a couple of frames in order to detect it again if it appears again, if the lifetime pass, it is removed and cosidered a new blob if it is detected again). Then in some implementations you have a lifetime limit for being active (it does the opposite, after it is active a couple of frames, it is considered a new blob). You can see an example here.

- 656
- 8
- 24
There are two different blobs libraries with similar names: CvBlobsLib and cvblob
In cvblob (version 0.10.4), the CvTrack
struct is similar but not identical to CvBLob
.
CvTrack
has these members that are not present in CvBlob
:
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.

- 11,771
- 9
- 42
- 53
-
I got that. Moreover I wanted to know the role of CvTrack struct in the programs. Could you please tell me that ? – user2874456 Oct 13 '13 at 21:10