How can I count street cars using Matlab and a Webcam?

3 views (last 30 days)
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 not done in matlab though but 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

Answers (1)

Image Analyst
Image Analyst on 30 Jun 2014
What video? You didn't give a link or attach a video.
MATLAB can do this with the Computer Vision System Toolbox, as shown here: http://www.mathworks.com/help/vision/gs/object-detection-and-tracking.html#btt5qyu
  2 Comments
Elias Gikonyo
Elias Gikonyo on 1 Jul 2014
Sorry Image Analyst, I made a mistake placing the link on my question above. This is the link . I want to have the first line count cars as ENTRANCE and the second line across the video as EXIT, then compute street density as: Density of cars = ENTRANCE - EXIT. Please help me out, the demo you have is great by the way, but not in the format I wish. Thank you in advance
Mohd Nasrul Mubin
Mohd Nasrul Mubin on 9 May 2016
anyone has any idea how to draw the line of entering and exit?

Sign in to comment.

Categories

Find more on Computer Vision Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!