Intelligent detection method and system for color difference of color silk based on image analysis

By using an image analysis-based method and employing an inversion gradient model and a multidimensional color difference prediction model, the direction of color difference shift in colored silk is identified, solving the problem that traditional detection methods struggle to detect slow color difference shifts and achieving high-precision and robust color difference detection.

CN120976567AActive Publication Date: 2025-11-18江苏嘉通能源有限公司

Patent Information

Application Number
CN202511518439.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-11-18
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Traditional methods struggle to detect color shifts that occur slowly in a particular direction within colored silk, such as band drift or gradual drift of the silk threads, leading to color inconsistencies and a decline in visual quality.

Method used

An image analysis-based approach is employed, utilizing an inversion gradient model to identify spectral feature vectors, constructing a multidimensional color difference prediction model, extracting contour and reflectance changes through Laplacian and Sobel operators, and combining multi-objective evolutionary algorithms and manifold learning techniques to identify the direction of color difference shift and generate a detection report.

Benefits of technology

It achieves high-precision automated recognition of minute color difference changes in colored silk images, improves the robustness and accuracy of detection, and can effectively detect defects such as color difference bands and color gradient stripes, thereby improving the intelligence and standardization of product quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976567A_ABST
    Figure CN120976567A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent detection method and system for color difference of colored filaments based on image analysis, and relates to the technical field of image processing.The method comprises the steps that a colored filament sample image is collected, and the colored filament sample image is sliced to generate a plurality of colored filament image blocks; identifying spectral feature vectors of the colored filament image blocks by using a pre-constructed inversion gradient model; and combining the spectral feature vectors to generate a multi-dimensional feature matrix, introducing a colored filament characteristic factor into the multi-dimensional feature matrix to obtain a multi-dimensional chromatic aberration prediction model, and identifying the chromatic aberration offset direction of the colored filament image block based on the multi-dimensional chromatic aberration prediction model. According to the method, the pre-constructed inversion gradient model is utilized, the spectral feature vectors of the image blocks can be efficiently recognized, the high efficiency and accuracy of the feature extraction process are ensured, the spectral feature vectors are combined to generate the multi-dimensional feature matrix, and the feature extraction efficiency is improved. And a multi-dimensional chromatic aberration prediction model constructed in combination with the characteristic factors of the color filaments can realize accurate identification of the chromatic aberration deviation direction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a colored silk color difference intelligent detection method and system based on image analysis. BACKGROUND

[0002] Colored silk refers to fine silk or textile fibers that have been dyed or have natural colors, commonly used in high-end textiles, silk, industrial detection and other fields, and its image features usually exhibit color regions with directional texture and obvious boundaries; color difference detection refers to measuring and identifying the differences between the sample surface color and the standard color through optical imaging, image processing or hyperspectral analysis, etc., aiming to find color inconsistencies, shifts, contamination and other quality problems.

[0003] When the color of colored silk changes slowly along a certain direction, such as strip drift or along the silk direction, traditional color difference detection methods based on fixed threshold or static region contrast cannot detect such continuous shifts, resulting in many subtle and persistent color difference shifts (such as gradual color change in strip form, color difference bands and gradual drift of silk lines) that are not detected in time in quality detection, thereby affecting the color consistency and visual quality of the final product.

[0004] In view of the problems in the related art, no effective solution has been proposed so far. SUMMARY

[0005] In view of the problems in the related art, the present application proposes a colored silk color difference intelligent detection method and system based on image analysis to overcome the above technical problems existing in the prior art.

[0006] To this end, the specific technical solutions adopted by the present application are as follows: According to one aspect of the present application, a colored silk color difference intelligent detection method based on image analysis is provided, which comprises: Collecting colored silk sample images, slicing the colored silk sample images to generate a plurality of colored silk image blocks, and identifying the spectral feature vectors of the colored silk image blocks using a pre-constructed inversion gradient model; Combining the spectral feature vectors to generate a multi-dimensional feature matrix, introducing a colored silk characteristic factor into the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, and identifying the color difference shift direction of the colored silk image blocks based on the multi-dimensional color difference prediction model; Calculating the color difference score of each colored silk sample image based on the color difference shift direction, comparing the color difference score with a preset interval, and generating a colored silk color difference detection report according to the comparison result.

[0007] Preferably, a colored yarn sample image is collected, the colored yarn sample image is sliced to generate a plurality of colored yarn image blocks, and a pre-constructed inversion gradient model is used to identify a spectral feature vector of the colored yarn image blocks, including: The colored yarn sample is collected by using a hyperspectral imaging device, and a standard reflectance image is obtained by combining a whiteboard calibration technique. The standard reflectance image is sequentially subjected to radiation correction and geometric correction processing to obtain a colored yarn sample image. The colored yarn sample image is divided into a plurality of colored yarn image blocks, the colored yarn contour region in the colored yarn image block is extracted by using a Laplace operator, and the reflectance variation of the colored yarn contour region is calculated by using a Sobel operator. An inversion gradient model is constructed based on the reflectance variation of the colored yarn contour region, and the spatial gradient feature and the spectral derivative feature of the colored yarn image block are generated by inversion through the inversion gradient model. The spatial gradient feature and the spectral derivative feature are fused after dimension reduction processing, and the spectral feature vector of the colored yarn image block is extracted from the fusion result.

