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!