Implementation of the Radon transform in Python and Rust.
The main goal of this repository is to benchmark an algorithmically identical implementation of the Radon transform in Python and Rust.
See pyradon for Python bindings of this implementation.
image_size: 512x512
number of rays: 200
number of slopes: 200
n_trials: 10
python
mean: 4639.79 ms, var: 0.09
rust
mean: 23.80 ms, var: 0.57
Run commands below in order to run benchmarks in Python and Rust.
cd py & python benchmark.py
cargo run --bin benchmark --release
- As usually done, this radon transform only computes rays with angles going from -pi/4 to pi/4 for numerically accurate integration along slopes. In order to compute the complete radon transform, apply the transform on the transposed image and merge the split transforms.
- The integration is computed using the nearest method.