[0008] Preferably, the inversion gradient model is constructed based on the reflectance variation of the colored yarn contour region, and the spatial gradient feature and the spectral derivative feature of the colored yarn image block are generated by inversion through the inversion gradient model, including: The basic parameters of spectral inversion are set based on the reflectance of the colored yarn contour region, and the inversion spectral parameter set is obtained by arbitrarily combining the basic parameters. The inversion spectral parameter set is forward simulated to generate a forward image sample. The Euclidean distance between the forward image sample and the corresponding position in the original colored yarn sample image is calculated, and a target function is constructed based on the Euclidean distance. A proxy model of spatial-spectral features is constructed and trained according to the target function, the proxy model is iteratively solved by using a modified multi-objective evolutionary algorithm and combining the characteristics of the colored yarn, and an optimal inversion parameter combination is output. The colored yarn image block is applied to the optimal inversion parameter combination to obtain a local prediction value of the colored yarn image block, and the local prediction value is converted into a spatial gradient feature spectrum and a spectral derivative feature spectrum of the colored yarn image block.

[0009] Preferably, the proxy model is iteratively solved by using a modified multi-objective evolutionary algorithm and combining the characteristics of the colored yarn, and an optimal inversion parameter combination is output, including: The input parameters of the proxy model are used as population individuals, and the inversion parameter search interval is set. A plurality of Doppler maps are generated by traversing the inversion parameter search space. The Doppler rate sampling index is selected for each population individual, and the Doppler rate sampling index is subjected to Cartesian projection processing to obtain the fitness value of each population individual. The fitness values are sorted in descending order, and population individuals in a preset range are selected and divided into a high fitness population, and the remaining individuals are taken as a low fitness population; The high fitness population is iteratively updated to generate corresponding mutation individuals, and the low fitness population is updated near the mutation individuals, and the fitness values of each population individual are updated; The population individual with the maximum fitness value is taken as the optimal population individual of each iteration, and the update of the fitness value is iteratively performed until the iteration convergence condition is met, and the optimal solution of the proxy model is output as the optimal inversion parameter combination.

[0010] Preferably, the spectral feature vectors are combined to generate a multi-dimensional feature matrix, a colored silk characteristic factor is introduced into the multi-dimensional feature matrix, a multi-dimensional color difference prediction model is obtained, and the color difference offset direction of the colored silk image block is identified based on the multi-dimensional color difference prediction model, including: The priority feature vectors in the spectral feature vectors are extracted using a continuum removal algorithm, and the priority feature vectors are organized into a multi-dimensional feature matrix according to spatial positions; A dynamic texture characteristic factor is introduced into the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, a color difference vector output by the multi-dimensional color difference prediction model is combined with a Munsell color difference to construct a composite color difference component; The manifold learning technology is used to map the composite color difference index to a color space, and the direction gradient histogram is used to cluster the color difference vector field to identify the main offset direction of the colored silk image block.

[0011] Preferably, the manifold learning technology is used to map the composite color difference component to a color space, and the direction gradient histogram is used to cluster the color difference vector field to identify the main offset direction of the colored silk image block, including: The pixel values of the original colored silk sample image are input into a predefined gamma function using the mean value quantization technology, and the composite color difference component is separated to obtain three primary color components through the output result of the gamma function; The three primary color components are input into a predefined feature matrix to calculate color tristimulus values, so as to convert the composite color difference component to a color space; A color difference histogram is constructed in the colored silk contour region, a fuzzy C membership of the mean clustering is calculated by Lagrange operator multiplication and multiplied by the color difference histogram to obtain a direction gradient histogram; The colored silk contour motion estimation vector in the colored silk contour region is analyzed, and based on the motion estimation vector, the main offset direction of the colored silk image block is identified in the clustered direction gradient histogram.

[0012] Preferably, the colored silk contour motion estimation vector in the colored silk contour region is analyzed, including: A number of profile center points of the colored yarn profile region are selected as origins to construct a horizontal diamond matching window, and a candidate absolute difference sum of the profile center points in the horizontal diamond matching window is calculated; The candidate absolute difference sum is judged. If the candidate absolute difference sum is minimum, the next step is executed, otherwise, the profile center point with the minimum candidate absolute difference sum is taken as a new origin until the minimum candidate absolute difference sum is found. The candidate absolute difference sum of the two adjacent points of the profile center point is calculated, and the minimum value of the candidate absolute difference sum is screened out as the colored yarn profile motion estimation vector in the colored yarn profile region.

[0013] Preferably, before the profile center point with the minimum candidate absolute difference sum is taken as a new origin, it further includes: The type of the profile center point with the minimum candidate absolute difference sum is judged. If the minimum profile center point is a far point, the horizontal diamond matching window is continuously used, and if it is a near point, the vertical diamond matching window is adjusted.

[0014] Preferably, the fuzzy C The expression of the membership degree of the mean clustering is: ; In the formula, x i represents the color difference vector of the first i pixel; v k represents the first k cluster center; u ij represents the membership degree of the first i pixel to the cluster j ; m represents the fuzzy index; c represents the total number of cluster centers; v j represents the first j cluster center.

[0015] According to another aspect of the present application, there is also provided a colored yarn color difference intelligent detection system based on image analysis, which comprises: A spectrum feature analysis module is used to collect a colored yarn sample image, slice the colored yarn sample image to generate a plurality of colored yarn image blocks, and identify the spectrum feature vector of the colored yarn image block by using a pre-constructed inversion gradient model; A color difference prediction module is used to combine the spectrum feature vector to generate a multi-dimensional feature matrix, introduce a colored yarn characteristic factor into the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, and identify the color difference offset direction of the colored yarn image block based on the multi-dimensional color difference prediction model. The detection report generation module is configured to calculate a color difference score of each colored yarn sample image based on the color difference offset direction, compare the color difference score with a preset interval, and generate a colored yarn color difference detection report according to a comparison result.

