A visual detection method and system for abnormal pad-dyeing process of wool knitted fabrics

By chunking and significant analysis of the images after dyeing of wool knitted fabrics, combined with the light stability coefficient, the problem of chromatic aberration detection under the influence of light and texture in the prior art is solved, and the accuracy and effect of the detection are improved.

CN119559185BActive Publication Date: 2025-04-25ZHANGJIAGANG SHEPHERD INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510131939.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-04-25
Estimated Expiration
2045-02-06

AI Technical Summary

Technical Problem

When detecting the color difference of swim shift after rolling and dyeing of wool knitted fabrics, the prior art is susceptible to light and fabric texture, resulting in poor detection effect.

Method used

By obtaining the first and second image data sets of the dyed surface, the image blocking process is performed, the color difference between the chunked images is analyzed, the contrast scale is preset, the significance component value is obtained, and the color difference evaluation value is calculated by the light stability coefficient and significance evaluation value, and the abnormality degree of the chromatic difference is evaluated.

Benefits of technology

It improves the accuracy and effect of chromatic aberration detection of wool knitted fabrics, and reduces the impact of light and texture on the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559185B_ABST
    Figure CN119559185B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method and system for visually detecting abnormalities in a wool knitted fabric pad-dyeing process, comprising: obtaining a first image data set and a second image data set of the surface of the wool knitted fabric after pad-dyeing, obtaining the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale; obtaining a significance evaluation value of each block image in each wool knitted fabric image in the second image data set; obtaining a light stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set; and evaluating the degree of color difference abnormality of each wool knitted fabric image in the second image data set according to the light stability coefficient and the significance evaluation value. The present invention improves the effect of detecting migration color difference of wool knitted fabric during pad-dyeing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a method and system for visually detecting abnormalities in a pad-dyeing process of a wool knitted fabric. Background Art

[0002] The pad dyeing process of wool knitted fabrics is a dyeing method in which the fabric is briefly immersed in the dye solution and then rolled with a roller to squeeze the dye solution into the interstices of the fabric and remove excess dye solution so that the dye is evenly distributed on the fabric. Padding of wool knitted fabrics is usually carried out using a continuous pad dyeing machine, which is composed of multiple padders. The pad dyeing process of the pad dyeing machine mainly includes: padding with dye solution, drying, padding with color fixation solution, steaming, washing, soaping, washing, and drying. When the dye solution is unevenly distributed on the padding surface of the pad dyeing machine, it will cause uneven distribution of the dye solution on the fabric after pad dyeing, which will lead to migration when the fabric after pad dyeing is dried. Migration refers to the phenomenon that the dye migrates to the heated surface with the movement of water during the drying process after the fabric is dipped in the dye solution. The dye migrates to the heated surface along with the water. The number of dye molecules on the heated surface of the fabric will increase relatively, thus forming color difference. The migration of the fabric will directly affect the appearance and quality of the fabric, and also have a certain impact on the color fixation of the fabric. Therefore, it is necessary to detect the migration color difference of the fabric after dyeing.

[0003] The existing visual inspection of wool knitted fabric pad-dyeing process anomalies usually involves collecting images of each section of the fabric and analyzing and comparing the color values ​​of each pixel on the fabric. Since the captured fabric image is affected by light, the detection results obtained by this method are prone to misjudgment when the color difference is small. In addition, since the fabric has a certain texture, the results are easily fluctuated when comparing the differences at the pixel level, resulting in poor migration color difference detection effect. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a method and system for visually detecting abnormalities in the pad-dyeing process of wool knitted fabrics.

[0005] The present invention provides a method and system for visually detecting abnormalities in the pad-dyeing process of wool knitted fabrics using the following technical solutions:

[0006] One embodiment of the present invention provides a method for visually detecting abnormalities in a pad dyeing process of a wool knitted fabric, the method comprising the following steps:

[0007] A first image data set and a second image data set of a surface of a wool knitted fabric after padding are obtained, wherein a specific method for obtaining the second image data set is as follows: an image data set obtained by removing the first and last two images in the first image data set is used as the second image data set;

[0008] Each image in the first image data set is equally divided to obtain a plurality of block images of each wool knitted fabric image in the first image data set; and a color difference degree between the block images in each wool knitted fabric image in the first image data set is obtained according to a difference in channel values ​​between the block images in the wool knitted fabric image;

[0009] Preset a number of contrast scales for each block image; based on the color difference, obtain the significance component value of each block image in each wool knitted fabric image in the first image data set at each contrast scale;

[0010] According to the change of the number of block images within the final range, the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained; the significance component value is weighted averaged according to the reference weight to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set;

[0011] According to the channel value difference between each image in the second image data set and the block images at the corresponding positions of the adjacent images, the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set is obtained; according to the illumination stability coefficient and the significance evaluation value, the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained; according to the size of the color difference evaluation value, the color difference abnormality of each wool knitted fabric image in the second image data set is evaluated.

