function pushbutton6_Callback(hObject, eventdata, handles)
[chosenfile, chosenpath] = uigetfile('*.mp4', 'Select a video');
if ~ischar(chosenfile)
return;
end
filename = fullfile(chosenpath, chosenfile);
set(handles.edit50, 'String', filename);
function pushbutton7_Callback(hObject, eventdata, handles)
filename = get(handles.edit50, 'String');
if ~exist(filename, 'file')
warndlg( 'Text in edit box is not the name of a file');
return
end
try
obj = VideoReader(filename);
catch
warndlg( 'File named in edit box does not appear to be a usable movie file');
return
end
axes1 = handles.axes1;
obj = VideoReader(filename);
while hasFrame(obj)
vidFrame = readFrame(obj);
image(vidFrame, 'Parent', axes1);
set(axes1, 'Visible', 'off');
pause(1/obj.FrameRate);
end
clear obj