Open-source particle image velocimetry

How stereo-PIV works: illustrated step by step

Stereo-PIV (stereoscopic particle image velocimetry, also called 2D3C) measures all three velocity components in a light sheet: u and v in the plane of the sheet and w through it. It needs two cameras that look at the sheet from different directions. This page explains the whole procedure in eight drawings, from setting up the cameras to the 3D vector map. The procedure is general; for the details in PIVlab, see the manual pages Stereo-PIV: set-up and recording (steps 1–5 and the recording) and Stereo-PIV analysis (steps 6–8).

Overview of the stereo-PIV procedure in eight drawings: 1 set up cameras and laser, 2 focus both cameras on the calibration board, 3 lens calibration for each camera, 4 board at the measurement position, 5 align the light sheet and record the board, 6 stereo calibration onto a common grid, 7 record the flow and correct the disparity, 8 analysis of both cameras to u, v and w.
The whole procedure at a glance (click for the large image).

1. Set up cameras and laser

Top views of two stereo-PIV camera arrangements. a) Both cameras on the same side of the light sheet, 30 to 90 degrees apart: the camera upstream of the laser sees darker backward scatter, the camera downstream brighter forward scatter. b) Cameras on opposite sides of the sheet, both downstream of the laser: both see forward scatter.

Both cameras look at the same part of the light sheet, but from different directions. The out-of-plane velocity w follows from the difference between their two views, so the angle between the lines of sight matters: 30° to 90° is good, a small angle makes w noisy. Two cameras that look at each other along one line can not measure w.

The particles are much brighter in forward scatter, i.e. for a camera downstream of the laser, than in backward scatter. With both cameras on the same side of the sheet, one of them usually sees backward scatter. Placing the cameras on opposite sides of the sheet, both downstream, gives both cameras forward scatter; the camera behind the board then needs a transparent board (or one printed mirrored on its back).

Because each camera looks at the sheet at an angle, a normal lens can not keep the whole sheet in focus. A Scheimpflug adapter tilts the lens against the sensor, so that the oblique plane is sharp everywhere.

2. Focus both cameras on the board

A ChArUco calibration board stands at the measurement position. Camera 1 (blue) and camera 2 (orange) look at it from the left and the right; their images show the board as a trapezoid, sharp everywhere.

Place the calibration board where you will measure and focus both cameras on it. With Scheimpflug adapters, adjust focus and tilt until the whole board is sharp in both images. In PIVlab, the board is generated by the program (ChArUco board with a QR code that holds its dimensions), and the Sharpness overlay of the live image rates the focus in the left, centre and right third of the image.

3. Lens calibration, for each camera

Lens calibration: the calibration board is moved and tilted in front of camera 1 into many positions; six thumbnails show the recorded images with the board at different places and angles. The same is repeated for camera 2.

Each camera gets its own lens calibration: move the board through the whole image, at many positions and tilts, and record an image each time. From these images the lens distortion (and, with a Scheimpflug adapter, the tilt of the sensor) is computed. Repeat this for the second camera.

The lens calibration is only valid for these lens settings. If there is no space at the measurement position, it can be done beforehand; afterwards focus, Scheimpflug angle and the other lens settings must not change. The cameras themselves may still be moved.

4. Board at the measurement position

The board stands in a glass tank exactly where the flow will be measured. The fields of view of camera 1 and camera 2 are drawn on the board plane as dashed outlines; they overlap almost completely, and the overlap is the measurement area.

Put the board exactly where you want to measure: its surface defines the measurement plane. Both cameras must see it. Align the cameras so that their views overlap as much as possible; only the overlap can be measured with both cameras. The board should fill most of the overlap.

5. Align the light sheet, record the board

A laser with light sheet optics spreads the green light sheet over the board. Next to it, the board images of camera 1 and camera 2, recorded with the laser switched off and under normal lighting.

Switch the laser on and aim the light sheet at the board: the centre of the sheet should lie on the board surface that faces the cameras. Then switch the laser off – the sheet only grazes the board and lights it badly – and record the board with both cameras under normal lighting: these are the board images in the light sheet. Remove the board. From now on the cameras must not move. A small offset between sheet and board is not a problem; it is measured and corrected in step 7.

6. Stereo calibration

Stereo calibration: the board images of camera 1 and camera 2, each seen as a trapezoid, are mapped onto one common grid in the light sheet. On the grid, the views of both cameras overlap; the overlap becomes the region of interest and the board appears undistorted.

From the board corners in both board images, the stereo calibration computes where each camera is and how it looks at the board. Both camera images are then mapped onto one common grid in the plane of the light sheet: a point of the sheet lies at the same pixel in both cameras. The overlap of the two views becomes the region of interest, and the grid gives the scale (pixels to millimetres).

7. Record the flow, correct the disparity

Top view of the disparity: the real light sheet is slightly offset and tilted against the board position used for the calibration. The rays of camera 1 and camera 2 to the same particle cross the board plane at two different points; their distance is the disparity. Correlating the A images of both cameras gives a disparity map that corrects both cameras.

Now seed the flow and record image pairs with both cameras, synchronized with the laser. The board is never exactly at the position of the light sheet. The calibration places every particle on the board plane, so each camera puts the same particle at a slightly different point: the disparity. Correlating the particle images of camera 1 with those of camera 2 (recorded at the same moment) measures this shift everywhere in the image. A smooth map fitted to it corrects both cameras, and it also tells where the light sheet really is and how it is tilted. This step is often called self-calibration.

8. Analysis: from both cameras to u, v and w

Analysis: the A and B images of each camera give a 2D vector field per camera. Both fields are combined automatically into the resulting 3D vector map, drawn as arrows above and below the measurement plane, with the axes X to the right, Y down and Z away from camera 1.

Each camera is analysed with normal 2D PIV, with the same settings and on the corrected images. The two 2D vector fields differ, because each camera sees the out-of-plane motion from its own side. For every point, the two measured 2D displacements (four numbers) are combined into one 3D vector: u and v in the board plane (X to the right, Y down in the image) and w along Z, away from camera 1. In PIVlab this combination happens automatically after the analysis, and again after each validation.

Use these drawings

The drawings may be used freely, e.g. in lectures, theses and presentations, under the licence CC BY 4.0. Please credit them as “Drawings: PIVlab, www.pivlab.de, CC BY 4.0”.

Try the procedure without any hardware: PIVlab’s 3D flow and stereo-PIV simulator creates images of two virtual cameras, including calibration boards. How PIVlab records and analyses stereo-PIV: Stereo-PIV software and the manual pages Stereo-PIV: set-up and recording, Stereo acquisition and Stereo-PIV analysis.