how to count all vehicles in matlab

2 visualizaciones (últimos 30 días)
Jaswanth kumar Jalagam
Jaswanth kumar Jalagam el 13 de Mzo. de 2018
Comentada: Image Analyst el 3 de Mayo de 2020
i already have vehicle count in each frame but i need to count all the vehicles in the video ,please this is for final project any help is greatfully appreciated
  1 comentario
Ameni chetouane
Ameni chetouane el 9 de Jul. de 2019
i have the same problem,could you please tell me how did you fix the error?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 13 de Mzo. de 2018
For each vehicle, you need to use tracking to determine whether the blob is new to that frame, or existed in a prior frame. If it's new, increment your total car count.
  2 comentarios
Mrityunjay Jha
Mrityunjay Jha el 3 de Mayo de 2020
@Image Analyst I understood your point but I am finding difficulty in implementing this. Can you please elaborate on this?
Image Analyst
Image Analyst el 3 de Mayo de 2020
I'm no expert on tracking and I can't write such a complicated app for you (it's far from trivial) , but I imagine you'd have an N-by-3 table where each particle is one row.
  1. The first column is it's current x location (or array of all x locations since you first found that particle/car/blob).
  2. The second column is it's current y location (or array of all y locations since you first found that particle).
  3. The third column is whether that particle is currently in the frame.
The row in the table is essentially the ID number of the particle. So for every particle in frame n you need to compute the distance, using sqrt(), of the particle to every other particle in the prior (n-1) frame, and find the closest distance. If that distance is less than what you'd expect the particle to move, then you can assume that is the same particle and update it's location (x,y). If no other particle is close enough, then you might assume that that is a new particle that has just entered the field of view and create a new row in the table for it. If there is a particle in frame (n-1) where there is no other particle close to it in the current frame, then you can assume it's left the field of view and update the third column to "false". It gets much, much more complicated than that. You might want to just see if you can buy tracking software to save you a lot of time and get something more accurate than a home-built solution.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by