필터 지우기
필터 지우기

I want to create interrupts

조회 수: 2 (최근 30일)
Adisorn Phanukthong
Adisorn Phanukthong 2017년 5월 15일
편집: Adisorn Phanukthong 2017년 5월 15일
% Video preferences
%vid = videoinput('winvideo', 1); % Next line is alternative to this one if you know the format
vid = videoinput('winvideo', 1, 'MJPG_1280x720');
% vid.FramesPerTrigger = Inf;
vid.TriggerRepeat = Inf;
set(vid, 'ReturnedColorSpace', 'RGB') ;
set(vid,'FrameGrabInterval', 3);
% Preview
figure
% Get frames
start(vid);
wait(vid,inf);
% frames = getdata(vid);
vid.FramesAvailable
% Save frames
while(vid.FramesAvailable >= 2)
data = getdata(vid,2);
diff_im = imabsdiff(data(:,:,:,1),data(:,:,:,2));
diff_im
imshow(diff_im);
drawnow % update figure window
end
% folder = strcat(foldername, '/');
% for k = 1 : framenumber
% mov(k).cdata = frames(:,:,:,k);
% imagename=strcat(int2str(k), '.jpeg');
% path = strcat(folder, imagename);
% imwrite(mov(k).cdata, path);
% end
stop(vid);
delete(vid);
clear vid;
The requirement is that I do not have interrupt support for capture time. Want to help Want to clear When using images that capture frames per frame
  댓글 수: 2
KSSV
KSSV 2017년 5월 15일
Question is not clear.....can you elaborate? What you want to do?
Adisorn Phanukthong
Adisorn Phanukthong 2017년 5월 15일
편집: Adisorn Phanukthong 2017년 5월 15일
The program wants to record a room image in real time, save a frame per frame. Time will take the previous frame to remove it to the next frame and continue processing in the program. But still not able to clear data when the result is finished.And get the data processing is done and delete the data all the time.

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

답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by