1. In an inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device, said inspection system includes first and second fields of view each positioned along a different optic axis, the first field of view creates a first spatial domain pixel map of a portion of a first substrate pattern; and said second field of view provides a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a method for detecting defects in said first substrate pattern in said first field of view comprising the steps of: a. generating a residual spatial domain pixel map by subtracting one of said first and second spatial domain pixel maps from the other of said first and second spatial domain pixel maps; b. determining the pixel gray level histogram of said residual spatial domain pixel map of step a.; c. fitting the histogram of step b. to an exponential distribution function; d. determining a threshold amplitude that is above the expected noise level and below the expected defect level from said exponential distribution function of step c.; and e. thresholding said residual spatial domain pixel map of step a. with the determined threshold from step d. to identify all of those values that exceed said threshold as defects in said first spatial domain pixel map.