grinvolod13 / image-to-hilbert-curve

Python function to convert RGB or grayscale image to Hilbert Space-Filling Curve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making Hilbert Curve from image

  • 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
  • ⭐Star the repo, if you like it!⭐

Prerequisites:

pip install numpy numpy-hilbert-curve

For running example.ipynb:

pip install -r requirements.txt

Visualization

  • 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 alt image

Acknowledges

About

Python function to convert RGB or grayscale image to Hilbert Space-Filling Curve

License:MIT License


Languages

Language:Jupyter Notebook 99.7%Language:Python 0.3%