neuralib.imglib.transform.apply_transformation

neuralib.imglib.transform.apply_transformation(img, trans_mtx, **kwargs)[source]

Apply 2D image transform

Parameters:
  • img (ndarray) – image array. Array[float, [H, W, 3] | [H, W, 4] | [H, W]]

  • trans_mtx (ndarray) – Transformation matrix. Array[float, [3, 3]]

  • kwargs – additional arguments pass to cv2.warpPerspective()

Returns:

transformed image array

Return type:

ndarray