The invention provides a
textile surface defect detection method and
system based on image features, and relates to the technical field of
textile surface defect detection.The method comprises the steps that an
RGB image of a to-be-detected
textile is obtained and zoomed to 512 * 512 pixels, and then at least five semantic tags are output through a semantic segmentation model; the method comprises the following steps: adopting
hyperspectral imaging with the
wavelength of 400-1700 nm and the resolution of 10 nm, calculating the pixel
reflectivity through a
reflectivity formula, comparing the
reflectivity of 5-8 characteristic wavebands, marking as a
pollutant if the average deviation exceeds a threshold value, matching the type and position of a
stain with a spectral
angular distance, and after a standard sample and a semantic region are converted into an
LAB color space, extracting a minimum rotation enclosing rectangle and dividing a grid, invalid pixels are filled with 3 * 3 neighborhood effective pixel weighted mean values, and a grid LAB mean value is calculated. A grid
pollutant pixel corresponding to an image to be detected is filled with a standard sample in a mean value mode, then channels A and B are clustered through a sliding window, a pilling area is preliminarily judged according to the standard deviation of a channel L, and the pilling area is confirmed by combining the
structured light three-dimensional
point cloud and comparing with a threshold value.