Automating setup and plot creation?

46 views
Skip to first unread message

Alexei Sondergeld

unread,
Jun 18, 2024, 2:45:43 PMJun 18
to PIVlab
I have 224 data sets (mp4 files) that need to be processed in PIVLab. I'm looking to use the same masks, same streamline origin points, etc. and make 224 comparable plots. As of now, I don't see a way to do that other than to manually load the masks etc. in the GUI and then do a batch run, then open each resulting batch session file one by one and setup and export videos and images.

After running a batch, it saves session files which can be opened in the GUI for making and exporting plots (great for one-off analyses but tedious for 200+ plots), but where is the actual data in the mat file? I opened the session file in Matlab but don't see any kind of plot file or anything, just lots of variables that were things like filenames and setting values. 

Ideally, I'd like to, for example, automatically apply a mask, calibration, and streamline-rake location, as well as tell it to always add a colorbar etc., and export an mp4 of resulting plots for all files without having to re-do all of the setup for every file or having to make a custom program to do so. Is there a way to do this?

William Thielicke (Shrediquette)

unread,
Jun 19, 2024, 4:02:17 AMJun 19
to PIVlab
Generally, I would not recommend to process video files in PIVlab. It has several disadvantages. It is always better to process images, not videos.
You already discovered how to do batch analyses in the PIVlab GUI. You could ow use the Example_process_PIVlab_session_file.mlx to process the resulting session files, generating fully customizable plots for each session.

Alexei Sondergeld

unread,
Jun 19, 2024, 10:19:29 AMJun 19
to PIVlab
Is there any written documentation for how to set up a .mlx file anywhere? I see a couple people responded to my questions with answers about a .mlx file. 

The data is already saved as uncompressed .avi videos - saving as images in our setup would have been prohibitively time consuming and difficult to work with. (We originally were saving as images in individual files, an our camera software required manually creating, then naming, the file, then creating the base-name for the images, which adds up over almost a thousand manually-set-up trials; video we just had to name the video and this saved a huge amount of time).

William Thielicke (Shrediquette)

unread,
Jun 19, 2024, 10:29:37 AMJun 19
to PIVlab
I just double -click the mlx file and then edit the code... Maybe you have an older Matlab version that does not support mlx?

Alexei Sondergeld

unread,
Jun 19, 2024, 10:58:35 AMJun 19
to PIVlab
I've never seen an mlx file and it doesn't create one. Is there a way to make one from scratch?

William Thielicke (Shrediquette)

unread,
Jun 19, 2024, 11:44:17 AMJun 19
to PIVlab
Just open and edit  Example_process_PIVlab_session_file.mlx

Alexei Sondergeld

unread,
Jun 20, 2024, 12:22:00 PMJun 20
to PIVlab
Where is this file supposed to be located? I searched my entire hard drive and didn't find any .mlx files. Do I have to download it from somewhere online?

William Thielicke (Shrediquette)

unread,
Jun 21, 2024, 4:54:50 AMJun 21
to PIVlab
Hi, the file is in the PIVlab folder. The PIVlab folder location can be found (I think) when you click on manage addons, and then show path or something similar. I admit that this is a bit intransparent, but nothing I could change.

William

unread,
Jun 27, 2024, 4:56:35 AM (9 days ago) Jun 27
to PIVlab
Here are the instrucions on how to find the relevant mlx file:
Reply all
Reply to author
Forward
0 new messages