Image.interp2d#

Image.interp2d(U: ndarray, V: ndarray, Ud: ndarray | None = None, Vd: ndarray | None = None, **kwargs: Any) Self[source]#

Image warping

Parameters:
  • U (ndarray(Ho,Wo)) – u-coordinate array for output image

  • V (ndarray(Ho,Wo)) – u-coordinate array for output image

  • Ud (ndarray(H,W), optional) – u-coordinate array for domain of input image, defaults to None

  • Vd (ndarray(H,W), optional) – u-coordinate array for domain of input image, defaults to None

Returns:

warped image

Return type:

Image

Compute an image by warping the input image. The output image is \(H_o \times W_o\) and output pixel (u,v) is interpolated from the input image coordinate (U[v,u], V[v,u]).

\[Y_{u,v} = X_{u^\prime, v^\prime} \mbox{, where } u^\prime = U_{u,v}, v^\prime = V_{u,v}\]

The coordinates in U and V are with respect to the domain of the input image but can be overridden by specifying Ud and Vd.

Note

Uses SciPy

Seealso:

domain meshgrid vspan scipy.interpolate.griddata