1. A method of generating a compensation matrix during a substrate inspection, the method comprising: selecting information of N 1 (N 1 ≧2) feature objects which are randomly predetermined within a field of view (FOV) on a substrate; generating a first compensation matrix on a basis of information of the feature objects which are extracted on the substrate; comparing an offset value of each of all the feature objects with a predetermined reference value by applying all the feature objects within the FOV to the compensation matrix to count the number of the feature objects of which the offset value of the each of all the feature objects is less than the predetermined reference value; and repeatedly performing the above steps N 2 times (N 2 ≧1), and generating a second compensation matrix using information of the feature objects which have the offset value which is less than the predetermined reference value, in case the number of the counted feature objects is the maximum.