MATLAB: How to convert binary frames into movie

image & video processing

How can I convert sequences of binary images into movie.avi?

Best Answer

bw = colormap(gray(2));
Then for each frame
frame = im2frame(uint8(YourBinaryImage), bw);
then use VideoWriter to write the frame; see http://www.mathworks.com/help/matlab/ref/videowriter-class.html
Related Question