[0012] Furthermore, the method for obtaining the significance component value is:

[0013] Preset an initial range of each block image at each comparison scale; obtain an adjustment coefficient of each block image in each wool knitted fabric image in the first image data set at each comparison scale range according to fluctuations in channel values ​​of pixels in different channels within the initial range; adjust the initial range according to the adjustment coefficient to obtain the number of block images within a final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale; obtain a final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the number of block images within the final range and the color difference between the block images; obtain a significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the final range and the color difference between the block images;

[0014] Among them, according to the fluctuation of channel values ​​of pixels in different channels within the initial range, the adjustment coefficient of each block image in each wool knitted fabric image in the first image data set in each comparison scale range is obtained, and the specific steps included are as follows:

[0015] Any wool knitted fabric image in the first image data set is recorded as a first image;

[0016]

[0017] In the formula, is the number of Lab channels of the first image; The first image The block image is in All pixels in the initial range of the comparison scale are The channel value variance of channels; is the premnmx function, used for normalization; The first image The block image is in The adjustment factor for a comparison scale range.

[0018] Furthermore, the initial range is adjusted according to the adjustment coefficient to obtain the number of block images within the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale, including the following specific steps:

[0019]

[0020] In the formula, The first image The block image is in Adjustment coefficients for a range of comparison scales; The first image The block images are from The initial range of the comparison scale is extended to The number of block images of the initial range of comparison scales, The specific method for obtaining is as follows: The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The number of block images in the remaining range is recorded as ; is the rounding symbol; The first image The block image is in The number of image blocks within the initial range of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale.

[0021] Furthermore, the method of obtaining the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the number of block images in the final range and the color difference between the block images includes the following specific steps:

[0022] The first image The block image is in The number of block images in the initial range under the comparison scale is recorded as ;like , get the The block images and The color difference between each block image in the corresponding area is Select the area with the largest color difference within the corresponding area block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale; if , get the first image The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The remaining area after the expansion is taken as the area to be expanded, and the The color difference between each block image and each block image in the area to be expanded is selected in the area to be expanded. block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale.

[0023] Furthermore, the method of obtaining the significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the color difference between the final range and the block images includes the following specific steps:

[0024]

[0025] In the formula, The first image The block image is in The number of patch images in the final range at each comparison scale; The first image The block image and the The block image is in The final range under the comparison scale is The color difference between the block images, The block image and the The block images are not the same block image; The first image The block image is in The significant component value under the comparison scale.

[0026] Furthermore, the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained according to the change in the number of block images within the final range, and the specific steps include the following:

[0027]

[0028] In the formula, For the The ordinal value of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale; For all the block images in the first image, The mean number of block images in the final range under the comparison scale; The first image The block image is in The reference weight under the comparison scale.

[0029] Furthermore, the weighted average of the significance component values ​​according to the reference weights is performed to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set, and the specific steps include the following:

[0030] Any wool knitted fabric image in the second image data set is recorded as the second image; a reference weight of each block image in the second image at each comparison scale is obtained;

[0031]

[0032] In the formula, is the number of contrast scales for each patch image; The second image corresponds to the first image. The block image is in Reference weights for each comparison scale; The second image corresponds to the first image. The block image is in The significant component value under the comparison scale; The second image The saliency evaluation value of each block image.

[0033] Furthermore, the method of obtaining the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set according to the channel value difference between each image in the second image data set and the block images at the corresponding positions of the adjacent images comprises the following specific steps:

[0034] Move the second image forward vertically and downward The pixel area of ​​the row is used as the upper half of the second image, and the second image is moved vertically downward. The pixel area of ​​the first row is taken as the lower half of the second image; block image, if the The first block image is located in the upper half of the second image, and the image after the second image is used as the first adjacent image of the second image. The first block image is located in the lower half of the second image, and the image before the second image is used as the first adjacent image of the second image; The block image corresponding to the position of the block image is recorded as Block images;

[0035]

[0036] In the formula, is the number of Lab channels of the second image; The second image All pixels in the block image are Channel average of channels; is the first adjacent image of the second image. All pixels in the block image are Channel average of channels; To take the absolute value; is an exponential function with a natural constant as base; The second image The illumination stability coefficient corresponding to each block image.

[0037] Furthermore, the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained according to the illumination stability coefficient and the significance evaluation value, and the specific steps include the following:

[0038]

[0039] In the formula, The second image The saliency evaluation value of each block image; The second image The color difference evaluation value of each block image; is a linear normalization function.

[0040] The present invention also proposes a visual detection system for abnormalities in the padding process of wool knitted fabrics, comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the steps of the aforementioned method.

