background subtraction method using frame difference?

조회 수: 4 (최근 30일)
ramya
ramya 2018년 1월 12일
댓글: kalli 2018년 6월 28일
i am attaching code and video please let me know which part i am going wrong. i am not able to separate background and foreground images using frame difference method. a=VideoReader('G:\test.mp4'); b = read(a,1); c=rgb2gray(b); imshow(c); nframe=a.NumberOfFrames; [l m] =size(c); tic for i=110:120 d =read(a,i); e=rgb2gray(d); figure imshow(e); for i=1:l for j=1:m v(i ,j)= c(i, j)- e(i, j); end if (v(i,j)~=0) v(i,j)=0; else v(i,j)=1; end end end figure imshow(v);
  댓글 수: 1
kalli
kalli 2018년 6월 28일
no problem in the code. i tried this and i am getting output.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by