Objective In order to improve the universality and accuracy of fabric defects detection algorithm for simple textured fabric, pattern textured fabric and stripe textured fabric. A fabric defects detection algorithm based on multiscale Laws of texture energy and low-rank decomposition was proposed. Method Firstly, the fabric image is equalized by histogram, and the image is evenly divided into sub-image blocks. Secondly, 28 texture energy features were extracted from each sub-image block (7 Laws filter templates were used to extract the features on 4 scales), and the mean values of all sub-image blocks were calculated, and the feature matrix was formed. Then, the low-rank decomposition model is constructed by the feature matrix, and the low-rank and spare parts are obtained by the direction alternation method (ADM). Finally, the defect saliency maps are generated from the sparse part, which is segmented by iterative threshold segmentation method, and the fabric defect detection results are obtained. Results To validate the effectiveness of the proposed algorithm, the ZJU-Leaper colored fabric dataset is used for experiments. Three images, including simple textured fabric, patterned textured fabric, and striped textured fabric, were selected for the experiment, including common defects such as wrong weft, broken warp, flaking and holes. The image size is 512 pixels × 512 pixels. First, the key elements of the algorithm are analyzed. In the feature extraction section, the saliency maps generated with different numbers of Laws filter templates are compared. In the low-rank decomposition part, the saliency maps generated by choosing different balance factors are compared. The experimental results show that 28 Laws filter templates have the best detection effect, and the fabric defect saliency maps is the best when λ values of simple texture, pattern texture and stripe texture fabric are 0.02, 0.12 and 0.05, respectively. Secondly, the defect saliency maps generated by the proposed algorithm in this paper is compared with Gabor combined with low-rank decomposition algorithm (the following content is expressed in Gabor+LR), HOG combined with low-rank decomposition algorithm (the following content is expressed in HOG+LR), and Gabor combined with HOG combined with low-rank decomposition algorithm to generate saliency maps (the following content is expressed in GHOG+LR). Experimental results show that: in the detection of simple texture fabrics, impurities exist in the detection results of Gabor+LR algorithm and HOG+LR algorithm, and the results of GHOG+LR algorithm and the results of the algorithm in this paper are satisfactory. In the detection of pattern-texturing fabrics, the results of the proposed algorithm in this paper are ideal. However, error detection occurs in the detection results of Gabor+ LR algorithm and HOG+LR algorithm, and a small number of impurities also occur in the detection results of GHOG+LR algorithm. In the detection of striped texture fabrics, the results of the proposed algorithm in this paper also are relatively ideal. A small number of impurities appears in the detection results of the GHOG+LR algorithm, while the Gabor+LR algorithm will have error detection when the fabric image does not have obvious defects, and a large number of impurities still appear in the detection of the HOG+LR algorithm. Finally, the timeliness analysis of the algorithm is carried out, and the results show that the detection speed of the proposed algorithm has certain advantages. Conclusion In this paper, we propose a fabric defect detection algorithm based on multiscale Laws texture energy and low-rank decomposition. In the feature extraction part, 28 Laws texture energy features are extracted based on four image scales to generate the feature matrix. In the low-rank decomposition part, the low-rank decomposition model is established, and the direction alternation method (ADM) is used to optimize it to get the low-rank and sparse parts of the feature matrix. Experimental results show that the proposed algorithm performs better than other algorithms in detecting simple textured fabrics, patterned textured fabrics, and striped textured fabrics, with some advantages in detection speed. Therefore, the proposed algorithm has better generality, accuracy and detection efficiency. © 2024 China Textile Engineering Society. All rights reserved.