PIVlab update 1.32

Changes

piv_FFTmulti.m:

  • Updated analysis progress report
  • During analysis, the PIVlab main window is not forced to get the focus
  • Corrected bug: Case sensitivity for "smoothn" in newer Matlab versions (thanks to Eileen)

PIVlab_commandline:

  • Corrected bug were u and v were confused in data validation

PIVlab_GUI.m:

  • Clear all masks: Confirmation dialogue
  • Apply current mask to a custom selection of frames
  • Export data to binary VTK file for Paraview
  • Exported files now respect the "subtract flow" values
  • Quit PIVlab confirmation dialogue
  • Calculate mean vectors of a custom selection of frames
  • Corrected bug during export with filenames containing a point (".", thanks to Orest)
  • Corrected bug: Case sensitivity for "smoothn" in newer Matlab versions
  • Corrected bug when using colored calibration images
Download PIVlab 1.32 now:
PIVlab @ Matlab File Exchange

Comments

  1. I'm hoping to use this tool to analyze my PIV experiment but I'm not sure what the different colors mean or how to get the time step (running at 1400 fps = ?ms) information. I'm new to this type of experiment and analysis. If there is anyone that can give me some more information, it would be greatly appreciated. Also, I was trying to calibrate using an external image but it kept coming up with a number of errors:
    Error using adapthisteq
    Expected input number 1, I, to be two-dimensional.

    Error in adapthisteq>parseInputs (line 417)
    validateattributes(I, {'uint8', 'uint16', 'double', 'int16', 'single'}, ...

    Error in adapthisteq (line 155)
    [I, selectedRange, fullRange, numTiles, dimTile, clipLimit, numBins, ...

    Error in PIVlab_GUI>load_ext_img_Callback (line 2364)
    caliimg=adapthisteq(imread(fullfile(pathname, filename)));

    Error in gui_mainfcn (line 96)
    feval(varargin{:});

    Error in PIVlab_GUI (line 31)
    gui_mainfcn(gui_State, varargin{:});

    Error while evaluating uicontrol Callback

    Thanks for the help!

    ReplyDelete
    Replies
    1. Hello,
      are you sure that you have the latest PIVlab version? The error message you describe was fixed in the latest release (at least I hope so...). You are using a color image for calibration, and versions before PIVlab 1.32 did only accept 8 bit grayscale images.
      If you recorded your images with 1400 fps, your timestep is 1/1400 seconds = 0.714286 ms .
      I recommend to have a look at the pdf help file. It is just a quick walkthrough, I know, but I am currently working on the detailed documentation.

      Delete
    2. william

      i have question?? wat vortex locator exactly do??

      is it possible to find the vortex size and vortex strength using it??

      Delete
    3. Hi,
      the vortex locator only finds the vortex core (like the Q-criterion). Its scalar magnitude doesn't have any meaning. In my opinion, the strength of a vortex is defined by its circulation. You can measure the circulation of a vortex in PIVlab too.

      Delete
    4. Hi William,

      I'm interested in learning how the vortex locator function works. I've tried working it out from the PIVlab_GUI.m file but it's not obvious. Thanks for any advice.

      David

      Delete
  2. Hi,
    I'm trying to analyze some pictures and these are the errors it sends me:

    Error using median (line 28)
    First input must be single or double.

    Error in PIVlab_preproc (line 24)
    up_lim_im_1 = median(in_roi(:)) + n*std2(in_roi); % upper limit for image 1

    Error in PIVlab_GUI>AnalyzeAll_Callback (line 1647)
    image1 = PIVlab_preproc (image1,roirect,clahe,
    clahesize,highp,highpsize,clip,clipthresh,intenscap);

    Error in gui_mainfcn (line 96)
    feval(varargin{:});

    Error in PIVlab_GUI (line 32)
    gui_mainfcn(gui_State, varargin{:});

    Error while evaluating uicontrol Callback

    I have the latest update (1.32) so not sure what I'm doing wrong. Any help is appreciated.
    Thanks

    ReplyDelete
    Replies
    1. Seems to be happening when I'm trying to use the different options in the image pre-processing section under the Analysis settings tab. I was trying to have it use the Enable CLAHE (what does this stand for?) and Enable intensity capping. I'm not really sure what any of these settings (all 4 options in the image pre-processing) do but I wanted to try them out.
      Thanks.

      Delete
    2. Hello,
      I can not reproduce the error message you get. If you like, you can send me your images, along with a description what steps you did until the error appears.
      If you google for CLAHE / Intensity capping / highpass, you'll get a detailed description. Clipping sets image intensities below the threshold to zero.

      Delete
  3. I am trying to figure out a way to divide up my image into a grid and keep track of the grid so that I can consistently use the same grid on different files that I will be analyzing. Specifically, when finding the area mean flow direction from the extractions tab. Is there a good way to keep track of this type of grid? I am required to use the same grid for each set of files that I will be analyzing otherwise I will introduce errors into the analysis.
    Thanks for your help.

    ReplyDelete
  4. Same person from above comment.
    I will also be doing this type of analysis for many files. Do you think it would be possible to automate the PIVlab to do the analysis?
    Thanks again.

    ReplyDelete
    Replies
    1. Hello,
      you could try to use the "markers" feature of PIVlab (Plot -> Markers / distance / angle). They will be remembered even if you start a new session. But maybe it would be more pratical to export all results to Matlab, then calculate your average velocities manually using Matlab.

      Delete
  5. Hi,
    I have recently started using PIVLab (1.32). It is truly an excellent software. It runs very well on my Windows machine, but on my Macbook Pro (snow leopard) the program does not progress beyond the first frame. It stops after 3 passes on the first frame with the following error message:

    ??? Operands to the || and && operators must be convertible to logical scalar
    values.

    Error in ==> axis>allAxes at 450
    result = all(ishghandle(h)) && length(findobj(h,'type','axes','-depth',0)) ==
    length(h);

    Error in ==> axis at 57
    if ~isempty(varargin) && allAxes(varargin{1})

    Error in ==> scatter at 31
    axis([xmin xmax xmin xmax])

    Error in ==> PIVlab_GUI>sliderdisp at 454
    scatter(x(typevector==0),y(typevector==0),'rx') %masked

    Error in ==> PIVlab_GUI>AnalyzeAll_Callback at 1707
    sliderdisp

    Error in ==> gui_mainfcn at 96
    feval(varargin{:});

    Error in ==> PIVlab_GUI at 32
    gui_mainfcn(gui_State, varargin{:});

    ??? Error while evaluating uicontrol Callback

    Can you please help with this one? I would really appreciate it.

    Also, right at the time of loading the GUI, it can not load Default Settings ("Could not load default settings.")- when I tried to load it manually, I get the following error message:

    ??? Input argument "ard" is undefined.

    Error in ==> pass2 at 16
    [num,dummy] = size(ard);

    Error in ==> PIVlab_GUI>read_settings at 1932
    set(handles.checkbox26, 'value',pass2);

    Error in ==> PIVlab_GUI>load_settings_Callback at 1894
    read_settings (FileName,PathName)

    Error in ==> gui_mainfcn at 96
    feval(varargin{:});

    Error in ==> PIVlab_GUI at 32
    gui_mainfcn(gui_State, varargin{:});

    ??? Error while evaluating uimenu Callback

    Please help if you can - I would really like to be able to use it on both platforms. Thank you very much.
    Best,

    Trush Majmudar
    Courant Institute of Mathematical Sciences
    NYU

    ReplyDelete
    Replies
    1. Hi Trush,
      well, I am not sure if I can help, as I don't have a Mac, and the errormessages you gave are not caused by my code. It seems that the Matlab built-in functions "scatter" and "axis" and "size" are defined differently on a Mac and on a PC. This seems too be very strange however... But I can't find the error without using a Mac :-(

      Delete
  6. Solwave

    I just started using PIVlab and I like very much. I have some quick question from not expert.
    After applying High pass vector, vortices appeared and I want to measure the velocity and the circulation ..using extractions but the image come back to the one before applying High pass vector. Is there a trick which I missed?
    I tries to do it in matlab. I saved the results in matlab worspace. The plot using quiver with the original velocities give a correct image but with smoothed and filtered I got vector even in the masked part and the vector starts from the center of the image.
    Thanks you for your help.

    ReplyDelete
    Replies
    1. High pass only modifies the display, NOT the data. I think this is also mentioned somewhere.
      Any application of data highpassing would severely modify the data and all the results (including velocities, derivatives, circulation). Therefore I decided that highpass only modifies the display.

      Delete
    2. First, thank you for your prompt reply. Sorry for coming back to the question. After saving all results in workspace and using quiver to display the results u_original and v_original display the expected results while using same command with u_filtered and v_filtered and u_smoothed and v_smoothed the display is awkward (I got velocity in the region where I am applied an mask) can you tell me what I am doing wrong? Thank for you help and appreciate it much.

      Delete
    3. PIVlab inter- and extrapolates data to regions where you applied a mask. This is needed for calculating derivatives close to the edge of a mask. However, PIVlab ignores the velocities inside a masked region after having calculated the derivatives.
      So please use this command to quiverplot your velocity data correctly:

      figure;quiver(x{1,1}(typevector_filtered{1,1}~=0),y{1,1}(typevector_filtered{1,1}~=0),u_filtered{1,1}(typevector_filtered{1,1}~=0),v_filtered{1,1}(typevector_filtered{1,1}~=0))

      This will only plot velocities where no mask was applied (typevector ~= 0)

      Delete
    4. Hi
      thank you very much for your time and also for the tool.

      Delete
    5. is there a way to extract the data after I've applied the Highpass?

      Delete
    6. No, but you could program your own high-pass in Matlab.

      Delete
  7. Hi;
    With pivlab one can have tangential velocities around 30 concentric circles.
    My first question can one ask for more than 30 circles.
    The second question how one can have for the same 30 circle the radial velocities.
    Thank you.

    ReplyDelete
    Replies
    1. Hi! The reason for my projects being open-source is not that I hate getting paid for my work, but that everyone can make changes to the code. You can open PIVlab_GUI.m, and then search for "30" and replace it with a number of your choice. I think that the number "30" appears mostly in the tangential velocity portion of the program.

      Delete
    2. This comment has been removed by the author.

      Delete
  8. Hi thank you for your reply.
    it is what I have done I am modified the code to meet my needs.
    Thank you for the code which I like much.

    Best regards

    ReplyDelete
  9. Hi william,

    I,m in Civil Engineering, and I think your tool is very useful for my current research project. Right now I'm using PIVlab 1.32 for measuring the change of velocities of certain points in my photos. However, the problem is always has thousands of pictures I need to handle with, so for each photo, I have to manually to pick up these points and record their velocities individually, but this is not practical for thousands of pictures. And also you porbably know that those points I need to track are always move along a certain direction. Can you help me solve that problem? Thanks a lot.

    ReplyDelete
  10. hi . I am trying to use LIC but getting following errors:

    Error using mex (line 206)
    Unable to complete successfully.
    Error using fastLICFunction (line 24)
    could not locate MEX file for fastLICFunction

    Error in PIVlab_GUI>LIC (line 2789)
    [LICImage, intensity,normvx,normvy] = fastLICFunction(vx,vy,noiseImage,kernel); %
    External Fast LIC implemennted in C language

    Error in PIVlab_GUI>derivative_calc (line 2728)
    derived{9,frame}=LIC(v*caluv-subtr_v,u*caluv-subtr_u,frame);

    Error in PIVlab_GUI>apply_deriv_all_Callback (line 2954)
    derivative_calc(i,deriv,1)

    Error in gui_mainfcn (line 96)
    feval(varargin{:});

    Error in PIVlab_GUI (line 32)
    gui_mainfcn(gui_State, varargin{:});

    Error while evaluating uicontrol Callback

    ReplyDelete
  11. Hello William,
    I have been using your software during the past months. I am trying to determine the flow velocity in a microfluidic device. I’ve noticed that for my experiments the function ‘mean vectors' doesn’t work for me, mainly because in my experiment I don’t have a large concentration of tracers dispersed in the fluid, but rather a few ‘white’ dots in the field of view. So if I take the mean (of say 100 images), then I average over many ‘zeros’ (it takes several images for the next tracer to get into the region of interest). I like the fact that the mean reduces significantly the noise and makes the vector field very smooth, but in terms of velocity magnitude is not correct (my velocity flow field is always slower than it should be). Is it possible to replace the mean with the maximum value of the vectors in a stack of frames? If so, how to do it? Thank you very much for your help

    ReplyDelete
    Replies
    1. Dear Ethan,
      there are several possible solutions to your problem:
      You could e.g. average a couple of your video frames before analysis to get more particles per image.
      You could also make sure that all the areas where there are no particles become completely black (e.g. by setting a treshold in Photoshop or Matlab). Black areas are not correlated in PIVlab, the vectors in these areas will be NaN. If you average all your analyzed frames in the end, NaNs are ignored and you will get the correct mean velocity.
      Cheers,
      William

      Delete
    2. William, your suggestions worked pretty well, WOW. Thank you very much!

      Delete
  12. Hi,
    I'm using your software to process the images I took during my lab PIV practice at university. My question is: if I save the results in Matlab workspace, what is the difference between u_original and u_filtered for example? I can explain better: do the results saved as u_original take into account post-processing vector validation or are the u_original values the ones resulting before doing vector validation?

    Thank you very much for your help.

    ReplyDelete
    Replies
    1. Hi, yes, u_original is the data that results from the correlation, u_filtered is the validated and interpolated data, and u_smooth is the filtered and smoothed data.

      Delete
  13. Thank you very much for your reply!

    ReplyDelete
  14. HI WILLIAM

    whenever i try to use LIC , i get following errors:

    hi . I am trying to use LIC but getting following errors:

    Error using mex (line 206)
    Unable to complete successfully.
    Error using fastLICFunction (line 24)
    could not locate MEX file for fastLICFunction

    Error in PIVlab_GUI>LIC (line 2789)
    [LICImage, intensity,normvx,normvy] = fastLICFunction(vx,vy,noiseImage,kernel); %
    External Fast LIC implemennted in C language

    Error in PIVlab_GUI>derivative_calc (line 2728)
    derived{9,frame}=LIC(v*caluv-subtr_v,u*caluv-subtr_u,frame);

    Error in PIVlab_GUI>apply_deriv_all_Callback (line 2954)
    derivative_calc(i,deriv,1)

    Error in gui_mainfcn (line 96)
    feval(varargin{:});

    Error in PIVlab_GUI (line 32)
    gui_mainfcn(gui_State, varargin{:});

    Error while evaluating uicontrol Callback

    ReplyDelete
    Replies
    1. Hi,
      run Matlab as Administrator, then enter "mex -setup" and follow the instructions.
      Then, navigate to your PIVlab folder and enter "mex('fastLICFunction.c')". If you don't get any error messages, your LIC in PIVlab should now work.

      Delete
  15. Hi! I'm using your PIVlab to research in JPN, thank you very much. By the way, I have a question about multi-pass. I usually use FTT window deformation when I analyze, but I don't understand about multi-pass. For example, I analyzed image at high flow rate with FTT. Then,I used pass1 64 and pass2 32, but many vectors were not acquired with accuracy.On the other hand, vectors were acquired when I used pass1 128 and pass2 64. I thought that the pass 64 can not analyze the image at high flow rate ,but if I used pass 64 as pass2 , pass 64 was able to analyze with accuracy. So, I'm wondering how it happened. How does FTT window deformation analyze with multi-pass?

    ReplyDelete
    Replies
    1. Hi! Multipass uses information from previous passes to predict the displacement in the following passes. That makes it possible to detect large displacements with a high resolution. And this is exactly what you observed. The displacement is too high for the 64-pass to work, it needs a pass before with 128 to work. Maybe you can use 256 then 128 then 64 then 32 to get the best results and the highest resolution.
      Here is an explanation of different algorithms: http://www.seika-mt.com/product/piv-en/PIV_software_Koncerto-02.html

      Cheers,
      William

      Delete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Hi William! Thank you very much for helping me ! I'll try it!

    ReplyDelete
  18. Hi! I'm using PIVlab to investigate jet flows and I have a question. What criterion is used by "vortex locator"? I was asked to use the method by Jeong and Hussain, is this? Thank you very much!

    ReplyDelete
    Replies
    1. PIVlab uses a normalized DCEV (discriminant for complex eigenvalues), see this paper:
      Stamhuis, E. & Videler, J. Quantitative flow analysis around aquatic animals using laser sheet particle image velocimetry Journal of Experimental Biology, 1995, 198, 283-294

      Delete
  19. Thank you very much!

    ReplyDelete
  20. Hi, I'm trying to use PIVlab for part of my disseration but can't seem to get the software working on my computer. I get the following error messages when I open PIVlab_GUI and then click to load image, add and import. No images load so cannot continue with the tutorial. Any ideas whats going wrong?
    Regards Robert


    >> PIVlab_GUI
    ERROR: Image Processing Toolbox not found! PIVlab won't work like this.
    -> Required additional files found.
    Undefined function 'imshow' for input arguments
    of type 'double'.

    Error in uipickfiles (line 396)
    imshow(zeros(27,35)+0.75)%,'parent',ah1);

    Error in PIVlab_GUI>loadimgsbutton_Callback (line
    727)
    path=uipickfiles ('FilterSpec', pathname,
    'REFilter', '\.bmp$|\.jpg$|\.tif$',
    'numfiles', [2 inf], 'output', 'struct',
    'prompt', 'Select images. Images from one set
    should have identical dimensio
    Error in gui_mainfcn (line 96)
    feval(varargin{:});

    Error in PIVlab_GUI (line 32)
    gui_mainfcn(gui_State, varargin{:});

    Error while evaluating uicontrol Callback

    ReplyDelete
    Replies
    1. does the statement 'required additional files found' mean the problem with the image processing toolbox has been solved. I'm on university computer and not sure I have access to that toolbox.

      Delete
    2. PIVlab needs the image processing toolbox to work. You apparently do not have access to it.

      Delete
  21. Hello, Why is it that the PIVlab_GUI command does not work on Matlab 2012 or 2013. Rather, PTVlab_GUI works.

    ReplyDelete
    Replies
    1. Well, what does not work...? I am sure the command window will tell you why it doesn't work. Please contact me by email.

      Delete

Post a Comment

Popular posts from this blog

Forum added

PIVlab update 1.35