Info
この質問は閉じられています。 編集または回答するには再度開いてください。
control button separately
1 回表示 (過去 30 日間)
古いコメントを表示
Hellow everyone,
I want to ask about control button's question.
This is my code
clear all;
obj = mmreader('watch.avi');
obj1 = mmreader('can.avi');
obj2 = mmreader('phone.avi');
obj3 = mmreader('book.avi');
vid = read(obj);
vid1 = read(obj1);
vid2 = read(obj2);
vid3 = read(obj3);
%for frame = 1 : size(vid,4)
% bw = im2bw(vid(:,:,:,frame));
frame = 1;
frame1 = 50;
frame2 = 30;
frame3 = 1;
f4 = 1;
while (1)
subplot(2,2,2); imshow(vid(:,:,1,frame));
if frame < size(vid,4)
frame = frame+1;
else frame = 1;
end
subplot(2,2,1); imshow(vid1(:,:,:,frame1));
if frame1 < size(vid1,4)
frame1 = frame1+1;
else frame1 = 1;
end
subplot(2,2,3); imshow(vid2(:,:,2,frame2));
if frame2 < size(vid,4)
frame2 = frame2+1;
else frame2 = 1;
end
subplot(2,2,4); imshow(vid3(:,:,:,frame3));
if frame3 < size(vid1,4)
frame3 = frame3+1;
else frame3 = 1;
end
drawnow;
if f4 > 500
break;
else f4 = f4+1;
end
end
then,I want to use button that control video.
Everyone video has two buttons(play,stop), so I have four videos,I must have eight buttons that control video,and set up one button controling "close" figure.
So,total of nine buttons,I must how to do.
please give me advice.Thanks!
2 件のコメント
Oleg Komarov
2012 年 2 月 25 日
Please format it: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Walter Roberson
2012 年 2 月 25 日
You do not need separate play and stop buttons: you can use a single "radio button" that changes labels between "play" and "stop".
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!