Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebftw/interp2gpu
GPU-accelerated 2D spline interpolation, à la interp2(..., "spline"), in MATLAB.
https://github.com/sebftw/interp2gpu
cuda gpu gpu-acceleration matlab spline spline-interpolation
Last synced: 2 months ago
JSON representation
GPU-accelerated 2D spline interpolation, à la interp2(..., "spline"), in MATLAB.
- Host: GitHub
- URL: https://github.com/sebftw/interp2gpu
- Owner: sebftw
- License: mit
- Created: 2024-09-17T14:23:45.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T09:19:34.000Z (2 months ago)
- Last Synced: 2024-12-09T10:26:00.098Z (2 months ago)
- Topics: cuda, gpu, gpu-acceleration, matlab, spline, spline-interpolation
- Language: C
- Homepage:
- Size: 896 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast 2D Spline Interpolation
__interp2gpu__ is a drop-in replacement to `interp2` to perform fast spline interpolation on the GPU in MATLAB.## How to use
Call it as `Vq = interp2gpu(V, Xq, Yq, "spline")`.
For an explanation of inputs, see [https://mathworks.com/help/matlab/ref/interp2.html](https://mathworks.com/help/matlab/ref/interp2.html) from Mathworks.
An example of using interp2gpu is given in [example.m](example.m).## Installation
You can download the code with [this link](https://github.com/sebftw/interp2gpu/archive/refs/heads/main.zip).
Then run `addpath(CODEPATH)`, where CODEPATH is the path of the directory where interp2gpu is located.
You can now use interp2gpu!## Features
:heavy_check_mark: Multiple images can be processed with one call to interp2gpu.
:heavy_check_mark: The method "spline_approx" performs fast approximated spline interpolation.
:x: Does not currently support double-precision inputs.
:x: Does not currently support arbitrary input pixel grids.You can add support for double-precision inputs and non-uniform pixel grids relatively easily - feel free to contribute.
## Files
- `example.m` is an example that shows how to use interp2gpu.
- `interp2gpu.m` is the main function.
- `gpuThomas2D.m` is used to compute the image derivatives required to evaluate the spline.
- `get_kernel.m` is used to cache CUDA kernels, so they do not have to be loaded every time.
- `Spline_paper.pdf` is a paper containing the theory of the method and its application in ultrasound imaging..
- `kernels/getInterpolation2D.cu` contains the CUDA C++ source code used to evaluate the spline.
- `kernels/compile_kernels.m` is used to compile the CUDA code.
- `kernels/getInterpolation2D.ptx` is the compiled CUDA kernel.