MATLAB: Use subplot play video

subplotvideo

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');

Best Answer

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
Related Question