1. A method for detecting defects on a semiconductor sample, the method comprising: using an inspection tool to collect intensity data sets at a plurality of focus settings from each of a plurality of xy positions of the sample; extracting a polynomial equation having a plurality of coefficients for each of the xy position's collected intensity data sets as a function of focus setting; representing each of the coefficients' set of values for the plurality of xy positions with a corresponding coefficient image plane; and analyzing a target set of coefficient image planes and a reference set of coefficient image planes to detect defects on the sample.