1. A non-uniform image defect inspection method, comprising steps of: a) inputting an original two-dimensional image into a computer; b) separating a non-uniform background image from the original two-dimensional image by Discrete Cosine Transform (DCT) performed by the computer to obtain a residual image without the non-uniform background image, wherein step (b) further comprises: b1) performing a 2-D (two-dimensional) DCT operation on the original two-dimensional image to obtain DCT coefficients of a frequency domain by the computer; b2) selecting a cut-off frequency from the frequency domain and eliminating high-frequency DCT coefficients higher than the cut-off frequency by the computer; b3) performing a 2-D Inverse DCT (IDCT) operation to reconstruct a background image with a brightness distribution similar to the brightness distribution of the original two-dimensional image by the computer; and b4) subtracting the background image from the original two-dimensional image to remove the background with non-uniform brightness distribution and obtaining the residual image by the computer; and c) performing a binarization segmenting the residual image by the computer to extract defects from the residual image so as to obtain inspection results.