[0041] The beneficial effect of the technical solution of the present invention is that according to the present invention, when the fabric image is affected by the illumination and the fabric surface has the texture, the area with poor padding effect of the wool knitted fabric can be detected, thereby improving the effect of migration chromatic aberration detection. By dividing the surface image of the wool knitted fabric into blocks, the fluctuation influence of the pixel color value in the image and the influence of the texture when the illumination changes slightly are reduced. When determining the final range of each block image in the wool knitted fabric image at each comparison scale, the channel value fluctuation of the pixels in different channels within the initial range is analyzed to reflect the color change of the local area on the surface of the wool knitted fabric, and the adjustment coefficient is obtained. The initial range is adjusted according to the adjustment coefficient, and the final range of each block image in the wool knitted fabric image at each comparison scale is determined in combination with the color difference between the block images, thereby improving the scientificity, accuracy and objectivity of the final range of each comparison scale of the block image. When determining the significance evaluation value of each block image in the wool knitted fabric image, the reference weight of each comparison scale is analyzed, and the significance component value of each comparison scale is weighted averaged to reduce the error influence of a single comparison scale, thereby improving the accuracy, scientificity and objectivity of the significance evaluation value of the block image. Finally, by analyzing the illumination stability corresponding to the block image, that is, the illumination stability coefficient, and combining it with the significance evaluation value, the chromatic aberration image block in the wool knitted fabric image is determined, thereby improving the effect of swimming chromatic aberration detection on the surface of wool knitted fabric. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flowchart of a method for visually detecting abnormalities in the pad-dyeing process of wool knitted fabrics provided by one embodiment of the present invention;

[0044] Figure 2 A suspected color difference block image provided by an embodiment of the present invention;

[0045] Figure 3 An original image provided by an embodiment of the present invention;

[0046] Figure 4 A multi-scale image provided by an embodiment of the present invention;

[0047] Figure 5 A LAB display image of an original image provided by an embodiment of the present invention;

[0048] Figure 6 This is a color difference region segmentation image of an original image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method and system for visually detecting abnormalities in the pad dyeing process of wool knitted fabrics proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0051] The specific scheme of a method and system for visually detecting abnormalities in the pad-dyeing process of wool knitted fabrics provided by the present invention is described in detail below with reference to the accompanying drawings.

[0052] See also Figure 1 , which shows a flowchart of a method for visually detecting abnormalities in the pad dyeing process of wool knitted fabrics provided by an embodiment of the present invention, the method comprising the following steps:

[0053] Step S001: Acquire a first image data set and a second image data set of a surface of a wool knitted fabric after padding, wherein the second image data set is included in the first image data set.

[0054] It should be noted that the main purpose of this embodiment is to perform visual detection of the migration color difference of the surface of the wool knitted fabric after padding. Before starting the detection, the first image data set and the second image data set of the surface of the wool knitted fabric after padding are first collected.

[0055] Specifically, a first image data set and a second image data set of a surface of a wool knitted fabric after padding are obtained, wherein the second image data set is included in the first image data set, as follows:

[0056] The RGB image of the surface of the wool knitted fabric after padding is collected in real time by a high-resolution color camera on the wool knitted fabric padding production line. The wool knitted fabric on the production line is transported from top to bottom. The shooting interval in this embodiment is set to Second, is the preset width of the wool knitted fabric. To narrate, is the conveying speed of wool knitted fabrics on the production line. This embodiment does not limit the conveying speed, which can be adjusted according to the actual implementation situation. This embodiment sets the RGB image captured each time to have half of the knitted fabrics the same as the previous RGB image, so the shooting interval is set to seconds for subsequent analysis. The size of the RGB image captured each time in the actual knitted fabric is .

[0057] will be recently An image dataset consisting of all RGB images of the surface of wool knitted fabrics collected within hours in the order of shooting is recorded as the initial image dataset; all RGB images in the initial image dataset are converted into Lab images to obtain the wool knitted fabric image corresponding to each RGB image in the initial image dataset.

[0058] The image data set consisting of all wool knitted fabric images is recorded as the first image data set of the surface of the wool knitted fabric after padding, and the remaining image data set after removing the first and last two images in the first image data set is recorded as the second image data set of the surface of the wool knitted fabric after padding.

[0059] It should be noted that a stable and uniform light source is used to illuminate the fabric surface during image acquisition, and the fabric surface is illuminated as evenly as possible to avoid errors in subsequent detection results caused by shadows and uneven illumination. The acquired fabric surface image is converted to a Lab image because the Lab image is closer to the color logic perceived by the human eye. Therefore, converting the image to a Lab image can more accurately represent the color difference of the fabric in human eye perception. In addition, the image obtained in this embodiment needs to ensure that the vertical length of the image is an even multiple of pixels, and when the image is divided equally in the subsequent equal blocks, the image can be completely divided equally.

