필터 지우기
필터 지우기

Multiple image subtractions that is comming from live camera

조회 수: 3 (최근 30일)
piku mandal
piku mandal 2018년 9월 18일
댓글: piku mandal 2018년 9월 20일
I am capturing multiple images with the help of live camera and save into a file.Now i want to substract multiple images that is comming from live camera and store into a file.How is it possible in matlab and code.Thank You in advance.

답변 (1개)

KSSV
KSSV 2018년 9월 18일
Let I1 and I2 be the image data obtained by using imread. Assuming they are of same dimensions:
I = I1-I2 ;
  댓글 수: 7
Walter Roberson
Walter Roberson 2018년 9월 18일
obj = videoinput('macvideo', 1); %use winvideo for Windows
obj.ReturnedColorSpace = 'rgb'; %you might need this
%then
for i=1:2 % (for 2 frames)
frame=getsnapshot(obj); %(taking snapshot from live camera and this is 1st frame)
if i~=1
sub_tracted_frame=imsubtract(frame, frame_pre);
imshow(sub_tracted_frame);
drawnow();
end
frame_pre = frame;
end
piku mandal
piku mandal 2018년 9월 20일
Thank You Walter Roberson, sir.

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

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by