Spatial vector field with original image

216 views
Skip to first unread message

Thiago Borges

unread,
May 28, 2021, 5:47:45 AM5/28/21
to PIVlab
Hi,

First of all, thank you very much for your contribution to te community by making PIVlab available to us all. 

I have little experience with dealing with images in matlab. I want to create an image with the velocity magnitude calculated for the area outside the mask, together with the original image from the camera at area where I defined the mask. This would improve the understanding of the vector field greatly. do you happen to have any advice on how to do that?

Thanks again!  

William Thielicke

unread,
May 28, 2021, 10:11:35 AM5/28/21
to PIVlab
Hi, you can do that outside Matlab/PIVlab:
  1. Export the image with the velocity magnitude
  2. Go to plot -> modify plot appearance, enable 'hide vectors' and set mask transparency to 100%
  3. Export image again (now only showing your original data)
  4. Now both images have the same size, so you can just use photoshop etc to overlay them and display seperate portions of the image.

sara venuleo

unread,
Oct 6, 2022, 10:31:35 AM10/6/22
to PIVlab
Hello !
Thank you very much for your great contribution, and for sharing it.
As Thiago, I would like to overlay the computed vector field and the original image. 
I tried to follow your advice above, but, at step 2), when I hide the vectors and set the mask transparency to 100%, I do not see the original image. 
Instead, I see the pre-processed image (so only the seedings on a black background). Therefore, I cannot export my original image with the same size of the velocity field image (this is a requirement to overlay the two images in a second step using the matlab command ''imlincomb(0.4,original_image,0.6,velocity_field).
I tried to find a workaround by starting a new PIVlab session, importing the raw images and launching a new fake analysis, avoiding any pre-processing step. In this way I can have my original image displayed (and so I can export it) if I go to plot -> modify plot appearance, enable 'hide vectors' and set mask transparency to 100%.
This solution works but it is rather time consuming, I am not 100% sure that the overlay is exact (specially with streamlines-images, which have a slightly different size). 
Is there a simpler way to reload the original image on the background of the vector field ( or streamlines field or velocity filed) ?

Thank you very much for your help!
Kind Regards,

                                                     Sara Venuleo

William Thielicke (Shrediquette)

unread,
Oct 8, 2022, 2:18:36 AM10/8/22
to PIVlab
Hi, have you disabled "plot -> modify plot appearance -> enhance PIV image display"?

sara venuleo

unread,
Oct 13, 2022, 10:43:12 AM10/13/22
to PIVlab
Hello! Thank you for the answer!
Yes,  whether the ''enhance PIV display '' is active or not, nothing changes, and I cannot go back to the original image. 
But starting a new session and reloading the images works,  so there is a workaround ..
Thanks!

Sara
Reply all
Reply to author
Forward
0 new messages