[0060] At this point, the first image data set and the second image data set of the surface of the wool knitted fabric after padding are obtained.

[0061] Step S002: equally divide each image in the first image data set to obtain a plurality of block images of each wool knitted fabric image in the first image data set; and obtain the color difference between the block images in each wool knitted fabric image in the first image data set according to the channel value difference between the block images in the wool knitted fabric image.

[0062] It should be noted that when the color difference is not obvious, detecting the migration color difference through a single image is easily affected by factors such as light, which makes it impossible to accurately judge whether the color difference occurs and determine the specific location. Therefore, this embodiment collects multiple continuous images of the fabric in real time to perform image significance analysis, combined with the position law of the migration color difference on the fabric, to more accurately detect the migration color difference.

[0063] It should be noted that this embodiment analyzes the regularity of image saliency of multiple images, so the saliency of each image is first obtained. When dyeing fabric, the colors of all positions on the fabric are ideally the same. When color difference occurs, the area with color difference will be darker or lighter than the standard color, and the area with color difference will be different from the area without color difference, that is, the saliency of the area with color difference is higher. In order to reduce the amount of calculation and avoid the influence of fabric texture, each image needs to be processed in blocks to analyze the color difference between image blocks.

[0064] Specifically, each image in the first image data set is equally divided to obtain a plurality of block images of each wool knitted fabric image in the first image data set, as follows:

[0065] Any wool knitted fabric image in the first image data set is recorded as the first image. The length of the first image is , the first image width is , the unit is pixel, the first image is obtained by dividing the image into equal proportions The size is The block image, is the preset block ratio. It is described that other values ​​can be set in the specific implementation. When the blocking ratio cannot make the first image blocked in equal proportion, that is, when the elements in the first image are blocked, it may exceed the boundary of the first image. At this time, this embodiment uses the quadratic linear interpolation method to interpolate and fill the data of the part of the first image that exceeds the boundary.

[0066] Furthermore, according to the channel value difference between the block images in the wool knitted fabric image, the color difference between the block images in each wool knitted fabric image in the first image data set is obtained, which is specifically as follows:

[0067]

[0068] In the formula, is the number of Lab channels of the first image, that is ; The first image All pixels in the block image are Channel average of channels; The first image All pixels in the block image are Channel average of channels; To take the absolute value; is a linear normalization function used for normalization processing; The first image The block image and the The color difference of the block images.

[0069] It should be noted that It indicates the difference in channel values ​​between block images. The greater the difference in channel values, the greater the color difference between block images. The greater the color difference, the uneven dyeing of the fabric and the poor uniformity of the dyeing effect. The mean of the channel values ​​of all pixels in the image block is used to avoid the influence of the Lab channel value difference caused by the fabric texture on the calculation.

[0070] At this point, the color difference between the block images in each wool knitted fabric image in the first image data set is obtained.

[0071] Step S003, presetting a number of comparison scales for each block image; obtaining a significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale based on the color difference.

[0072] Specifically, an initial range of each block image at each comparison scale is preset; an adjustment coefficient of each block image in each wool knitted fabric image in a first image data set at each comparison scale range is obtained according to fluctuations in channel values ​​of pixels in different channels within the initial range; the initial range is adjusted according to the adjustment coefficient to obtain the number of block images within a final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale; the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained according to the number of block images within the final range and the color difference between the block images; and the significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained according to the final range and the color difference between the block images.

[0073] It should be noted that the color difference indicates the degree of color difference in each image block on the fabric image. When analyzing the significance of each image block, it is necessary to compare and analyze the color difference between each image block and several other image blocks. When selecting the image blocks for comparison, the obtained significance results will be very different. Analyzing the significance of each image block under multiple comparison scales will give more accurate and reliable results. Therefore, it is necessary to determine the comparison scale range of each block image.

[0074] It should be noted that when determining the comparison scale of each image block, image blocks adjacent to each image block are usually selected. Then, for multiple scale comparisons, outer image blocks adjacent to the image blocks compared last time can be selected, and the comparison scale can be expanded layer by layer. For example, the first scale selects an area consisting of 3×3 image blocks centered on the current image block, the second scale selects 5×5, and so on.

[0075] It should be noted that in order to improve the efficiency and accuracy of comparison, for image blocks inside the area with uniform color, such as uniform color image blocks without color difference on the fabric or local image blocks in the color difference area with color difference, the comparison scale can be appropriately expanded to obtain image blocks that may have a large color difference with the image blocks currently analyzed for significance in a larger search range, so as to avoid missing the local part in the color difference area due to the comparison scale being too small; and for image blocks at the edge of the color difference, the comparison scale can be appropriately reduced to more accurately analyze the significance of the current image block in a smaller search range, so as to avoid the comparison scale being too large, which will cause the comparison scale to contain too many image blocks that are similar to the image block and are also in the color difference area, thereby weakening the significance of the image block.

