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

1 次查看(过去 30 天)
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.

采纳的回答

Abhisek Pradhan
Abhisek Pradhan 2019-8-26
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing and Computer Vision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by