[0016] The present application has the following advantages: 1. The present application uses a pre-constructed inversion gradient model to efficiently identify the spectral feature vectors of image blocks, ensuring the efficiency and accuracy of the feature extraction process. By combining these spectral feature vectors to generate a multi-dimensional feature matrix and combining a multi-dimensional color difference prediction model constructed based on colored yarn characteristic factors, the present application can accurately identify the color difference offset direction, further improving the color difference offset determination capability, and making the detection still robust under dynamic and complex conditions.

[0017] 2. The present application extracts contour and reflectivity changes through Laplace and Sobel operators, effectively separates boundary and color features, constructs a precise proxy model through forward simulation and Euclidean distance objective functions, and efficiently searches for optimal inversion parameters through a multi-objective evolutionary algorithm, further improving the reliability of spatial gradient and spectral derivative features, making the detection method stable under dynamic textures and color gradients, thereby not only improving the automation, precision and repeatability of color difference detection, but also effectively solving color difference defects such as color difference bands, color gradient stripes and local transition blur caused by spectral fluctuations, complex surface structures or process deviations.

[0018] 3. The present application can accurately capture the color difference features of colored yarn image blocks through the construction of multi-dimensional feature matrices and the extraction of spectral features, and introduces dynamic texture characteristic factors, making the color difference prediction model more robust and able to adapt to different textures and color changes. The introduction of manifold learning technology further improves the mapping accuracy of color difference indicators in color space, thereby enhancing the accurate identification and analysis of color difference offset direction and effectively distinguishing the main offset direction in complex color changes. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0020] Figure 1 is a flowchart of a colored yarn color difference intelligent detection method based on image analysis according to an embodiment of the present application; Figure 2 is a principle block diagram of a colored yarn color difference intelligent detection system based on image analysis according to an embodiment of the present application; Figure 3 is a flow chart of colored yarn profile motion estimation vector in a colored yarn color difference intelligent detection method based on image analysis according to an embodiment of the present application.

[0021] In the figure: 1, spectral feature analysis module; 2, color difference prediction module; 3, detection report generation module. DETAILED DESCRIPTION

[0022] To further illustrate the embodiments, the present application provides drawings, which are part of the disclosure of the present application, mainly used to illustrate the embodiments, and can explain the operating principle of the embodiments in conjunction with the related description of the specification. With reference to these contents, those skilled in the art should understand other possible implementations and advantages of the present application.

[0023] According to an embodiment of the present application, a colored yarn color difference intelligent detection method and system based on image analysis are provided.

[0024] The present application will be further described in conjunction with the drawings and specific embodiments, as shown, the colored yarn color difference intelligent detection method based on image analysis according to an embodiment of the present application, the method comprises: Figure 1 S1, collecting colored yarn sample images, slicing the colored yarn sample images to generate a plurality of colored yarn image blocks, and identifying the spectral feature vectors of the colored yarn image blocks by using a pre-constructed inversion gradient model. S1, collecting colored yarn sample images, slicing the colored yarn sample images to generate a plurality of colored yarn image blocks, and identifying the spectral feature vectors of the colored yarn image blocks by using a pre-constructed inversion gradient model.

[0025] It should be noted that the purpose of the colored yarn color difference intelligent detection method is to realize high-precision and automatic identification and evaluation of the micro color difference changes in the colored yarn image, so as to improve the intelligent and standardized level of product quality control. In the colored yarn color difference intelligent detection method, the main purpose of detecting color difference offset is to accurately capture and identify the direction and amplitude of color change, especially when the color presents subtle, gradual or local changes. Color difference offset represents the deviation or change trend of color in different regions of the image. By detecting these offsets, potential problem areas in the colored yarn image can be effectively located and analyzed, such as color difference bands, color gradient stripes, local transition blur, etc.

[0026] Among them, collecting colored yarn sample images, slicing the colored yarn sample images to generate a plurality of colored yarn image blocks, and identifying the spectral feature vectors of the colored yarn image blocks by using a pre-constructed inversion gradient model comprises: The colored yarn sample is collected by using a hyperspectral imaging device, and a standard reflectance image is obtained by combining whiteboard calibration technology. The standard reflectance image is sequentially subjected to radiation correction and geometric correction processing to obtain the colored yarn sample image.

[0027] It should be noted that the hyperspectral camera equipped with multiple waveband sensors is used to simultaneously acquire the colored yarn sample image data on multiple wavebands, and the colored yarn sample image data also includes a series of reflectivity data of specific wavelengths, thereby providing an information basis for subsequent spectral analysis.

[0028] The whiteboard calibration technique is a standard object with a known reflectivity, usually with high reflectivity and a uniform surface, used as a reference for calibrating the spectral imaging device. By taking a whiteboard image, the reflectivity response curve of the device at different wavelengths is obtained, and the reflectivity measurement deviation of the instrument is corrected through these response curves, and this process generates a standard reflectivity image as a reference image for subsequent processing.

[0029] The colored yarn sample image is divided into a plurality of colored yarn image blocks, the colored yarn contour region in the colored yarn image block is extracted by the Laplace operator, and the reflectivity variation of the colored yarn contour region is calculated by the Sobel operator.

[0030] It should be noted that the Laplace operator is a second-order differential operator used to detect edges and abrupt changes in images, which highlights local intensity variations by calculating the second-order derivative of the gray scale around the pixel, and its effect is to accurately extract the contour region in the colored yarn image block, i.e. to clearly segment the boundary of the yarn line; the Sobel operator is a first-order gradient operator, mainly used to calculate the gray scale gradient of the image in the horizontal and vertical directions, used to reflect the direction and amplitude of the intensity variation, and the present application is used to calculate the reflectivity variation of the colored yarn contour region, and its effect is to obtain the local variation information of the reflectivity on each contour line, and further analyze the fine texture and color distribution characteristics of the material.

