How to get detect if something is moving in a live webcam preview and get the distance moved every 3 seconds?

2 vues (au cours des 30 derniers jours)
I am working on a project that utilizes a webcam. I would like to determine what exactly is moving and how far it has moved every 3 seconds.
For example: If the webcam had a birds eye view of 4 different cars, each within its own lane and only one car is moving at a time.
How would I determine which car is moving and how far it has moved from its starting position, every 3 seconds? This would allow me to find how many mph it was going at a certain location.

Réponse acceptée

Abhisek Pradhan
Abhisek Pradhan le 26 Août 2019
Computer Vision Toolbox can be used for detecting and tracking objects. Any specific object can be detected by training a classifier using bagOfFeatures and trainImageCategoryClassifier.
Velocity of an object can be calculated by knowing the centroid of the object in the current and previous frame and the frame rate.
The following link has an example related to tracking an object and measuring its velocity.
Refer the following link for knowing more about Object Tracking.

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