- In
curve.py
Python code to convert RGB or grayscale image to Hilbert Space-Filling Curve (also works with PNG) - In
example.ipynb
example of usage with visualization
pip install numpy numpy-hilbert-curve
For running example.ipynb
:
pip install -r requirements.txt
- Original images(left), and reshaped Hilbert Curve images(right)
- Because Hilbert Curve is 1-d(its length), line was reshaped to square to represent as image
-
Stairs Photo by Paolo Bendandi on Unsplash
-
Tomato image by Me😎