I am currently working on a Smart Traffic System project. I am trying to detect the number of cars in a .mp4 video. I was thinking of adding a virtual line on the video and seeing if the vehicle passes it and keep count. I was looking up some methods online and seem to be stuck. I am using the Computer Vision Toolbox to generate blobs and also to work on the foreground. The blobs seem to be detecting parts of the road signs or the road itself as an object so I am not able to rely upon it for an accurate count.
I thought of using the blob co-ordinates and seeing if it passed through the line and then keep track of it but I cannot determine their co-ordinates.
Basically I wanted to know if there was a solid technique to use a virtual line and see how many cars have passed it.