Precisions on vector extractions and mask for further analysis

21 views
Skip to first unread message

O. Foussadier

unread,
Jun 17, 2024, 5:48:25 AMJun 17
to PIVlab
Hello ! First thank you for this nice tool !

I have several questions for which I did not find the information yet, or missed it.

- I have to export the velocity vectors to analyse and correlate them relatively to other quantities of my system but I am not sure about the meaning of the positions x and y. Are they corresponding to the "starting" point of the velocity vector , or the middle point of the velocity vector ?

- I would also like to work with the mask I applied for my next analysis but I don't understand what the mask matlab object I exported contains and if there is a not too complicated way to obtain the contour. Could you enlight me on this ?

-Finally, I noticed that the mask was applied on the GUI but when I export, on the divergence for exemple, it is not directly applied. Is it normal ? Or should/could I do something for that ?

Thanks a lot for your help,
Best regards,
Oriane

William Thielicke (Shrediquette)

unread,
Jun 19, 2024, 3:56:48 AMJun 19
to PIVlab
Hi,
- in Matlab/PIVlab, the default is that the velocity  vectors start at the grid point. So x and y correspond to the starting point of the vector.
- If you save your masks from PIVlab, you can open the resulting mat file in Matlab and edit the coordinates if you like. e.g. like tis:

I = imread('baby.jpg');
figure; imshow(I); 
mask_coordinates=cell2mat(masks_in_frame{1,1}(1,2))
h = drawpolygon('Position',mask_coordinates);

- Your third question is discussed here: https://groups.google.com/g/pivlab/c/PNKN1GRDPzw/m/OnyPK1vPAAAJ

O. Foussadier

unread,
Jun 21, 2024, 3:49:53 AMJun 21
to PIVlab
Perfect ! Thank you very much for these precisions, exactly what I needed !
Reply all
Reply to author
Forward
0 new messages