[0076] Specifically, a number of comparison scales are preset for each block image. In this embodiment, the number of comparison scales preset for each block image is 5.

[0077] Furthermore, the initial range of each block image at each comparison scale is preset as follows:

[0078] For the first image block image; The area range composed of the block image and the surrounding adjacent layer of block images is the first The initial range of the first comparison scale of the block image; The initial range of the first contrast scale of the block image and the area range formed by the surrounding adjacent layer of block images are used as the first The initial range of the second comparison scale of the block image is obtained; and so on, until the first The initial range of contrast scales for all contrast scales of the block images.

[0079] It should be noted that in obtaining the When the initial ranges of the block images are different in contrast scale, if the initial range exceeds the boundary of the first image, only the region within the boundary of the first image is obtained as the initial range of the corresponding contrast scale.

[0080] Furthermore, according to the fluctuation of the channel values ​​of pixels in different channels within the initial range, the adjustment coefficient of each block image in each wool knitted fabric image in the first image data set under each comparison scale range is obtained, which is specifically as follows:

[0081]

[0082] In the formula, is the number of Lab channels of the first image; The first image The block image is in All pixels in the initial range of the comparison scale are The channel value variance of channels, integer, when At that time, The block image is in The initial range of the comparison scale is The area range of each block image itself; is the premnmx function, used for normalization, and the normalization range is ; The first image The block image is in The adjustment factor for a comparison scale range.

[0083] It should be noted that Indicates The first block image The richness of the color within the initial range of the contrast scale. When the color is richer, the corresponding image block is more likely to be an image block at the edge of the color difference. It is more necessary to analyze in a smaller scale range to more accurately screen the color difference image block. Therefore, the adjustment coefficient is determined by an inverse relationship. Conversely, the less colorful the image block is, the more likely it is an image block inside the area with consistent color. It is necessary to analyze in a larger scale range. In this embodiment, the adjustment coefficient is limited to , in order to better determine the comparison scale range.

[0084] Furthermore, the initial range is adjusted according to the adjustment coefficient to obtain the number of block images in the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale, as follows:

[0085]

[0086] In the formula, The first image The block image is in Adjustment coefficients for a range of comparison scales; The first image The block images are from The initial range of the comparison scale is extended to The number of block images of the initial range of comparison scales, The specific method for obtaining is as follows: The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The number of block images in the remaining range is recorded as ; is the rounding symbol; The first image The block image is in The number of image blocks within the initial range of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale.

[0087] It should be noted that in order to improve the efficiency and accuracy of the comparison, for the image blocks inside the area with uniform color, the comparison scale can be appropriately enlarged to obtain image blocks with large color differences from the image blocks currently being analyzed in a larger search range, so as to avoid the local areas in the color difference area being missed due to the comparison scale being too small; and for the image blocks at the edge of the color difference, the comparison scale can be appropriately reduced to more accurately analyze the significance of the current image block in a smaller search range, so as to avoid the comparison scale being too large, so as to include too many image blocks similar to the image block in the color difference area in the comparison scale, thereby weakening the significance of the image block. Therefore, the above method first analyzes the first image in the first image. The first block image All pixels in the initial range of the comparison scale are The channel value variance of the first image is used to determine the adjustment coefficient, and then the The first block image The number of patch images in the final range of the comparison scale.

[0088] Furthermore, according to the number of block images in the final range and the color difference between the block images, the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained, as follows:

[0089] The first image The block image is in The number of block images in the initial range under the comparison scale is recorded as ;like , get the The block images and The color difference between each block image in the corresponding area is Select the area with the largest color difference within the corresponding area block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale; if , get the first image The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The remaining area after the expansion is taken as the area to be expanded, and the The color difference between each block image and each block image in the area to be expanded is selected in the area to be expanded. block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale.

[0090] Specifically, according to the color difference between the final range and the block images, the significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained, as follows:

[0091]

[0092] In the formula, The first image The block image is in The number of patch images in the final range at each comparison scale; The first image The block image and the The block image is in The final range under the comparison scale is The color difference between the block images, The block image and the The block images are not the same block image; The first image The block image is in The significant component value under the comparison scale.

[0093] It should be noted that The block image and the The greater the color difference between the block images in the final range of the contrast scale, that is, The larger the The more likely the block image is to be significant, the All the block images within the final range of the comparison scale are compared to obtain the The first block image The significance component value of the comparison scale.

[0094] At this point, the significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained.

[0095] Step S004: according to the change in the number of block images within the final range, obtain the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale; and perform weighted averaging on the significance component values ​​according to the reference weight to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set.

