According to the orthogonal wavelet conditions, a two-dimensional adaptive stationary wavelet which matches the fabric texture is constructed by using the average energy ratio between the defect area and defect-free area as optimal objective function.