A while back I developed a mild obsession with pentagons (mathematical ones, not symbolistic!) It started when I discovered some beautiful (simple and to me, unknown) theorems of quadrangles, such as

## 2D Minimum and Maximum Filters: Algorithms and Implementation Issues

A while back I needed to implement fast minimum and maximum filters for images. I devised (what I thought was) a clever approximation scheme where the execution time is not dependent on the window size of the filter. But the method…

## Update to Functional Equations Reference (version 1.3)

This is a substantial update of this reference document. The most important addition is the chain and substitution rules for arithmetic difference calculus (ADC). Other additions include: more properties of the discrete power function, more properties of ADC operators, definitions of…

## Update to Functional Equations Reference

I have updated the Reference for Functional Equations. I have added several entries to the tables, updated the graphs, added some new graphs, added some explanations and additional notes on notation, corrected a few typos, and re-organised the document slightly.…

## A Simple Trick for Moving Objects in a Physics Simulation

(Original Image by Valerie Everett) It is sometime necessary to move an object in a physics simulation to a specific point. On the one hand, it can be difficult to analyse the exact force you have to apply; on the…

## Region Quadtrees in C++

(Original image by GoAwayStupidAI). Below are four C++ implementations of the region quadtree (the kind used for image compression, for example). The different implementations were made in an attempt to optimise construction of quadtrees. (For a tutorial on implementing region…

## Catching Common Image Processing Programming Errors with Generic Unit Tests

When implementing image algorithms, I am prone to make these mistakes: swapping x and y; working on the wrong channel; making off-by-one errors, especially in window algorithms; making division-by-zero errors; handling borders incorrectly; and handling non-power-of-two sized images incorrectly. Since…

## Simple, Fast* Approximate Minimum / Maximum Filters

*Fast = not toooo slow… For the image restoration tool I had to implement min and max filters (also erosion and dilation—in this case with a square structuring element). Implementing these efficiently is not so easy. The naive approach is to simply…

## Experimental Tool for Removing Unwanted Artefacts in Textures

Many textures used for 3D art start from photographs. Ideally, such textures should be uniformly lit so that the texture does not interfere with the lighting applied by the 3D software. Often, lighting artefacts must be removed by hand. This…

## Poisson Disk Sampling Example Code

I decided to put the Poisson disk sampling code here for download since the site that hosted it is down. The code accompanies the tutorial on Dev.Mag: Poisson Disk Sampling. Download poisson_disk_java.zip (184 KB) poisson_disk_python.zip (912 KB) poisson_disk_ruby.zip (59 KB)…