[0031] An inversion gradient model is constructed based on the reflectivity variation of the colored yarn contour region, and spatial gradient features and spectral derivative features of the colored yarn image block are generated by inversion through the inversion gradient model.

[0032] Among them, the inversion gradient model is constructed based on the reflectivity variation of the colored yarn contour region, and the spatial gradient features and spectral derivative features of the colored yarn image block are generated by inversion through the inversion gradient model, which includes: The reflectivity of the colored yarn contour region is used to set the basic parameters of spectral inversion, and the basic parameters are combined to obtain an inversion spectral parameter set, and the inversion spectral parameter set is forward simulated to generate a forward image sample.

[0033] It should be noted that the basic parameters for spectral inversion are set based on the reflectance of the colored filament contour region. This represents the spectral feature values ​​of the target region extracted from the sample image as input, such as the mapping relationship between reflectance and material properties (dye concentration, surface texture, mixing ratio, etc.). These basic parameters are arbitrarily combined to construct multiple sets of inverted spectral parameters, which represent the existing variations in the colored filament material. The inverted spectral parameter sets are then input into an existing forward model for spectral forward modeling simulation to generate corresponding forward modeling image samples. The effect of these forward modeling image samples is to simulate visual images under different material combinations and spectral responses at the image level, reflecting the appearance differences of images under different parameter combinations, including color changes, spectral reflectance differences, and texture feature changes.

[0034] The Euclidean distance between corresponding positions in the forward modeling image sample and the original colored silk sample image is calculated, and the objective function is constructed based on the Euclidean distance.

[0035] It should be noted that the Euclidean distance is calculated between corresponding positions in the forward image samples and the original colored silk sample images, and the objective function is constructed based on the Euclidean distance, including: Spatial registration is performed between the forward-modeled image samples and the original image to ensure a one-to-one correspondence at pixel locations; the multi-band spectral vector is extracted from each corresponding pixel, denoted as […]. S i The orthogonal image is represented by the first... i The spectral vector of pixels, O i Represents the original image. i The spectral vector of each pixel; the formula for calculating the Euclidean distance at each pixel location is: ; In the formula, d i Indicates the first i Spectral distance of pixels, B Indicates the number of spectral bands. S ij The orthogonal image is represented by the first... i The pixel in the first j Reflectance values ​​for each band, O ij Represents the original image. i The pixel in the first j The reflectance values ​​of each band; construct an objective function based on the distance values ​​of all pixels, including averaging or summing the distances of all pixels, to measure the overall spectral difference between the forward modeled image and the original image. The smaller the objective function, the closer the forward modeling is to the real sample, and it can be used for subsequent inversion optimization or parameter adjustment.

[0036] The proxy model of the spatial-spectral feature is constructed and trained according to the objective function, and the proxy model is iteratively solved by using the improved multi-objective evolutionary algorithm and in combination with the colored silk characteristics, and the optimal inversion parameter combination is output.

[0037] It should be noted that the proxy model of the spatial-spectral feature is a substitute model used to simulate the complex mapping relationship between the inversion parameters and the target image on the basis of the constructed objective function, and the proxy model types include Gaussian process regression, radial basis function neural network and support vector regression; the model architecture is usually composed of an input layer, a hidden layer (for nonlinear mapping) and an output layer, the input is the inversion parameter set or its coded representation, and the output is the Euclidean distance objective function value of the corresponding pixel; the core principle is to learn the mapping relationship from the inversion spectral parameters to the objective function value on the training data set, so as to indirectly approximate the real forward process by optimizing the minimum value of the objective function predicted by the proxy model in the actual inversion, thereby improving the inversion efficiency and reducing the consumption of computing resources.

[0038] The model training process includes data preparation (taking the Euclidean distance of the forward image sample and the original image as the supervised target), model initialization, loss function construction (such as the least mean square error MSE), iterative optimization (such as the Adam or SGD algorithm) and accuracy verification, and finally forms an efficient substitute model that can approximate the response characteristics of the real objective function.

[0039] The proxy model is iteratively solved by using the improved multi-objective evolutionary algorithm and in combination with the colored silk characteristics, and the optimal inversion parameter combination is output. The input parameters of the proxy model are taken as population individuals, and the inversion parameter search interval is set to generate a plurality of Doppler images by traversing the inversion parameter search space; The Doppler rate sampling index is selected for each population individual, and the Doppler rate sampling index is subjected to Cartesian projection processing to obtain the fitness value of each population individual.

[0040] It should be noted that the Doppler rate sampling index corresponding to each individual is subjected to Cartesian projection processing, that is, the original one-dimensional index is mapped to a higher-dimensional or regular coordinate system to reflect the position distribution characteristics of the frequency shift in the spatial structure; by establishing a connection between the mapped point set and the spatial-spectral feature proxy model, the predicted image performance of each population individual under a specific Doppler rate sampling condition can be calculated, reflecting the matching degree of the individual parameter combination under the current sampling index, and the smaller the fitness, the closer the simulation effect to the real sample, which is beneficial for further use in genetic optimization or inversion parameter selection.

[0041] The fitness values are sorted in descending order, the population individuals in a predetermined range are selected and divided into a high fitness population, and the remaining individuals are taken as a low fitness population. The high-adaptability population is iteratively updated to generate a corresponding mutation individual, and the low-adaptability population is updated near the mutation individual, and the adaptability values of each population individual are updated; The population individual with the largest adaptability value is taken as the optimal population individual of each iteration, and the updating of the adaptability value is iteratively performed until the iteration convergence condition is met, and the optimal solution of the proxy model is output as the optimal inversion parameter combination.

