How to make image sequence from video or images?

3 views (last 30 days)
I want to make image sequence(.mat) file like (width x height x framerate unit8)
However, I followed the web page describing video to image sequences, it converted to (width x height x 3).
How can I make image sequence like the attachment file.

Answers (1)

Von Duesenberg
Von Duesenberg on 24 Jun 2018
Edited: Von Duesenberg on 24 Jun 2018
A quick look tells me that Alpaca probably contains 55 grayscale images whereas img is a color image with 3 channels corresponding to RGB. So if you want to stack color images, you need a 4-D array:
newArray = zeros(size(img,1), size(img,2), size(img,3), nbIm, 'uint8')
where nbIm if the number of images. Then:
newArray(:,:,:,idx) = img
for idx from 1 to nbIm.

Community Treasure Hunt

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

Start Hunting!