Metadata-Version: 2.4
Name: imwarp
Version: 0.0.1
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Rust
Requires-Dist: numpy>=1.26
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: scipy ; extra == 'test'
Requires-Dist: scikit-image ; extra == 'test'
Provides-Extra: test
Summary: scipy.ndimage.map_coordinates and skimage.transform.warp in Rust, without SciPy
Author: Sunip K. Mukherjee
License: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# imwarp

2-D image interpolation and warping with the results of `scipy.ndimage.map_coordinates` and
`skimage.transform.warp`, in Rust, with Python bindings that need neither SciPy nor
scikit-image.

```python
import numpy as np
import imwarp

image = np.random.default_rng(0).random((64, 64))
rows, cols = np.mgrid[0:64, 0:64] + 0.5
out = imwarp.map_coordinates(image, np.stack([rows, cols]), order=3, mode="reflect")
shifted = imwarp.warp(image, [[1, 0, 2], [0, 1, 0], [0, 0, 1]])
```

Orders 0, 1 and 3 are implemented (SciPy's 2, 4 and 5 are not implemented). The cubic order uses the same
B-spline prefilter as SciPy; `scikit-image` bicubic kernel (used by `skimage.transform.warp`
with a transform object) is not a B-spline and is not reproduced.

