Shrediquette / PIVlab

Particle Image Velocimetry for Matlab, official repository
https://shrediquette.github.io/PIVlab/
MIT License
126 stars 32 forks source link

Add video import functionality #1

Closed Shrediquette closed 3 years ago

Shrediquette commented 3 years ago

Videos should be possible to read in PIVlab. Best option imho: Add button next to the "Load Images" button: "Load Video". That should open a small window where a filename can be selected, and something like "skip n frames" to reduce the frame rate. The video must be treated the same way that currently image files are treated. Current situation:

            if strcmp(ext,'.b16')
                currentimage=f_readB16(filepath{selected});
            else
                currentimage=imread(filepath{selected});
            end

Add sth like: If is_video == true currentimage = read(videoobject,selected); end

videoreader function was introduced in R2010b, so this feature cannot be available in R2010a

Shrediquette commented 3 years ago

The video should be read in the beginning and the video object sould be stored as appdata. Then, during sliderdisp etc., currentimage is assigned a frame from the video object.

Shrediquette commented 3 years ago

Add comfortable video previewer that makes it easy to select start and end frame.

Delta t in calibration should be updated automatically, based on frame rate and skip factor

All this needs to be stored and retrieved from session file

Shrediquette commented 3 years ago

Implemented in video_import branch, which will very soon be merged to main after testing has completed.