1. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for determining a filter for a mask image representation of an integrated circuit (IC), the mask image taken by a mask inspection system, the method comprising: obtaining a training image from the mask inspection system; determining a desired image from the training image; determining a one dimensional filter from the training image and desired image; low-pass filtering the one dimensional filter; and determining a two dimensional filter from the one dimensional filter.