DaVis Basics
DaVis Basics
This document outlines the main functions of DaVis software you will be using during the labs.
1 Davis Home
When you open DaVis you will be directed to the main homepage (Figure 1). On the top left you can
find a tool-bar with all the action icons possible: Hardware, Calibration, Recording, Processing, Plot-
ting, Proper Orthogonal Decomposition tools, Exporting. From these, you will mostly have to use the
Calibration, Recording and Processing options. You can then export your data in your preferred format
by simply right-clicking on the appropriate image (on the right) in the Home screen (see section 4). On
the bottom left of the home screen you can check whether the light source is on and turn it off if you need,
even when you are not within the recording tool-box. The right side of the screen is dedicated for data
visualisation. Between the tool-bar on the left and the visualisation on the right, the folder directories and
projects are shown. Within the Current Project, under Properties you can find the current calibration (if
it exists) and all the recordings that have been made. At the bottom, you can find the Project Information:
this is particularly helpful in checking the Properties of your recorded images, in case you have forgotten
your recording settings (Dt for double frame recordings, exposure time for the camera, frame rate, etc).
1
2 DaVis Calibration
Within the calibration action tool-box, you will be able to calibrate your camera based on calibration
images you recorded (ideally you record a few and use their average - see also section 3). You can select
the calibration icon while being on the home screen with the calibration image on your right. Then that
image will immediately be used in the calibration tool-box. You can also select a different image from
the folder icon on the top of the calibration home screen (Figure 2). Within the calibration parameters,
the Calibration Target (see Equipment List) you will use on the experiments has already been initialised
in the software, so the option User defined for Calibration_plate1 has to be selected. In the following,
you need to select Manual search, Same field of view for all cameras (you will be using only one in any
case), and Polynomial mapping function. The position of the first view refers to cases where you either
have multiple calibration views within a volume (tomographic set-ups) or if you are forced to place your
calibration target away from your measurement location (accessibility issues). In such cases, the position
of the first view is not zero. For your case, if you place the calibration target in the proper location, this
should be set to zero. The distance between planes is an option relevant to tomographic set-ups, so you
can leave it to its default value. The camera and view selection is relevant for multi-camera views or if
you need to mirror your image, however this is better done in the recording mode.
Once you have selected the above, you can press the calibrate button and follow directions in order
to properly calibrate your camera (check also lecture slides and class notes). Once you are satisfied with
the marker selection you can press Finish, or Discard if you wish to start again.
2
DaVis Record
The Record tool-box is where you will be recording calibration images, dye visualisation and PIV particle
images. On the top left of the screen you can find the available Devices (Light sources and Cameras, see
Figure 3). The light source that is connected in the synchronisation unit of the software is the LED line-
light (not the LED panel from the Equipment List). Therefore, you can keep it Off while doing Dye
visualisation experiments and calibration (of both dye and PIV experiments). It will be required to be
on Standby when you will be using it to either align your target or properly record. Then you need to
keep it on Adjust when you align the target and the LED light volume during your PIV set-up and on
On, when you are recording PIV images. With the LED you will be using, the options Standby and
Off are practically identical, and the same is true for the Adjust and On functions. However, these are
crucial safety measures for laser light use, so it is recommended that you follow these guidelines in order
to get familiar with proper equipment use. Below those settings you can also find illumination pulse
selection and duration for the light source. For single frame recordings (dye visualisation and calibration
procedures) only Pulse T1 A has to be checked. Pulse T1 B will be needed only for the PIV double
frame recordings (in which case the two duration times have to be identical). The selection of the pulse
duration time is an exercise in balance: longer times will illuminate your sensor for longer and you will
have more light available, which is quite crucial when using LED illumination. However, if the particle
displacement during that time is larger than the size of your particle image, then motion blur will occur
(see also the Handbook of Experimental Fluid Mechanics, chapter 5.3.3, equation 5.242).
The camera connected to the internal synchronisation unit is the Imager MX 2M-160 CMOS camera
(see Equipment List). Regarding the Camera settings, the exposure time is another option to control the
amount of light that reaches your sensor, however it can be changed only in single frame recordings.
Also pay attention to the maximum frame rate change between single and double frame recordings (from
3
155 Hz to 77.5 Hz). You can ignore the live processing options. For the timing options, the synchro-
nisation of the system is happening internally, so this is the option to select, and then for double frame
recordings, you have to choose the time between each frame pair, Dt according to the guidelines pro-
vided during the lectures. You can assess the results of your choices by recording and processing a single
pair of images for different Dt selections. Finally, on the recording tab, you can choose the amount of
recorded images (or image pairs, Length) or the total Duration of your recording. You can then provide an
appropriate Name and select automating storing (such that the images are immediately saved after being
recorded). You can also uncheck that option and choose to Store a Range of images only (see bottom left
of screen).
The right half of the image is the preview of your recordings, but it can also be used for instantaneous
or continuous grabbing of images without recording them (first and second icons on the top toolbar). The
latter option is the most common for optimising focus and target alignment (in calibration) as well as
illumination, before recording images.
3 DaVis Processing
The Processing toolbox, is where you will be processing your images after recording. The main functions
you will need are perspective correction (to apply your calibration), PIV processing, and averaging images
(e.g. improving the contrast of your calibration images) or vectors (e.g. mean velocity and vorticity
calculations) and they will be outlined in what follows.
Apply Calibration
4
To use raw images in your report (dye visualisation experiments and particle images in PIV recordings
- check your assignment requirements), if you export the intensity values without further processing, the
pixel coordinates, x and r, will be stored in pixels instead of physical units. As such, you will have to
first process those images by applying the Perspective correction (raw-world) function in the Processing
toolbox (see Figure 4) in order to get the calibrated coordinates.
On the left of the screen, you can find the most recent as well as all other available functions for
the type of recording you have selected (which is highlighted in green in the middle of the screen). By
double-clicking or dragging the functions from your left, you can add them below your selected recording
(and they will be highlighted in blue, see Figure 4), and thus creating a processing chain. At the bottom
you can also see details and settings for these functions. In the perspective correction, these are the
interpolation mode (you can select Bilinear) and step size (keep this to None). The Start button will
process all the images in the Range of the selected recording with the chosen increment (in the example
shown here, those would be 10 and 1 respectively, see Figure 4) and save the result. You can also choose
the Test icon, which will process only one image and not save the result: this option is useful to optimise
your processing choices. As with all other toolboxes, the right half of the image is dedicated to data
visualisation. That can be either the source recording, or the processed result, or both in horizontal or
vertical configuration (chosen by the icons on the top of the screen - in this example the result only option
is chosen).
PIV Processing
The other important function within the Processing toolbox is the PIV processing, which is required to
process image pairs in order to calculate velocity vectors using cross-correlation (see also lecture slides
and class notes). By default, this processing step will also apply the calibration to your final vector
fields. There are many options available within that function with respect to the method itself, image
pre-processing, vector calculation, and vector post processing (Figure 5a).
We recommend that you start with disabling the advanced settings for the method (Figure 5b) and the
vector post-processing (Figure 6b), leaving all image pre-processing options and masking unchecked,
and only enable a single pass with a 64 × 64 interrogation window size (in pixels) and 50% overlap in
the vector calculation (Figure 6a). These settings will also ensure the shortest processing time but not
necessarily optimal results. However, it should be noted here that, if the raw image quality and time
separation chosen are optimal, the level of pre- and post-processing needed should be minimal. These
functions are used to merely enhance the vector calculation process.
If time permits, we recommend that you experiment with both preprocessing filters (Sliding back-
ground subtraction and Min/max filter), with multi-pass vector calculation (for example, initial pass at
64 × 64 and final at 32 × 32, Figure 6a), while remembering the balance between increasing spatial res-
olution (smaller interrogation window sizes) and decreasing signal-to-noise ratio (see also lecture slides
and class notes). Finally, you can also enable the advanced vector post-processing options both within
the Multi-Pass Postprocessing tab (Figure 6a) and the general Vector post-processing tab (Figure 6b).
These allow outlier removal based on different Median Filters and filling up the resulting empty spaces
by interpolation. We also recommend that you always keep the Preserve vector choices option checked,
so that you can visualise on the right half of the image how many vectors were your first, second, and
third choice. In general, you can assume that the lower the number of non-first choice vectors is, the
higher the quality of your results.
5
(a)
(b)
Figure 5: (a) PIV processing screen. (b) Settings for the main method.
Averaging
Finally, after you have processed you PIV image-pairs, you can further calculate the mean vector quan-
tities (mean velocities and out-of-plane vorticity) by selecting the Vector statistics - vector field result
6
(a)
(b)
Figure 6: (a) Settings for vector calculation. (b). Settings for vector post-processing.
function (see Figure 7). You will only need to check the Average V option in the detailed settings and
remember that this time, the source recording will be the processed vector fields from the previous step
and not the raw images. You can also average your raw images however, for example in order to im-
7
Figure 7: Averaging vector fields Processing screen.
prove your calibration image intensity by recording a few and averaging them out. To do that, the source
recording will now be the raw images and the selected function will be the Avg, stddev, min, max, sum
(see recently used operations in Figure 4). The setting details in that case are self-explanatory.
4 Davis Export
By default, DaVis saves image recordings as .ims files and resulting vector fields as .vc7 files. You can
export your recordings and processed vector fields in a variety of ways in almost all possible file types.
For these lab sessions, we recommend exporting both raw images and vector fields into .dat files , which
can then be read in Matlab using the two provided scripts for each file type (script_for_RawImage_con-
versions and script_for_VectorField_conversions). The easiest way to do this is to right-click the desired
recording while in the Home screen and select Export data (see Figure 8a). Then the Range and Incre-
ment of images and the file Export type as well as the export Folder and desired Filename can be selected
(see Figure 8b). We recommend that you use the default Root, Folder, and Filename (typically B0001,
B0002, etc.) options so that saving and reading the files later is easier. In the case of raw images, the
script (script_for_RawImage_conversions) will read and save into .mat files the intensity counts Ic and
calibrated pixel coordinates x and r (if perspective correction has been applied). In the case of vector
fields, the script (script_for_VectorField_conversions) will read and save into .mat files, the calibrated
vector coordinates x and r, the streamwise and radial velocities, u and v, and the out-of-plane vorticity
ωz . For both scripts, you will have to designate the folder directory in which the files to be read are
stored, as well as the number of elements (number of pixel or vector coordinate points in x (J) and r (I):
you can find this in the top line of your .dat file). These three inputs are highlighted within the scripts so
you can easily edit them. For both raw and vector fields, the scripts will read all .dat files existing in the
8
(a)
(b)
Figure 8: Export images/vector fields to .dat files from the home screen.
designated folder and save them in an array of size [I, J, N ], where N is the total number of files existing
in that folder. If you want to only read individual files (e.g. average fields or single snapshots), you can
either edit the scripts or save those into different folders.
9
Finally, if you want to export movies in .avi or .mp4 filetypes, you can right-click on the Home screen
(see Figure 8a) and select Export movie instead. The dialogue box that opens then is self explanatory.
10