[0096] It should be noted that the above analysis is only about the significance component value at a comparison scale. In order to obtain the significance evaluation value of the block image, it is necessary to obtain the significance component value of the first image. The saliency component values ​​of the block images at all contrast scales are obtained by weighted average of the saliency component values ​​at all contrast scales. The significance evaluation value of each block image. Therefore, it is necessary to analyze the weight of each contrast scale. Since the essence of color difference is caused by the uneven diffusion of dye in the fabric, and the gaps in wool knitted fabrics are large, the dye diffusion process is more uniform, so the color of the area where the color difference occurs changes gradually rather than suddenly. When comparing each image block with a color difference with the adjacent image block, the smaller the scale, the greater the proportion of image blocks with similar colors in all image blocks at the contrast scale, and the larger the scale, the smaller the proportion of image blocks with similar colors. Therefore, when taking the weighted average of the significance components at all contrast scales, a larger weight is given to a relatively larger contrast scale.

[0097] Specifically, according to the change in the number of block images within the final range, the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained, as follows:

[0098]

[0099] In the formula, For the The ordinal value of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale; For all the block images in the first image, The mean number of block images in the final range under the comparison scale; The first image The block image is in The reference weight under the comparison scale.

[0100] Specifically, the significance component values ​​are weighted averaged according to the reference weights to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set, as follows:

[0101] Any wool knitted fabric image in the second image data set is recorded as the second image; and a reference weight of each block image in the second image at each comparison scale is obtained.

[0102]

[0103] In the formula, is the number of contrast scales for each patch image; The second image corresponds to the first image. The block image is in Reference weights for each comparison scale; The second image corresponds to the first image. The block image is in The significant component value under the comparison scale; The second image The saliency evaluation value of each block image.

[0104] At this point, the significance evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained.

[0105] Step S005, according to the channel value difference between each image in the second image data set and the block images at the corresponding positions of the adjacent images, obtain the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set; according to the illumination stability coefficient and the significance evaluation value, obtain the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set; according to the size of the color difference evaluation value, evaluate the color difference abnormality of each wool knitted fabric image in the second image data set.

[0106] It should be noted that, since in the continuous images taken, except for the first image, half of each image and its adjacent previous image have the same fabric content, the degree to which the position of the image block in the image is affected by lighting can be determined by comparing the color difference of the corresponding image blocks of the same fabric in the two images.

[0107] Specifically, according to the channel value difference between each image in the second image data set and the block images at the corresponding positions of the adjacent images, the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set is obtained, as follows:

[0108] Move the second image forward vertically and downward The pixel area of ​​the row is used as the upper half of the second image, and the second image is moved vertically downward. The pixel area of ​​the first row is taken as the lower half of the second image; block image, if the The first block image is located in the upper half of the second image, and the image after the second image is used as the first adjacent image of the second image. The first block image is located in the lower half of the second image, and the image before the second image is used as the first adjacent image of the second image; The block image corresponding to the position of the block image is recorded as A block image.

[0109]

[0110] In the formula, is the number of Lab channels of the second image, that is ; The second image All pixels in the block image are Channel average of channels; is the first adjacent image of the second image. All pixels in the block image are Channel average of channels; To take the absolute value; is an exponential function with a natural constant as the base. The model is used to present the inverse proportional relationship and normalization processing. is the input of the model; The second image The illumination stability coefficient corresponding to each block image.

[0111] It should be noted that The smaller it is, the less the light changes will affect the same fabric position when photographed at different times. The more stable the illumination corresponding to each block image is, the greater the illumination stability coefficient is. The model is used to realize the inverse relationship and normalize it.

[0112] Furthermore, according to the illumination stability coefficient and the significance evaluation value, the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained, as follows:

[0113]

[0114] In the formula, The second image The illumination stability coefficient corresponding to each block image; The second image The saliency evaluation value of each block image; The second image The color difference evaluation value of each block image; is a linear normalization function used for normalization processing.

[0115] It should be noted that if the illumination is more stable, but the The larger the saliency evaluation value of the block image is, the The worse the roller dyeing effect of each block image is, the greater the possibility of color difference is, and the greater the color difference evaluation value is.

[0116] It should be noted that since the fabric is continuously dyed by the padder, the migration color difference caused by the uneven amount of liquid on the padder will be continuously manifested on the fabric at the position with more liquid on the surface of the padder. For example, color difference will appear at the same width position on a section of fabric, or color difference will appear at consecutive adjacent width positions on a section of fabric.

[0117] Specifically, according to the color difference evaluation value, the color difference abnormality of each wool knitted fabric image in the second image data set is evaluated as follows:

