The invention discloses a fabric defect detection method based on optical threshold segmentation. The method comprises two parts, i.e., an optimal threshold selection part and an image segmentation part. The optimal threshold selection part specifically comprises the following steps: step 1, randomly selecting a gray value as a segmentation threshold, step 2, according to the threshold, dividing an image into two types, step 3, solving the gray scale total mean value of the gray scale mean value of each type of image and the image, step 4, solving a between-class variance and an inter-class variance of the two types, step 5, calculating a weight, and step 6, calculating an optimal segmentation threshold according to a discrimination formula. The image segmentation part is carried out on the basis of the optimal threshold selection part. The gray value of each pixel point in the image is compared to the optimal threshold, 225 is taken as a gray value which is greater than the threshold, and 0 is taken as a gray value which is smaller than the threshold, such that the image can be divided into a background part and an object part. According to the invention, during segmentation threshold selection, the between-class variance of pixels is considered, an inter-class distance is also introduced, and the weight is employed for reinforcement, so that the calculated threshold is more accurate, the defects of a fabric image can be accurately detected, and the segmentation effect of a complex texture image is improved.