Navigation

Python


Bilinear interpolation on images stored as Python Numpy ndarray

8 min.
If you are working in image processing and using Python as a prototyping script language to test algorithms, you might have noticed that all the libs providing fast image interpolation methods (to either sub-sample or over-sample) work in 8 bits unsigned integers (uint8). This is quite annoying if you are working with floating point images. PIL supports floating point interpolation , but only for one layer, thus forget about RGB, and scipy.
Lire la suite →

Make Jupyter Notebooks easy to blog in WordPress

13 min.
I have struggled with most solutions to convert and embed Jupyter notebooks into WordPress blog posts since I use Plotly as a graphic lib, as well as many LaTeX equations and images. Finally, I had to code my way through. Here is what I did : Write the jupyter notebook Nothing that you don’t know here. If you embed pictures in the notebook though, it would be good to upload them on your WordPress media library, then use the external URL to include them (from your server) in the Markdown cells of Jupyter.
Lire la suite →