Tag Archives: Burning ship

Learning Python: Eight ways to filter an image

Today’s post is going to look at fast ways to filter an image in Python, with an eye towards speed and memory efficiency.  My previous post put Numba to use, accelerating my code for generating the Burning Ship fractal by about 10x.  This got me thinking about other places where I could use Numba.  That, combined with reading some SciPy and scikit-learn documentation got me onto the topic of filtering an image.  I’m going to focus on 2D gray-scale images for this post.  Oddly enough, there isn’t a bilateral filter implemented in scipy.ndimage so I’m going to tackle that one.  My test image is the famous Lenna Continue reading

Learning Python: Parallel processing with the Parallel Python module, with some Numba added in

Introduction: Parallel Python and the Burning Ship fractal

I have previously used Matlab for a lot of my prototyping work and its parfor Parallel For loop construct has been a relatively easy way to get code to use all the cores available in my desktop.  Now that I am teaching myself Python, I decided to look for something similar.  My first stop is the Parallel Python module a.k.a. PP.  One thing I like about PP is that it can also run on multiple computers. Continue reading