This paper proposes an automatic recognition method to analyze the weave pattern and repeat of yarn-dyed fabrics. Firstly, the warp and weft floats of preprocessing yarn-dyed fabric images with the solid color are segmented through gray projection method. The kernel fuzzy c-means clustering (KFCM) algorithm is utilized to classify the weave points based on the texture features of gray means, gray variances and gray level co-occurrence matrix (GLCM). The exact state of the two floats is judged by comparing average gray means of each cluster. With warp floats (1s) and weft floats (0s), fabric image is represented as binary value weave diagram and coded digital matrix. Then, improved distance matching function (IDMF) is employed to obtain the weave repeat of weave diagram, which is used to correct error floats and improve the accuracy of identification result. Moreover, IDMF is directly applied to yarn-dyed fabrics with different color yarns and obtained the accurate weave repeat with faster speed. The experimental results have shown that the proposed algorithm can recognize weave pattern and repeat accurately and faster, and output the corresponding binary value weave diagram of the identified fabric.