openpiv_cxx.windef.deform_windows

openpiv_cxx.windef.deform_windows(frame_a, frame_b, x, y, u, v, deformation_method='whittaker-shanon', order=1, radius=1, deformation_order=1)

Deform images by interpolation

Deform an image pair by window deformation where a new grid is defined based on the grid and displacements of the previous pass and pixel values are interpolated onto the new grid. Currently, two deformation algorithms are implemented, Whittaker-Shanon (sinc) and Taylor expansions with finite differences. Taylor expansions interpolation is usually much faster and provides good results.

Parameters:
  • frame_a (ndarray) – A two dimensional array of integers containing grey levels of the first frame.

  • frame_b (ndarray) – A two dimensional array of integers containing grey levels of the second frame.

  • x (ndarray) – A two dimensional array containing the x coordinates of the interrogation window centers, in pixels.

  • y (ndarray) – A two dimensional array containing the y coordinates of the interrogation window centers, in pixels.

  • u (ndarray) – A two dimensional array containing the u velocity component, in pixels/seconds.

  • v (ndarray) – A two dimensional array containing the v velocity component, in pixels/seconds.

  • order (scalar) – The order of the Taylor expansions interpolation kernel.

  • radius (scalar) – The radius of the Whittaker-Shannon interpolation kernel. Optimal radii are 3 and 5.

  • deformation_method (str) – Type of deformation to use.

  • deformation_order (scalar) – Order of deformation to use where ‘1’ deforms the second image and ‘2’ deforms both images symetrically.

Returns:

frame_def_a, frame_def_b – Deformed images based on the meshgrid and displacements of the previous pass

Return type:

ndarray