필터 지우기
필터 지우기

Background Removal From Images

조회 수: 1 (최근 30일)
Brandon
Brandon 2013년 9월 25일
I'm working on a stereo camera setup and need to track a white ball as it moves around. Here is a picture of the setup:
As you can see there is a high contrast between the ball and background. Currently I am thresh holding the image and then getting the centroid of the ball to determine the location. I would like to have a more robust method where I would subtract the background. Any help would be greatly appreciated.

채택된 답변

Image Analyst
Image Analyst 2013년 9월 25일
편집: Image Analyst 2013년 9월 25일
correctedBallImage = abs(double(ballImage) - double(backgroundImage));
  댓글 수: 4
Brandon
Brandon 2013년 9월 25일
Ok, so I just tried the above function and the ball completely disappears.
Any suggestions on lighting because the ball is close to as bright as other things in the scene. The lights above the scene are florescent, what type of lighting should I be using?
Image Analyst
Image Analyst 2013년 9월 25일
If the ball disappears then it must be the same intensity as the background so you won't see it. You must have the ball be either brighter or darker than the background it's over. In that case, you will see it in the difference image. You can use rgb or grayscale. But to display the corrected image you must use either cast to uint8 for rgb, or use [] and leave it as double for grayscale:
correctedBallImage = uint8(correctedBallImage); % Gray scale or RGB.
imshow(correctedBallImage, []); % Gray scale only.

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

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