Use median for pHash