用MATLAB GUI创建两个按钮 点击按钮打开一段视频 在点击另一个播放视频...
发布网友
发布时间:2024-10-24 13:10
我来回答
共1个回答
热心网友
时间:2024-11-10 07:16
大概是这样的把
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile( '*.avi', '开始');
readerobj = mmreader([pathname,filename]);
vidFrames = read(readerobj);
numFrames = get(readerobj, 'numberOfFrames');
for k = 1 : numFrames
mov(k).cdata =vidFrames (:,:,:,k);
mov(k).colormap = [];
end
movie(handles.axes1,mov,1,readerobj.FrameRate);