[0118] A color difference evaluation threshold is preset. In this embodiment, the color difference evaluation threshold is 0.7. The block images in the second image whose color difference evaluation values ​​are greater than the color difference evaluation threshold are regarded as suspected color difference block images. Figure 2 The figure shows a suspected color difference block image; any suspected color difference block image in the second image is recorded as a target suspected color difference block image; if the target suspected color difference block image has other suspected color difference block images connected to the target suspected color difference block image within the final range under the last contrast scale, the target suspected color difference block image is used as the color difference image block in the second image; otherwise, it is not used as the color difference image block in the second image; the number of color difference image blocks in the second image is obtained, and the ratio of the number of color difference image blocks in the second image to the number of all block images in the second image is used as the color difference abnormality of the second image.

[0119] It should be noted that, the more color difference image blocks there are in the second image, the worse the pad dyeing effect is, and the more color difference anomalies there are.

[0120] Through the above steps, a visual detection method for abnormalities in the pad-dyeing process of wool knitted fabrics is completed.

[0121] Please refer to the processing image of this embodiment. Figure 3-Figure 6 ,in, Figure 3 is the original image; Figure 4 For a multi-scale image, it should be noted that Figure 4 The scale of scale 1 image is 3, the scale of scale 2 image is 5, the scale of scale 3 image is 7, the scale of scale 4 image is 9 and the scale of scale 5 image is 11; Figure 5 This is the LAB display image of the original image. It should be noted that Figure 4 There are four images in , which are the original image, the L channel image of the original image, the A channel image of the original image and the B channel image of the original image; Figure 6 Segment the image into the color difference area of ​​the original image.

[0122] Another embodiment of the present invention provides a visual detection system for abnormal padding process of wool knitted fabrics, the system comprising a memory and a processor, and when the processor executes a computer program stored in the memory, the processor performs the following operations:

[0123] A first image data set and a second image data set of a surface of a wool knitted fabric after padding are obtained. The specific method for obtaining the second image data set is as follows: an image data set obtained by removing the first and last two images in the first image data set is used as the second image data set; each image in the first image data set is equally divided to obtain a plurality of block images of each wool knitted fabric image in the first image data set; according to the difference in channel values ​​between the block images in the wool knitted fabric image, the color difference between the block images in each wool knitted fabric image in the first image data set is obtained; a plurality of contrast scales are preset for each block image; based on the color difference, a significance component value of each block image in each wool knitted fabric image in the first image data set under each contrast scale is obtained; and according to the block values ​​within the final range, the significance component value of each block image in each wool knitted fabric image in the first image data set is obtained. According to the change of the number of images, the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained; the significance component value is weighted averaged according to the reference weight to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set; according to the difference in channel values ​​between each image in the second image data set and the block images of the adjacent images at corresponding positions, the corresponding illumination stability coefficient of each block image in each wool knitted fabric image in the second image data set is obtained; according to the illumination stability coefficient and the significance evaluation value, the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained; according to the size of the color difference evaluation value, the color difference abnormality of each wool knitted fabric image in the second image data set is evaluated.

