Path tracing Quake in Blender


Using Python and Blender I produce a tool for converting Quake demo files into a path traced scene.   Read more


Reprojecting the Perseverance landing footage onto satellite imagery


Using Python, OpenCV, and PyTorch to reproject the Mars 2020 / Perseverance descent and landing footage onto satellite imagery of the area.   Read more


Extracting Super Mario Bros levels with Python


A Python script for extracting level data from the Super Mario Bros ROM, using a 6502 emulator (also written in Python).   Read more


Number plate recognition with Tensorflow


Applying convolutional neural networks to the problem of automatic number plate recognition. Synthesized number plate images are used to train a TensorFlow network which is then used to detect number plates in real-world images.   Read more


12 years in 15 seconds: Aligning and condensing a self-portrait time-lapse


Following from my previous experiments with face alignment, I got to thinking if the same techniques could be applied to photo-a-day time lapse projects, such as Noah Kalina's 12.5 year (and counting) epic. It turns out they can; in this post I explain how I smoothed out this video.   Read more


Making faces with Haar cascades and mixed integer linear programming


In 2001 Viola and Jones introduced their successful face (and other object) detection algorithm, based on so-called Haar-like features. This post describes how I used mixed integer linear programming (MILP) and Python to write a script which inverts this algorithm; instead of detecting faces in an input image, it will generate an image of a face.   Read more


Solving the GCHQ christmas card with Python and pycosat


For Christmas 2015, the director of British spy agency GCHQ released a Christmas card featuring a grid-shading puzzle. This post describes a Python script to solve the puzzle (which can also be applied to similar puzzles), which uses a SAT solver to find the solution.   Read more


Creating a Pluto flyby using unaligned New Horizons images


In the months leading up to NASA's historic flyby of Pluto, the New Horizons probe took a series of pictures of the dwarf planet as it approached. This post describes how I used Python to turn these unaligned images into a flyby animation.   Read more


Switching Eds: Face swapping with Python, dlib, and OpenCV


Automating the algorithm from the previous post. Facial landmarks are detected using dlib. Alignment, colour correction, and blending is then done with numpy and OpenCV.   Read more


Face swapping with The GIMP


A methodical technique for face swapping in the GIMP. The approach replaces the face of a person in one image with the face of a person in another image.   Read more


Bresenham and Efficient Pulse-Width Modulation


A (re)derivation of an efficient algorithm for performing pulse-width modulation. The algorithm is closely to Bresenham's line algorithm.   Read more