필터 지우기
필터 지우기

background subtraction in video or image

조회 수: 1 (최근 30일)
mary khaliji
mary khaliji 2015년 6월 1일
답변: RAJASHEKHARA REDDY 2017년 1월 13일
I want to background subtraction from video or image and I don't have any background image without foreground objects. Can any body give me code for that? I attached a sample of images.

채택된 답변

Dima Lisin
Dima Lisin 2015년 6월 1일
You can use vision.ForegroundDetector object in the Computer Vision System Toolbox.
  댓글 수: 2
mary khaliji
mary khaliji 2015년 6월 4일
I don't want a rectangle around object, I want a Border around each object. How I can do this for the images I attached them here (The number is higher)? can you give me a code please? I don't have enough time.
Image Analyst
Image Analyst 2015년 6월 4일
You can't expect Dima to drop everything and develop a turnkey application for you. You can hire other people at the Mathworks (consultants) to do that but it won't be instant.
You will have to first find the objects that you want to outline. That means segment the image and get a binary image. Then you can call bwperim() or bwboundaries(). bwperim() gives you a binary image whereas bwboundaries() gives you the x,y coordinates of the outline pixels.

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

추가 답변 (2개)

Image Analyst
Image Analyst 2015년 6월 1일
Then you'll have to estimate it. For example, find the foreground objects somehow and then estimate the background by using roifill() to fill in where the foreground objects are. But if you can do that, then maybe you don't even need to subtract the background. Why don't you attach a couple of frames from your video and tell us what you want and don't want?
  댓글 수: 4
mary khaliji
mary khaliji 2015년 6월 1일
Can I obtain background from roifill() function? if no, is there any way to do that?
Image Analyst
Image Analyst 2015년 6월 1일
You have to first find the foreground objects so you have a binary image of the foreground, then you can fill them in. I suggest you follow up on Dima's answer as that is the best way.

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


RAJASHEKHARA REDDY
RAJASHEKHARA REDDY 2017년 1월 13일
if true
% code
end

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by