[0042] It should be noted that after selecting the corresponding Doppler rate sampling index for each individual and performing Cartesian projection processing, the adaptability value of the individual is calculated using the proxy model to reflect the pros and cons of the inversion effect; the mutation operation is performed on the high-adaptability individual to generate more diverse parameter combinations, and the low-adaptability population is updated in the high-adaptability neighborhood to enhance the overall population quality; finally, the optimal solution of the proxy model in the search space is output as the optimal combination of inversion parameters, and its effect is that the generated simulated image has the smallest error with the original sample image in spectral and spatial features, and has high inversion accuracy and stability.

[0043] The colored silk image block is applied to the optimal inversion parameter combination to obtain a local prediction value of the colored silk image block, and the local prediction value is converted into a spatial gradient feature map and a spectral derivative feature map of the colored silk image block.

[0044] The spatial gradient feature and the spectral derivative feature are fused after dimension reduction processing, and a spectral feature vector of the colored silk image block is extracted from the fusion result.

[0045] S2, the spectral feature vectors are combined to generate a multi-dimensional feature matrix, a colored silk characteristic factor is introduced into the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, and the color difference offset direction of the colored silk image block is identified based on the multi-dimensional color difference prediction model.

[0046] The spectral feature vectors are combined to generate a multi-dimensional feature matrix, a colored silk characteristic factor is introduced into the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, and the color difference offset direction of the colored silk image block is identified based on the multi-dimensional color difference prediction model. The priority feature vectors in the spectral feature vector are extracted using a continuum removal algorithm, and the priority feature vectors are organized into a multi-dimensional feature matrix according to the spatial position.

[0047] It should be noted that the original reflectance spectrum is standardized using the continuum removal method to highlight the absorption valley and reflection characteristics, and to eliminate background interference; then the processed spectral feature vector is analyzed, and the priority feature vectors most representative for identification are selected according to the absorption band depth, position, shape and other information; then these priority feature vectors are reorganized according to the spatial coordinates of the pixel points in the image, i.e. they are mapped from one-dimensional spectral vectors to feature matrices on two-dimensional image structures according to the spatial position, and finally a multi-dimensional feature matrix is formed.

[0048] a multi-dimensional color difference prediction model is constructed by introducing dynamic texture characteristic factors into the multi-dimensional feature matrix, and a composite color difference component is constructed by combining the color difference vector output by the multi-dimensional color difference prediction model with Mahalanobis color difference; It should be noted that by analyzing the spectral fluctuations and texture changes of the colored yarn image at different time frames or observation angles, statistical features or time sequence features describing the dynamic performance of the material are extracted, and then these dynamic texture factors are spliced with the spectral-spatial features of each pixel to form a multi-dimensional input vector.

[0049] Based on the multi-dimensional input vector, a multi-dimensional color difference prediction model is constructed, and a deep neural network architecture such as a convolutional neural network (CNN) or a spatio-temporal network that integrates time sequence features is used. The model structure consists of an input layer, several hidden layers, and an output layer. The input layer receives multi-dimensional feature matrix data, the hidden layer extracts non-linear feature relationships, and the output layer predicts a color difference vector. The model training aims to minimize the loss function between the actual color difference and the predicted color difference.

[0050] The color difference vector output by the model is combined with the Mahalanobis color difference, i.e., based on the Mahalanobis distance formula of the color difference vector and the mean vector and the covariance matrix, the statistical distance of the color difference between samples is measured, thereby constructing a multi-dimensional color difference prediction model of the composite color difference component. The principle is to use Mahalanobis distance to comprehensively consider the correlation and weight of each spectral dimension and dynamic texture characteristics, so that the model more accurately reflects the small color difference differences under different materials or processes.

[0051] The manifold learning technology is used to map the composite color difference index to the color space, and the histogram of oriented gradients is used to cluster the color difference vector field to identify the main deviation direction of the colored yarn image block.

[0052] The manifold learning technology is used to map the composite color difference index to the color space, and the histogram of oriented gradients is used to cluster the color difference vector field to identify the main deviation direction of the colored yarn image block. The mean quantization technology is used to input the pixel value of the original colored yarn sample image into a predefined gamma function, and the three primary color components are separated from the composite color difference component through the output results of the gamma function; The three primary color components are input into a predefined feature matrix to calculate the color tristimulus values, so as to convert the composite color difference component to the color space; A color difference histogram is constructed in the colored yarn contour area, and the membership degree of fuzzy C Mean clustering is calculated by Lagrange operator multiplication and multiplied by the color difference histogram to obtain the histogram of oriented gradients.

[0053] It should be noted that the membership degree of fuzzy C The expression of the membership degree of fuzzy ; In the formula, x i Indicates the first i A color difference vector of 1 pixel; v k Indicates the first k Cluster centers; u ik Indicates membership degree, i.e., pixels. i Belongs to clustering j The probability of; m The fuzzy index (ranging from 1.5 to 2.5) controls the softness or hardness of clustering. m →1 indicates a near-hard cluster. m >2 indicates a more fuzzy membership distribution. c Indicates the total number of cluster centers; v j Indicates the first j Cluster centers.

