Aiming at the problem that current studies about computer recognition of fabric defects need immense calculating time and complex procedure and can't recognize correctly. In this paper, by imitating human vision system, a new computer algorithm based on texture rule for rapidly and correctly detection of fabric defects is offered, which includes "region segmenting way", "rule function", "vicinity defect emerging way" and "region distance difference way". Using this method, computer system may detect fabric defects without pre-training in virtue of analyzing texture rule of fabric image region. Firstly, a low-dimensional matrix of fabric image is established by segmenting the image region and finding rule parameter of each region. Secondly, a rule comparison function and rule certain function based on rule parameter for fabric image are constructed. Then the fabric image is decomposed to rule regions and ruleless regions, it is confirmed that the fabric defects locate in the ruleless regions. Thirdly, "vicinity defect emerging way" is proposed to emerge defects, "region distance difference way" was used for detecting exact position by calculating the difference between rule regions and ruleless regions. The fuzzy recognition method is presented to recognize the shape of fabric defect. Finally, the experiment result shows that this method avoids a mass of complex calculate and adapts to detect fabric defect with high speed. This method needn't pre-training and saves operating time, can detect much extensive fabric defects and have a good recognition result.