Effacer les filtres
Effacer les filtres

how to count all vehicles in matlab

3 vues (au cours des 30 derniers jours)
Jaswanth kumar Jalagam
Jaswanth kumar Jalagam le 13 Mar 2018
Commenté : Image Analyst le 3 Mai 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 commentaire
Ameni chetouane
Ameni chetouane le 9 Juil 2019
i have the same problem,could you please tell me how did you fix the error?

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 13 Mar 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 commentaires
Mrityunjay Jha
Mrityunjay Jha le 3 Mai 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 le 3 Mai 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by