How to get detect if something is moving in a live webcam preview and get the distance moved every 3 seconds?
조회 수: 3 (최근 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개)
참고 항목
카테고리
Help Center 및 File 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!