To detect a moving object in a video feed with constantly changing background

조회 수: 3 (최근 30일)
My intention is to capture real time video sequence from a camera fixed atop a moving car, and scan continuously for any intrusion (object) on the road. On detecting the object,there are some inputs to be provided to a micro controller for further action.
My question is, Since the background of the image is constantly changing (ie the road) , how does my camera know that the object entering the frame is the intrusion and not my changing landscape?
how do I start exactly? Please help. Any pointers would be appreciated.

채택된 답변

Image Analyst
Image Analyst 2012년 8월 16일
Did you search the forum and mathworks.com for "tracking"? There are numerous discussions and examples.
  댓글 수: 4
Image Analyst
Image Analyst 2012년 8월 17일
Well you might just have to spend some time learning about it. One simple way to find background is to take the mode gray level over a long time. But I think most sophisticated methods use Gaussian Mixture Models, though it's not my filed so I'm not really sure of the advantages and disadvantages of the various ways. Once you have the background, you can cast both the image and your background image to single (so subtracting won't clip at zero), and then subtract the images and look for pixels above some threshold value. Then clean it up some using bwareaopen() to get rid of small noise specks or tiny objects you don't care about. Then call regionprops() to measure things about the objects that are left. I'm sure you'll learn more and make that general algorithm better once you get into it.
pooja
pooja 2012년 11월 22일
This sort of helps! Thresholding , subtracting and cleaning it up. Will try it out on a smaller video .

댓글을 달려면 로그인하십시오.

추가 답변 (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