[0054] Among them, the calculation of Lagrange operator multiplication is fuzzy. C The objective function expression for membership degree in mean clustering is: ; In the formula, F This represents the objective function, which needs to be minimized to optimize clustering. n Indicates the total number of pixels; Indicates the weighted membership degree ( m (Amplifying the effect of high-confidence membership) Lambda This represents the Lagrange multiplier, used to enforce membership degree normalization constraints; Represents pixels i With cluster center k The square of the Euclidean distance; c Indicates the preset number of clusters; x i Indicates the first i A color difference vector of 1 pixel; v k Indicates the first k Cluster centers.

[0055] The motion estimation vector of the colored filament contour in the colored filament contour region is analyzed, and based on the motion estimation vector, the main offset direction of the colored filament image block is identified in the clustered orientation gradient histogram.

[0056] It should be noted that the image pixel value is compressed and enhanced by the mean quantization and the gamma function, so that the color difference information in the original colored yarn sample image is easier to establish a mapping relationship with the color space; the composite color difference component is effectively separated into three primary color components (R, G, B) by the gamma function output, and then the color tristimulus value is calculated by inputting the feature matrix to realize the conversion from the physical color quantity to the perceptual color space, and the expression is: ; ; ; In the formula, R , G , B The three primary color components after gamma correction, each component is subjected to R γ , G γ , B γ Nonlinear transformation; γ represents the gamma value; X , Y , Z The tristimulus value of the color space belongs to the CIE XYZ space, which is used to express the color perceived by the human eye; M ij The element in the feature matrix (usually referred to as the color space conversion matrix) is the contribution of different color components to the tristimulus value.

[0057] After constructing the color difference histogram, the membership of the fuzzy C Mean clustering is multiplied by the Lagrange operator multiplication, which strengthens the statistical expression of the direction gradient in the feature boundary gathering area, thereby improving the direction perception ability of the local structure of the image; Combined with the motion estimation vector of the colored yarn contour area, the clustering result is associated with the main direction offset to identify the main offset direction of the image block under the dynamic texture change, which helps to improve the perception stability and discrimination ability of the colored yarn material and structure state in the subsequent analysis, and overall enhances the description accuracy of the model in the color and structure dual channels.

[0058] As shown in Figure 3 , the colored yarn contour motion estimation vector in the colored yarn contour area includes: Select a number of contour center points in the colored yarn contour area as the origin, construct a horizontal diamond matching window, and calculate the candidate absolute difference sum of the contour center points in the horizontal diamond matching window; Judge the candidate absolute difference sum, if the candidate absolute difference sum is minimum, execute the next step, otherwise, take the contour center point with the minimum candidate absolute difference sum as the new origin, until the minimum candidate absolute difference sum is found. wherein, before taking the candidate absolute difference sum minimum contour center point as a new origin, further comprising: judging the type of the candidate absolute difference sum minimum contour center point, if the minimum contour center point is a far point, continue to use the horizontal diamond matching window, if it is a near point, adjust to a vertical diamond matching window.

[0059] calculating the candidate absolute difference sum of the two adjacent points on both sides of the contour center point, and screening out the minimum value of the candidate absolute difference sum as the colored yarn contour motion estimation vector in the colored yarn contour region.

[0060] It should be noted that by introducing the horizontal diamond matching window and the vertical diamond matching window for motion estimation of the colored yarn contour center point, the direction features of color or shape change in the local region can be efficiently searched and identified, so as to accurately infer the main offset trend of the colored yarn image block and improve the structure tracking accuracy under dynamic texture change; the horizontal diamond matching window is used to preferentially expand the search in the horizontal direction, which is suitable for processing the contour center point with large displacement in the far point case, while the vertical diamond matching window is suitable for the near point region to enhance the local search ability in the vertical direction, forming an adaptive search strategy; in the whole search process, the candidate absolute difference sum (i.e. the total amount of pixel value difference) is used as a criterion to dynamically update the search center point, and combined with the difference analysis of the two adjacent points, the colored yarn contour motion estimation vector describing the motion trend is finally derived, improving the continuity and directionality of the contour tracking.

[0061] The colored yarn contour motion estimation vector in the colored yarn contour region will be further described in combination with specific embodiments.

[0062] Step one, arbitrarily set a two-dimensional image region containing a plurality of contour points to form a colored yarn contour region, and the positions of these points in the image can be represented as a coordinate set. For example, assuming that the coordinates of five contour center points (10, 15), (20, 25), (30, 35), (40, 45), and (50, 55) are selected; Step two, the horizontal diamond matching window is used to expand the search in the horizontal direction, assuming that the size of the window is 3x3, and the center of the matching window is the contour center point.

[0063] Step three, in the current matching window, the absolute difference sum of the contour center point and other points in the window is calculated, and the absolute difference of the pixel value is used as the standard, assuming that the pixel value of the contour center point (10, 15) in this region is 120; the adjacent pixel points are 130, 140, 150, and 160; for the first contour center point (10, 15), the pixel values near it are (9, 14): 130, (11, 14): 140, (9, 15): 150, (11, 15): 160, and the absolute difference sum of the contour point is calculated: Difference sum ; Step four, after calculating the candidate absolute difference sum of each contour center point, select the minimum difference sum corresponding to the contour center point. If the minimum difference sum meets the condition, proceed to the next step, if not, update the contour center point to the point where the minimum difference sum is located.

[0064] Step five, according to the minimum candidate absolute difference sum corresponding to the contour center point, judge its type: Far point: if the contour point is located in a far position, a horizontal diamond matching window is used for further calculation.

[0065] Near point: if the contour point is located in a near position, a vertical diamond matching window is used for local vertical search.

[0066] Suppose (10, 15) is a far point, then continue to use the horizontal diamond matching window for calculation, if (20, 25) is a near point, adjust to a vertical diamond matching window.

[0067] Step six, for each contour center point, calculate the candidate absolute difference sum of its two adjacent points, for point (10, 15), calculate the difference sum of its left and right adjacent points, and select the minimum difference sum, suppose the left side is (9, 15) and the right side is (11, 15), calculate the two difference sums and take the minimum value.

[0068] Step seven, judge the minimum value by the candidate absolute difference sum and update the center point, finally calculate the motion estimation vector, which represents the motion trend of the contour, suppose the finally calculated motion estimation vector at point (30, 35) is (5, 10), which means the motion direction of the contour at this position is horizontally offset by 5 units and vertically offset by 10 units.

[0069] S3, calculate the color difference score of each colored silk sample image based on the color difference offset direction, and compare the color difference score with the preset interval, and generate a colored silk color difference detection report according to the comparison result.

[0070] It should be noted that, based on the color difference offset direction, the color difference score of each colored yarn sample image is calculated. First, the color difference offset direction information is extracted in the colored yarn contour area, which is corresponding to the color difference vector of each pixel. The projection component of the color difference in the main direction is calculated by direction weighting or vector projection. Then, the average or maximum projection value of the whole image is calculated as the color difference score. Then, the obtained color difference score is compared with the preset color difference threshold interval. If the score is lower than the threshold, it is judged that the color difference is within the acceptable range, otherwise it is judged as exceeding the standard. According to the comparison result, a colored yarn color difference detection report containing color difference score value, color difference offset direction, judgment conclusion and possible color difference exceeding area mark and other information is generated, which is convenient for quality control and subsequent analysis.

[0071] According to another embodiment of the present application, as Figure 2 shown, an intelligent colored yarn color difference detection system based on image analysis is also provided, which comprises: Wherein, the spectral feature analysis module 1 is connected with the color difference prediction module 2, and the color difference prediction module 2 is connected with the detection report generation module 3. The spectral feature analysis module 1 is used for collecting colored yarn sample images, cutting the colored yarn sample images into several colored yarn image blocks, and identifying the spectral feature vector of the colored yarn image block by using the pre-constructed inversion gradient model. The color difference prediction module 2 is used for combining the spectral feature vector to generate a multi-dimensional feature matrix, introducing a colored yarn characteristic factor in the multi-dimensional feature matrix to obtain a multi-dimensional color difference prediction model, and identifying the color difference offset direction of the colored yarn image block based on the multi-dimensional color difference prediction model. The detection report generation module 3 is used for calculating the color difference score of each colored yarn sample image based on the color difference offset direction, comparing the color difference score with the preset interval, and generating a colored yarn color difference detection report according to the comparison result.

[0072] The above only describes the preferred embodiments of the present application and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for intelligent detection of color difference in colored silk based on image analysis, characterized in that, The method includes: Collect colored filament sample images, slice the colored filament sample images to generate several colored filament image blocks, divide the colored filament sample images into several colored filament image blocks, extract the colored filament contour regions in the colored filament image blocks, and calculate the reflectance changes of the colored filament contour regions. An inversion gradient model is constructed based on the reflectance variation of the colored filament contour region. The spatial gradient features and spectral derivative features of the colored filament image patch are then generated by inverting the gradient model. The spatial gradient features and spectral derivative features are fused after dimensionality reduction, and the spectral feature vectors of the colored filament image blocks are extracted from the fusion result. The spectral feature vectors are combined to generate a multidimensional feature matrix. The colored silk characteristic factor is introduced into the multidimensional feature matrix to obtain a multidimensional color difference prediction model. The color difference offset direction of the colored silk image block is identified based on the multidimensional color difference prediction model. The color difference score of each colored silk sample image is calculated based on the color difference offset direction, and the color difference score is compared with a preset range. A color difference detection report of colored silk is generated based on the comparison results.

2. The intelligent detection method for color difference of colored silk based on image analysis according to claim 1, characterized in that, The process of acquiring colored filament sample images, slicing the colored filament sample images to generate several colored filament image blocks, dividing the colored filament sample images into several colored filament image blocks, extracting the colored filament contour regions in the colored filament image blocks, and calculating the reflectance changes of the colored filament contour regions includes: The colored silk sample was acquired using a hyperspectral imaging device and a standard reflectance image was obtained by combining it with whiteboard calibration technology. The standard reflectance image was then subjected to radiometric correction and geometric correction to obtain the colored silk sample image. The colored filament sample image is divided into several colored filament image blocks. The colored filament contour regions in the colored filament image blocks are extracted by the Laplacian operator, and the reflectance changes of the colored filament contour regions are calculated by the Sobel operator.

3. The intelligent detection method for color difference of colored silk based on image analysis according to claim 2, characterized in that, The inversion gradient model is constructed based on the reflectance variation of the colored filament contour region. The spatial gradient features and spectral derivative features of the colored filament image patch are generated by inverting the gradient model, including: The basic parameters for spectral inversion are set based on the reflectance of the colored filament contour region, and the basic parameters are arbitrarily combined to obtain the inverted spectral parameter set. The inverted spectral parameter set is then subjected to forward modeling to generate forward modeling image samples. The Euclidean distance between corresponding positions in the forward modeling image sample and the original colored silk sample image is calculated, and the objective function is constructed based on the Euclidean distance. A surrogate model based on spatial-spectral features is constructed and trained according to the objective function. A modified multi-objective evolutionary algorithm is used, combined with the characteristics of colored filaments, to iteratively solve the surrogate model and output the optimal combination of inversion parameters. By applying the optimal inversion parameter combination to the colored filament image patch, the local predicted value of the colored filament image patch is obtained, and the local predicted value is transformed into the spatial gradient feature map and spectral derivative feature map of the colored filament image patch.

4. The intelligent detection method for color difference of colored silk based on image analysis according to claim 3, characterized in that, The method of using a modified multi-objective evolutionary algorithm, combined with the characteristics of colored silk, to iteratively solve the surrogate model and output the optimal combination of inversion parameters includes: The input parameters of the proxy model are used as individuals in the population, and the search range of the inversion parameters is set. Several Doppler maps are generated by traversing the search space of the inversion parameters. Doppler sampling indices are selected for each individual in the population, and the Doppler sampling indices are processed by Cartesian projection to obtain the fitness value of each individual in the population. Sort the fitness values ​​in descending order, select individuals within the preset range to be assigned to the high-fitness population, and assign the remaining individuals to the low-fitness population. The high-fitness population is iteratively updated to generate corresponding mutant individuals, and the low-fitness population is updated near the mutant individuals, and the fitness value of each individual in the population is updated. The individual with the highest fitness value is selected as the optimal individual in each iteration, and the fitness value is updated iteratively until the iteration convergence condition is met. The optimal solution of the surrogate model is then output as the optimal inversion parameter combination.

5. The intelligent detection method for color difference of colored silk based on image analysis according to claim 1, characterized in that, The step of combining spectral feature vectors to generate a multidimensional feature matrix, introducing a colored filament characteristic factor into the multidimensional feature matrix to obtain a multidimensional color difference prediction model, and identifying the color difference offset direction of the colored filament image patch based on the multidimensional color difference prediction model includes: The continuum removal algorithm is used to extract the preferred eigenvectors from the spectral eigenvectors, and the preferred eigenvectors are organized into a multi-dimensional feature matrix according to their spatial location. A multidimensional color difference prediction model is obtained by introducing a dynamic texture characteristic factor into the multidimensional feature matrix. The color difference vector output by the multidimensional color difference prediction model is combined with the Mahalanobis color difference to construct a composite color difference component. The composite color difference index is mapped to the color space using manifold learning techniques, and the color difference vector field is clustered using directional gradient histograms to identify the main offset direction of colored filament image blocks.

6. The intelligent detection method for color difference of colored silk based on image analysis according to claim 5, characterized in that, The process of mapping composite color difference components to a color space using manifold learning techniques and clustering the color difference vector field using histogram of oriented gradients to identify the main offset direction of colored silk image patches includes: The pixel values ​​of the original colored silk sample image are input into a predefined gamma function using mean quantization technology. The composite color difference components are separated by the output of the gamma function to obtain the three primary color components. The three primary color components are input into a predefined feature matrix to calculate the tristimulus values ​​of the colors, so as to realize the conversion of the composite color difference components to the color space; A color difference histogram is constructed within the colored filament outline region, and fuzziness is calculated using the Lagrange multiplier method. C The membership degree of mean clustering is multiplied by the color difference histogram to obtain the directional gradient histogram; The motion estimation vector of the colored filament contour in the colored filament contour region is analyzed, and based on the motion estimation vector, the main offset direction of the colored filament image block is identified in the clustered orientation gradient histogram.

7. The intelligent detection method for color difference of colored silk based on image analysis according to claim 6, characterized in that, The analysis of the colored filament contour region includes the following motion estimation vector: Select several contour center points of the colored silk contour region as the origin, construct a horizontal diamond matching window, and calculate the candidate absolute difference sum of the contour center points within the horizontal diamond matching window; The candidate absolute difference sum is judged. If the candidate absolute difference sum is the smallest, the next step is executed. Otherwise, the center point of the contour with the smallest candidate absolute difference sum is taken as the new origin, until the smallest candidate absolute difference sum is found. Calculate the candidate absolute difference sum for the two adjacent points on both sides of the center point of the contour, and select the minimum value of the candidate absolute difference sum as the motion estimation vector of the colored filament contour in the colored filament contour region.

8. The intelligent detection method for color difference of colored silk based on image analysis according to claim 7, characterized in that, The step of using the candidate absolute difference and the minimum contour center point as the new origin also includes: Determine the type of the candidate absolute difference and the minimum contour center point. If the minimum contour center point is a far point, continue using the horizontal diamond matching window; if it is a near point, adjust to the vertical diamond matching window.

9. The intelligent detection method for color difference of colored silk based on image analysis according to claim 6, characterized in that, The ambiguity C The expression for the membership degree of mean clustering is: ; In the formula, x i Indicates the first i A color difference vector of 1 pixel; v k Indicates the first k Cluster centers; u ij Indicates the first i Each pixel belongs to the cluster j Membership degree; m Indicates the fuzzy index; c Indicates the total number of cluster centers; v j Indicates the first j Cluster centers.

10. An intelligent detection system for color difference in colored silk based on image analysis, used to implement the intelligent detection method for color difference in colored silk based on image analysis as described in any one of claims 1-9, characterized in that, The system includes: The spectral feature analysis module is used to acquire colored filament sample images, slice the colored filament sample images to generate several colored filament image blocks, and use a pre-built inversion gradient model to identify the spectral feature vectors of the colored filament image blocks. The color difference prediction module is used to combine spectral feature vectors to generate a multidimensional feature matrix, introduce the colored silk characteristic factor into the multidimensional feature matrix to obtain a multidimensional color difference prediction model, and identify the color difference offset direction of the colored silk image block based on the multidimensional color difference prediction model. The test report generation module is used to calculate the color difference score of each colored silk sample image based on the color difference offset direction, compare the color difference score with a preset range, and generate a colored silk color difference test report based on the comparison results.

Citation Information

Patent Citations

  • Color yarn color difference detection method based on image processing

    CN115035111A

  • Intelligent identification method for colored yarns in dyeing process

    CN115082771A

  • Online detection system and method for printing and dyeing chromatic aberration and medium

    CN118758429A

  • Wood color difference online detection method based on spectral reflectivity reconstruction

    CN119379625A

  • Cloth color difference intelligent detection method based on improved vision algorithm

    CN119648814A

Cited By

  • Method and system for detecting surface defects of refrigeration valve seat core

    CN121213546A