Home / Science / Physics / Fluid dynamics / PIV liteTool #961

PIV lite: particle image velocimetry from two images, cross-correlation vector field in the browser

Open two frames of a seeded flow and get the velocity vector field by FFT cross-correlation of interrogation windows, with sub-pixel peaks, a second pass, outlier detection and replacement, speeds in m/s from the pixel size and frame interval, and a CSV of the vectors. Your images never leave your device.

Keep it one tap away for everyday use.

Bookmark PIV lite?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Two frames
  2. Correlate
  3. Vectors
  4. Outliers
Nothing is uploadedWorks offline once open

Image pair

No images opened: showing a made-up example pair.

Two frames of the same size, a short time apart, with the flow seeded by small particles. Images up to 2048 × 2048 pixels and 25 MB each; colour images are turned to grey. Your images stay on this device: nothing is uploaded. The example images are made up (random particles moved by a known flow).

What it does

Particle image velocimetry (PIV) measures a whole flow at once. Tiny particles are mixed into the fluid and photographed twice, a short time apart. Cut both pictures into small interrogation windows: the particle pattern in each window has moved a little between the frames, and the peak of the cross-correlation of the two windows says by how much. One window gives one velocity vector; the whole image gives a vector field.

This page does that in your browser. It uses the FFT to correlate each window, a three-point Gaussian fit to find the peak to a fraction of a pixel, a second pass that shifts each window in frame B by the first estimate (which removes the bias towards small displacements), and the normalised median test to find and replace bad vectors.

How to use it

  1. Open frame A and frame B: two images of the same size (PNG, JPEG, WebP, BMP or GIF, up to 2048 × 2048 pixels). Without them, the page shows a made-up example pair: a vortex, a uniform shift or a shear layer.
  2. Choose the window size: about 10 particles per window is ideal, and the largest displacement should be under a quarter of the window.
  3. Choose the overlap (50 % is standard) and the number of passes.
  4. Optionally give the pixel size in micrometres and the time between frames in milliseconds to get speeds in m/s.
  5. Read the summary, look at the arrows (orange ones were replaced as outliers), and download the vectors as CSV.

Worked example

The page opens on a made-up vortex pair of 320 × 240 pixels, spinning at up to 2.5 px per frame. With 32 px windows, 50 % overlap and two passes it finds 19 × 14 = 266 vectors circling the centre, a mean displacement of (0.00709, −0.0124) px (a vortex has no net drift), a largest displacement of 2.27 px, well within a quarter of the window, and a median correlation peak ratio of 4.39; the median test replaces 1 vector. Choose the made-up uniform shift, in which every particle moves 3.3 px right and 1.65 px up, and the mean displacement comes out within a few hundredths of a pixel of (3.3, −1.65). With a pixel size of 10 µm and 1 ms between frames, 1 px per frame is 0.01 m/s.

Tips

  • Aim for particle images 2 to 3 pixels across: smaller ones “peak lock” to whole pixels.
  • If many vectors are replaced, try a bigger window, a shorter time between frames, or more seeding.
  • Out-of-plane motion, strong shear within a window and reflections all weaken the correlation peak; the peak ratio helps spot them.

FAQ

Are my images uploaded? No. They are read and analysed in this browser tab and never leave your device.

Why is y positive downwards? The page uses image rows, as most PIV software does. Flip the sign of v for a y-up frame.

Is this as good as commercial PIV? No: there is no image deformation, masking or multi-grid refinement. It is for study and planning, not a substitute for professional judgement or a validated PIV package.

Where the numbers come from

  • Cross-correlation PIV, Gaussian three-point sub-pixel estimator and window offset: Raffel, M. et al., Particle Image Velocimetry: A Practical Guide (Springer); Westerweel, J. (1997), Measurement Science and Technology 8, 1379 to 1392.
  • Normalised median test: Westerweel, J. and Scarano, F. (2005), Experiments in Fluids 39, 1096 to 1100.
  • Checked against an independent NumPy FFT correlation of the same image pair (equal to 10⁻⁵ px) and against made-up image pairs with known shift, vortex and shear flows.
  • The example image pairs are made up: random particles moved by a known flow.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Dimensionless numbers calculator #956 Give a fluid, a speed and a length and get the Reynolds, Mach, Froude, Weber, capillary, Bond, Ohnesorge, Prandtl, Péclet, Grashof, Rayleigh, Richardson, Strouhal and Knudsen numbers, each with a plain note on what regime the flow is in. Lattice Boltzmann wind tunnel #957 A live 2D wind tunnel in the browser: pick a cylinder, square, plate or airfoil, or draw your own shape, set the Reynolds number and watch the wake form and shed a Kármán vortex street, with drag, lift and Strouhal number measured as it runs. Potential flow builder #959 Build an ideal 2D flow from a uniform stream, sources, sinks, vortices and doublets, tap to add them, and see the streamlines, stagnation points, the speed everywhere, the velocity and pressure at any point, and the lift and drag from Blasius's theorem. Image stacker #76 Calibrate your light frames with darks, flats and bias, align them on their stars and stack them with a kappa-sigma clipped average that removes satellite trails. Download the result as 32-bit FITS. Airfoil calculator #958 Type a NACA 4-digit code and an angle of attack to get the lift coefficient from thin airfoil theory and from a vortex panel method, the zero-lift angle, quarter-chord moment, pressure distribution, lift per metre of span, a rough drag estimate and, for a wing of given aspect ratio, induced drag. Flat plate boundary layer calculator #960 For flow along a smooth flat plate, get the Reynolds number, where the boundary layer turns turbulent, its thickness, displacement and momentum thickness, the local skin friction and wall shear stress, and the plate's drag, with the exact Blasius profile for laminar flow and the 1/7 power law for turbulent flow.