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!