フィルターのクリア

control of play video

2 ビュー (過去 30 日間)
Pan
Pan 2012 年 8 月 5 日
Hi, currently ,I have one code.
function f1()
clear all;
load totalbook xi idxip
obj1 = mmreader('keybook.avi');
vid1 = read(obj1);
frame1 = 1;
f4 = 1;
hst1=0;
h = figure('Name','Video ', 'NumberTitle','off','Color',[1,1,1],'Toolbar','none','Visible','on', 'Position',[10 40 1350 700],...
'Resize','on','menu','none');
hstat1 = uicontrol('unit','pixel','style','checkbox','value',0,'position',...
[50 420 25 25],'units','normalized');
hplay1 = uicontrol('unit','pixel','style','pushbutton','string','書本_PLAY',...
'position',[50 420 70 40],'backgroundColor',[0.3,0.7,1],'units','normalized','callback',{@play1_callback});
hstop1 = uicontrol('unit','pixel','style','pushbutton','string','書本_STOP',...
'position',[50 320 70 40],'backgroundColor',[0.2,1,0],'units','normalized','callback',{@stop1_callback});
hori1 = uicontrol('unit','pixel','style','pushbutton','string','書本_ORI',...
'position',[50 220 70 40],'backgroundColor',[1,1,0.3],'units','normalized','callback',{@ori1_callback});
hexit = uicontrol('unit','pixel','style','pushbutton','string','EXIT',...
'position',[50 120 70 40],'backgroundColor',[1,0,0],'units','normalized','callback',{@exit_callback});
while (1)
if hst1==1
subplot(1,1,1);
imshow(vid1(:,:,:,frame1));
title('keyframe video');
if frame1 < size(vid1,4)
pause(1);
frame1 = frame1+1;
else
pause(1);
frame1 =1;
end
end
drawnow;
if f4 ==15
break;
% else f4 = f4+1;
end
end
function play1_callback(hObject0,eventdata0)
set(hstat1,'value',1);
hst1=1;
set(hplay1 ,'backgroundColor',[1,1,0],'string','書本_播放中');
end
function stop1_callback(hObject,eventdata)
set(hstat1,'value',0);
hst1=0;
set(hplay1 ,'backgroundColor',[0.3,0.7,1],'string','書本_PLAY');
frame1
end
function ori1_callback(hObject,eventdata)
set(hstat1,'value',0);
hst1=0;
set(hori1 ,'backgroundColor',[0,0.3,0.9],'callback','bookindexl');
bookindexl(frame1);
end
function exit_callback(hObject,eventdata)
f4=15;
stop1_callback;
close gcf;
end
end
this is play video, but now I must play other video that is produce other code have play same figure. How to I do ,pleas teach me ,thank you!!

回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by