"Load External masks"

classic Classic list List threaded Threaded
3 messages Options
sci_tech_boy sci_tech_boy
Reply | Threaded
Open this post in threaded view
|

"Load External masks"

I think that "load external mask" option is not working properly. After adding the mask mat file containing xmask and ymask, mask is not coming in the frames.  Hence the entire image is getting analysed.  
William William
Reply | Threaded
Open this post in threaded view
|

Re: "Load External masks"

Hi,
I will check that and provide a fix if necessary!

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

William William
Reply | Threaded
Open this post in threaded view
|

Re: "Load External masks"

In reply to this post by sci_tech_boy
I checked it, and it works fine. I think my description is not good enough, so I will add this example script in the next release:

Me wrote
clear all;
close all;
clc;
disp('This example creates a series of masks outside PIVlab.')
disp('It teaches you how you can create your own masks, independent of PIVlab.')
fig=figure;
set(fig,'Name','Select your mask. Right click exits and loads next image.')
for i=1:3
    A=imread(['PIVlab_Karman_' sprintf('%0.2d',i) '.bmp']);
    [junk,xmask_temp,ymask_temp]=roipoly(A);
    xmask(1:size(xmask_temp,1),i)=xmask_temp;
    ymask(1:size(ymask_temp,1),i)=ymask_temp;
end
close(fig)
clearvars -except xmask ymask
save external_mask_test.mat
disp('Start a new session in PIVlab, and load the images ')
disp('PIVlab_Karman_01.bmp until PIVlab_Karman_04.bmp')
disp('Select sequencing style 1-2, 2-3, 3-4')
disp('To apply the masks, you can now click ''Load external masks''.')
Please test it and tell me if it works for you.

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.