Tutorial Openpiv - Version 01
Tutorial Openpiv - Version 01
September 6, 2012
Contents
1 Inroduccion 2
3 Load Data 2
4 Analysis parameters 3
4.1 Interrogation window size . . . . . . . . . . . . . . . . . . . . . . 3
4.2 Spacing/Overlap . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.3 Signal-to-Noise ratio and filters . . . . . . . . . . . . . . . . . . . 3
4.4 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.5 Outlier filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.6 Jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.7 Select and reset Region Of Interest(ROI) . . . . . . . . . . . . . . 4
4.8 Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
6 Output files 5
7 Units convert 6
1
1 Inroduccion
OpenPIV is an open source Particle Image Velocimetry (PIV) analysis software
written in Python, MATLAB and C++. The aim of this document is to de-
liver a fast overview of OpenPIV. The next sections will refer to the selectable
parameters, the ouput files and other features of OpenPIV. Some basics of the
PIV technique will be mentioned as well. All the distributions of OpenPIV and
other related material can be found at [1, 2].
This tutorial runs OpenPIV on MATLAB, nevertheless the same applies for
other distributions of OpenPIV. The PIV-Data used as example in this tutorial
was extracted from [3].
3 Load Data
The first step before to run the PIV-Analysis is to load the PIV-Data. On the
top left the menu bar is located. Under the drop-down menu “File” the option
“Load” is available, either this option or its shortcut Ctrl+L opens a window
where to select the data to be loaded. Once the PIV-Images are loaded the but-
tons and at the bottom jump between the loaded images, the indicator at
the right-bottom displays the number of the currently shown image.
2
4 Analysis parameters
In this section the selectable parameters on the right side of the GUI are de-
scribed.
4.2 Spacing/Overlap
The horizontal and vertical parameters control the size of the correlation win-
dows and set the resolution of the two components of the velocity field ux uy .
In figure 2 is depicted an example.
The parameter S/N value is the threshold between the correct/wrong vec-
tors according to the S/N type. There are no default values, a try-out has to
be perform in order to find out the best value.
OpenPIV applies global and local filtering. By global filtering the obvious
outlier vectors will be supposedly removed, i.e. the vectors which length is larger
than the mean of the flow field plus 3 times its standard deviation. These are
global outliers in the statistical sense.
In order to find local vector outliers, i.e. vectors that are dissimilar from the
close neighbors, a local filtering is performed on small neighborhoods of vectors,
3
e.g. 3x3 or 5x5. Typically there are about 5 % of erroneous vectors, these are
removed and later the missing values are interpolated from the neighbor vector
values.
4.4 Scale
The scale value is a factor that will multiply the resulting vectors. It helps with
the visualization of the vectors but it has to be taken into account when the
units are transform to physical units.
4.6 Jump
The jump value indicates how many PIV-Images are evaluated in the anaylisis.
The count starts at the next image from the current one, i.e. if jump is equal to
n then OpenPIV takes the current image plus the next n PIV-Images for one
analysis. Note that at least two PIV-Images are needed for the analysis, what
makes jump values less than one pointless.
4
4.8 Preprocessing
The preprocessing option applies transformation-image function to the PIV-
Images. The current MATLAB version uses the function adapthisteq which
enhances the contrast of images. For more details see MATLAB help.
6 Output files
The first vectors results are depicted on the PIV-Images in the GUI, as figure
3 and 4 illustrate. In the folder containing the PIV-Data OpenPIV saves three
lists of files: no filtered results dataName noflt.txt, filtered results after global
and local filters dataName flt.txt and final results after filtering and interpola-
tion dataName.txt.
The output file has 5 columns of data, i.e. x y ux uy S/R. The first and
second correspond to the pixel coordinates, the third and fourth to the two ve-
locity vector components and the fifth column is the S/N ration. Note that the
value is different if the user chose peak to second peak or peak to mean ratio as
S/N type. The value of peak to second peak or peak to mean ratio is stored for
further processing.
The number of output files will be the number of loaded PIV-Images minus
the selected jump value.
5
7 Units convert
After the program is executed, the velocity vector units of ux and uy are not
in physical units [m/s]. OpenPIV results are delivered in [scale × (pixels/∆t)],
with scale as the selected scale value and ∆t as the time interval between two
images. In order to convert the units to [m/s] is needed:
• the ∆t value in s
• the dimensionless scale value
• the relation between meters and pixels in that image [m/pixels], i.e. the
image size and the number of pixels.
• ux = 5, uy = 0 in [scale × (pixels/∆t)]
• the ∆t = 0.5 in s
• scale value = 2
• image size 0.25 x 0.25 m and 256 x 256 pixels, i.e. the relation between
meters and pixels is 0.25/256 [m/pixels].
• the conversion of ux from [scale × (pixels/∆t)] to [m/s]:
ux m 5 0.25
× rel. = × = 0.0049m/s
scale × ∆t pixels 2 × 0.5 256
6
References
[1] R. Gurka A. Liberzon and Z. Taylor. OpenPIV Home Page. http://www.
openpiv.net, 2009.
[2] G.A. Kopp A. Liberzon Z.J. Taylor, R. Gurka. Long-Duration
Time-Resolved PIV to Study Unsteady Aerodynamics. Instrumenta-
tion and Measurement, IEEE Transactions on, 59(12):3262–3269, Dec.
2010. http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=
5464317&isnumber=5609237.
[3] J. Carlier. Second set of fluid mechanics image sequences. European Project
’Fluid image analisys and description’ (FLUID) – http://www.fluid.irisa.fr/,
2005.