Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
control button separately
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Oleg Komarov
il 25 Feb 2012
Please format it: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Walter Roberson
il 25 Feb 2012
You do not need separate play and stop buttons: you can use a single "radio button" that changes labels between "play" and "stop".
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!