Interpolation module¶
-
OpFlowLab.functions.interpolation.inverse_distance_weighting(pts, distances, indices, values, map_x_inverse, map_y_inverse)[source]¶ Interpolates the values using inverse distance weighting
- Parameters
- ptsndarray
Array containing the x and y coordinates of points to be calculated
- distancesndarray
Distances of the nearest points
- indicesndarray
Indices of the nearest points
- valuesndarray
Values used in the interpolation
- map_x_inversendarray
Preallocated array used to store the inverse map position in the x direction
- map_y_inversendarray
Preallocated array used to store the inverse map position in the y direction
- Returns
- map_x_inversendarray
Inverse mapping positions in the x direction
- map_y_inversendarray
Inverse mapping positions in the y direction
-
OpFlowLab.functions.interpolation.inverse_mapping(map_x, map_y, image_shape)[source]¶ Finds the inverse mapping in order to use OpenCV’s
remapfunction in the forward time direction- Parameters
- map_xndarray
Array containing the movement of pixels in the x direction
- map_yndarray
Array containing the movement of pixels in the y direction
- image_shapesequence of int of length 2
Size of image
- Returns
- map_x_inversendarray
Inverse mapping positions in the x direction
- map_y_inversendarray
Inverse mapping positions in the y direction