Hi,
following my previous question (for which i'm going to use BGS library that seems to work faster than MOG/MOG2) I can correctly track every object appearing in the video.
Now I'm up with the final step: counting. First idea, defining a vertical line and detect wether an object center is passing, has revealed to be not robust: there could be some frames where the center does not appear in that range, plus a range too wide will introduce double-counting.
So I'm wondering if I need to go for data association and keep tracking every object passing through the video: something like giving an ID to every new detected object and increment an ID-counter, so that every object would be counted just once disregarding the number of frames in which it is visible. Basically i'm trying to do something similar to traffic counting application, but it seems like examples like this one just use my first approach.
Any suggestions? I've never been into data association..any hint from where to start is really appreciated :-)