Python port of ImageJ's background subtraction technique for 8-bit images