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

1 visualización (últimos 30 días)
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.

Respuesta aceptada

Abhisek Pradhan
Abhisek Pradhan el 26 de Ag. de 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.

Más respuestas (0)

Categorías

Más información sobre Image Processing and Computer Vision en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by