The invention discloses an intelligent cloth printing defect monitoring method and
system based on
machine vision, and relates to the field of image
data processing, and the method comprises the steps: collecting a real-time video
stream on the surface of a fabric, intercepting single-frame image data, and carrying out the grid segmentation, so as to obtain
candidate image blocks; performing feature clustering analysis on sample blocks in the
candidate image blocks, and constructing a standard
texture feature library; sparse coding operation is carried out on the
candidate image blocks based on the standard
texture feature library, linear combination weights are solved, and sparse coefficients are obtained; generating a reconstructed image block according to the standard
texture feature library and the
sparse coefficient; calculating a
pixel value difference between the candidate image block and the reconstructed image block to obtain a
residual matrix representing a difference degree; and when the energy norm value of the
residual matrix is greater than an anomaly judgment threshold value, outputting a marking
signal indicating that the corresponding candidate image block has an image defect. By implementing the method and the device, defect detection without a preset template can be realized, and the adaptability of printing defect monitoring is improved.