[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A visual detection method for abnormal pad-dyeing process of wool knitted fabrics, characterized in that: The method comprises the following steps: A first image data set and a second image data set of a surface of a wool knitted fabric after padding are obtained, wherein a specific method for obtaining the second image data set is as follows: an image data set obtained by removing the first and last two images in the first image data set is used as the second image data set; Each image in the first image data set is equally divided to obtain a plurality of block images of each wool knitted fabric image in the first image data set; and a color difference degree between the block images in each wool knitted fabric image in the first image data set is obtained according to a difference in channel values ​​between the block images in the wool knitted fabric image; Preset a number of contrast scales for each block image; based on the color difference, obtain the significance component value of each block image in each wool knitted fabric image in the first image data set at each contrast scale; According to the change of the number of block images within the final range, the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale is obtained; the significance component value is weighted averaged according to the reference weight to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set; According to the channel value difference between each image in the second image data set and the block images at the corresponding positions of the adjacent images, the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set is obtained; according to the illumination stability coefficient and the significance evaluation value, the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set is obtained; according to the size of the color difference evaluation value, the color difference abnormality of each wool knitted fabric image in the second image data set is evaluated.

2. According to claim 1, a method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics, characterized in that: The method for obtaining the significance component value is: Preset an initial range of each block image at each comparison scale; obtain an adjustment coefficient of each block image in each wool knitted fabric image in the first image data set at each comparison scale range according to fluctuations in channel values ​​of pixels in different channels within the initial range; adjust the initial range according to the adjustment coefficient to obtain the number of block images within a final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale; obtain a final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the number of block images within the final range and the color difference between the block images; obtain a significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the final range and the color difference between the block images; Among them, according to the fluctuation of channel values ​​of pixels in different channels within the initial range, the adjustment coefficient of each block image in each wool knitted fabric image in the first image data set in each comparison scale range is obtained, and the specific steps included are as follows: Any wool knitted fabric image in the first image data set is recorded as a first image; In the formula, is the number of Lab channels of the first image; The first image The block image is in All pixels in the initial range of the comparison scale are The channel value variance of channels; It is the premnmx function; The first image The block image is in The adjustment factor for a comparison scale range.

3. According to claim 2, a method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics, characterized in that: The initial range is adjusted according to the adjustment coefficient to obtain the number of block images in the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale, including the following specific steps: In the formula, The first image The block image is in The adjustment coefficient for the comparison scale range; The first image The block images are from The initial range of the comparison scale is extended to The number of block images of the initial range of comparison scales, The specific method for obtaining is as follows: The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The number of block images in the remaining range is recorded as ; is the rounding symbol; The first image The block image is in The number of image blocks within the initial range of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale.

4. A method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics according to claim 3, characterized in that: The method of obtaining the final range of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the number of block images in the final range and the color difference between the block images includes the following specific steps: The first image The block image is in The number of block images in the initial range under the comparison scale is recorded as ;like , get the The block images and The color difference between each block image in the corresponding area is Select the area with the largest color difference within the corresponding area block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale; if , get the first image The block image is in The initial range under the comparison scale is denoted as ; Get the first image in the The block image is in The initial range under the comparison scale is denoted as ;Will The remaining area after the expansion is taken as the area to be expanded, and the The color difference between each block image and each block image in the area to be expanded is selected in the area to be expanded. block images, the The block images and The block image is in The area range formed by the initial range under the contrast scale is used as the first image in the first image. The block image is in The final range under the comparison scale.

5. According to claim 2, a method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics, characterized in that: The specific steps of obtaining the significance component value of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the color difference between the final range and the block images are as follows: In the formula, The first image The block image is in The number of patch images in the final range at each comparison scale; The first image The block image and the The block image is in The final range under the comparison scale is The color difference between the block images, The block image and the The block images are not the same block images; The first image The block image is in The significant component value under the comparison scale.

6. A method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics according to claim 2, characterized in that: The specific steps of obtaining the reference weight of each block image in each wool knitted fabric image in the first image data set at each comparison scale according to the change in the number of block images within the final range are as follows: In the formula, For the The ordinal value of the comparison scale; The first image The block image is in The number of patch images in the final range at each comparison scale; For all the block images in the first image, The mean number of block images in the final range under the comparison scale; The first image The block image is in The reference weight under the comparison scale.

7. A method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics according to claim 6, characterized in that: The weighted average of the significance component values ​​according to the reference weights is performed to obtain the significance evaluation value of each block image in each wool knitted fabric image in the second image data set, and the specific steps include the following: Any wool knitted fabric image in the second image data set is recorded as the second image; a reference weight of each block image in the second image at each comparison scale is obtained; In the formula, is the number of contrast scales for each patch image; The second image corresponds to the first image. The block image is in Reference weights for each comparison scale; The second image corresponds to the first image. The block image is in The significant component value under the comparison scale; The second image The saliency evaluation value of each block image.

8. A method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics according to claim 7, characterized in that: The step of obtaining the illumination stability coefficient corresponding to each block image in each wool knitted fabric image in the second image data set according to the channel value difference between each image in the second image data set and the block images of the adjacent image at the corresponding position comprises the following specific steps: Move the second image forward vertically and downward The pixel area of ​​the row is used as the upper half of the second image, and the second image is moved vertically downward. The pixel area of ​​the first row is taken as the lower half of the second image; block image, if the The first block image is located in the upper half of the second image, and the image after the second image is used as the first adjacent image of the second image. The block image is located in the lower half of the second image, and an image before the second image is used as the first adjacent image of the second image; The first adjacent image of the second image is The block image corresponding to the position of the block image is recorded as Block images; In the formula, is the number of Lab channels of the second image; The second image All pixels in the block image are Channel average of channels; is the first adjacent image of the second image. All pixels in the block image are Channel average of channels; To take the absolute value; is an exponential function with a natural constant as base; The second image The illumination stability coefficient corresponding to each block image.

9. A method for visually detecting abnormalities in pad dyeing process of wool knitted fabrics according to claim 8, characterized in that: The method of obtaining the color difference evaluation value of each block image in each wool knitted fabric image in the second image data set according to the illumination stability coefficient and the significance evaluation value comprises the following specific steps: In the formula, The second image The saliency evaluation value of each block image; The second image The color difference evaluation value of each block image; is a linear normalization function.

10. A visual detection system for abnormal pad-dyeing process of wool knitted fabrics, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of a method for visually detecting abnormalities in the pad dyeing process of wool knitted fabrics as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Textile defect detection method

    CN116309324A

  • Fabric defect detection method based on deep convolutional neural network and visual saliency

    WO2019104767A1