MATLAB: About counting cars using Matlab

Computer Vision ToolboxcountImage Acquisition Toolboximage processingImage Processing Toolboxtracking

I askedthis question earlier but gave the wrong link. I have updated the link.
I am a new to matlab. I am doing a project that will require me to count the number of cars entering a street and exiting on the other side. Using the information, I will require to compute the number of cars on that particular street as in:
Density = Entering cars – Exiting cars.
Therefore I need to have two Regions of Interest in the video in form of a trigger line(line that counts when triggered by a car) as shown in this * video * . The example is done in matlab, am sure its possible. Does anyone know how I can go about this, I do not even know how I could insert such a line in a video. Thanks in advance

Best Answer

Here is a more complicated example of tracking multiple objects, which could be cars.
Related Question