How to Capture frames from live streaming using camera? Each Time when the start button is clicked it should capture images after 5 seconds pause and save the images session-wise.
조회 수: 3 (최근 30일)
이전 댓글 표시
I have tried the following code,
(1) I want to the camera to stop when the session ends and strat again when the start button is clicked.
(2) I want to save the captured frames session wise into the folder.
please help me , I am biggner to MATLAB
% --- Executes on button press in camerabutton.
function camerabutton_Callback(hObject, eventdata, handles)
Folder = 'CapImages\';
vid = handles.cam;
axes (handles.axes1)
hImage=image(zeros( 720,1280,3),'Parent',handles.axes1);
hImage = image(handles.axes1 ,zeros(720,1280,3));
preview (vid,hImage);
guidata (hObject, handles);
for iframe = 1:10;
frames = snapshot(vid);
pause(5);
imwrite(frames, fullfile(Folder, sprintf('%0d.jpg',iframe)));
end
f = msgbox({'Operation';'Completed'});
preview(vid)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!