Search before asking
Question
In most of the tutorials I saw we are using a line or a polygon to count of number of objects in the entire video or in the frame inside the polygon. In cases like counting vehicles in an unstructured environment it would be very difficult to count the vehicles using a line or a polygon for that matter.
So, since there is a unique id assigned for each of the objects we detect and then track, we can then use the id's to count the number of objects in the entire video or in the frame. So, whenever there is a unique id that we have not seen before then we can increase the counter.
Additional
Since we also know the type of class an object belongs to whenever a id is assigned to it, we can use this information to make counters for different type of objects. Then we can get a total count of each type of objects at the end of a video.
Search before asking
Question
In most of the tutorials I saw we are using a line or a polygon to count of number of objects in the entire video or in the frame inside the polygon. In cases like counting vehicles in an unstructured environment it would be very difficult to count the vehicles using a line or a polygon for that matter.
So, since there is a unique id assigned for each of the objects we detect and then track, we can then use the id's to count the number of objects in the entire video or in the frame. So, whenever there is a unique id that we have not seen before then we can increase the counter.
Additional
Since we also know the type of class an object belongs to whenever a id is assigned to it, we can use this information to make counters for different type of objects. Then we can get a total count of each type of objects at the end of a video.