Dear George, I feel honored to read your comment here :) I have removed the possibility to work directly with video files for the following reasons:
*Some people use highly compressed mobile phone videos with awful quality, and that generates a lot of support work.
*Parallel processing does in principle not work with video files (AFAIK), as this would require to open one video file multiple times and extract the desired frames.
*Video files introduce codec and compatibility problems that image sequences avoid. Matlab cannot read all video formats.
*Video import is more prone to software bugs than loading image sequences, as this requires two separate paths in the software
*Image sequences are easier to inspect, verify, and troubleshoot.
*Converting videos to image sequences is simple and avoids many common support issues.
If your workflow allows this, please just use
v = VideoReader('video.avi');
k = 1;
while hasFrame(v)
imwrite(readFrame(v), sprintf('img_%04d.tif',k));
k = k + 1;
end
Why do you prefer avi files over separate images? Maybe consider using multi-tiffs (supported in PIVlab) if it is important for your to have a set of images in a single file.
Cheers,
William