How to get detect if something is moving in a live webcam preview and get the distance moved every 3 seconds?
2 次查看(过去 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.
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!