use subplot play video

18 views (last 30 days)
Pan
Pan on 19 Feb 2012
Edited: dpb on 16 Oct 2013
Hi,I need to help.
This code could show image in same figure, but I want to play video not image,I don't know how to do.
subplot(1,2,1), imshow('autumn.tif');
subplot(1,2,2), imshow('glass.png');

Accepted Answer

Chandra Kurniawan
Chandra Kurniawan on 19 Feb 2012
Hi, maybe
obj = mmreader('xylophone.mpg');
vid = read(obj);
for frame = 1 : size(vid,4)
bw = im2bw(vid(:,:,:,frame));
subplot(2,1,1); imshow(vid(:,:,:,frame));
subplot(2,1,2); imshow(bw);
drawnow;
end
  2 Comments
Pan
Pan on 19 Feb 2012
Hi, may I ask you the quwstion.
I want to play the video, for example "can.avi" and "watch.avi" and "book.avi" and " phone.avi". I try it but the code doesn't play.
Chandra Kurniawan
Chandra Kurniawan on 20 Feb 2012
This code is used for 1 video only..
Please try implay for several videos.

Sign in to comment.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!