Color correction method for fabric recognition equipment

Through the color correction method of cloth recognition equipment, the spectral data of the reference cloth and the brightness-independent color space are used to optimize the color difference calculation, solve the problem of color instability under the influence of light source, and improve the color correction accuracy and image quality of the textile industry. Clarity.

CN115442576BActive Publication Date: 2024-10-01SHENZHEN CHUANGJING DIGITAL TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211144671.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2024-10-01
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

Due to different light sources when shooting with existing fabric recognition equipment, the light intensity recorded by the RGB sensor is different. The calculated color value is greatly affected by the light source, and the general color correction method is not very applicable to the textile industry. Lab Color The constant value of brightness results in inapplicability when spatially calculating color differences.

Method used

By selecting the reference fabric, measuring its spectrum, calculating the reference chromaticity X, Y, and Z stimulus values, converting to linear RGB and converting to YCbCr, adding saturation constraints, using CbY and CrY to represent a brightness-independent color space, and optimizing the color difference calculation , perform color correction on the reference fabric in real time, and fix the AE target value to 0.196 to improve the accuracy of color correction.

Benefits of technology

It significantly reduces chromatic aberration, improves image clarity and color correction efficiency, enhances the accuracy of cloth image interpretation and computer-aided interpretation, and provides more reliable decision support for the textile industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442576B_ABST
    Figure CN115442576B_ABST
Patent Text Reader

Abstract

The invention discloses a color correction method for a fabric recognition device, which comprises the following steps: selecting a reference fabric and measuring a spectrum; calculating reference chromaticity X, Y, and Z stimulus values ​​of the reference fabric; converting the X, Y, and Z stimulus values ​​into linear RGB, and then converting the linear RGB into YCbCr; adding a saturation constraint item to the color with too high saturation in the reference fabric; and using Cb Y =Cb / Y and Cr Y =Cr / Y represents a color space that is independent of brightness; Cb is obtained by converting the X, Y, and Z stimulus values Yref and Cr Yref , use the color conversion of the real image to get Cb Ymeas and Cr Ymeas , calculate the color difference between the measured value and the color standard value, take the color difference as the target, optimize CCM, and perform color correction on the reference fabric in real time to minimize the color difference between Cb / Y, Cr / Y and the reference chromaticity value. Use a color space that is independent of brightness to calculate the color difference, reduce the color difference, and make the correction more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloth recognition, and in particular to a color correction method for cloth recognition equipment. Background Art

[0002] When taking pictures of fabrics, the light intensity recorded by the RGB sensor is the integral result of the light source spectrum, the object material reflectance spectrum, and the response function. When the light sources are different, the light intensities recorded by the RGB sensor are different due to the different light source spectra, and the color values ​​calculated based on the light intensities are also different. It can be seen that the color of the image is greatly affected by the light source. The influence of the light source can be removed by white balance processing and color correction processing, and the light source spectrum can be used to guide white balance processing and color correction processing. The general color correction method is to perform color correction on the X-Rite color card, but it is not very applicable to the textile industry. The fabric recognition equipment shoots pure color fabrics. Due to insufficient AE reference points, the AE target value is fixed. Therefore, the L value representing the brightness in Lab is always constant, so it is not applicable to calculate color difference using the Lab color space. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a color correction method suitable for a cloth recognition device.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] A color correction method for a cloth recognition device comprises the following steps:

[0006] Step 1: Select a reference fabric and use a desktop spectrometer to measure the spectrum of the reference fabric;

[0007] Step 2: Calculate the reference chromaticity X, Y of the reference fabric 1 , Z stimulus value, where X is the red primary color stimulus, Y 1 is the green primary color stimulus amount, Z is the blue primary color stimulus amount;

[0008] Step 3: X, Y 1 , Z stimulus value is converted to linear RGB, and then linear RGB is converted to YCbCr, where Y represents the brightness of the color, Cb and Cr represent the blue concentration offset and red concentration offset of the color respectively;

[0009] Step 4: Add a saturation constraint to the oversaturated colors in the identified reference fabric;

[0010] Step 5: Use Cb Y =Cb / Y and Cr Y =Cr / Y represents the color space that is independent of brightness, with Cb Y CrY The Euclidean distance of the coordinates indicates the color difference;

[0011] Step 6. According to the X and Y of the reference fabric 1 , Z stimulus value, converted to Cb Yref and Cr Yref As the color standard values ​​of blue density offset and red density offset, respectively, use the color of the real image to convert Cb Ymeas and Cr Ymeas The measured values ​​of blue concentration offset and red concentration offset are used respectively, and the color difference between the measured value and the color standard value is calculated. Taking the color difference as the target, CCM is optimized, and the color of the reference fabric is corrected in real time to minimize the color difference between Cb / Y, Cr / Y and the reference chromaticity value.

[0012] Furthermore, the color difference calculation formula in step 6 is:

[0013]

[0014] Furthermore, in step 3, X and Y 1 , Z stimulus value is converted to linear RGB, and linear RGB is converted to YCbCr under D65 light source. The formula involved is:

[0015]

[0016]

[0017] Furthermore, in step 6, CCM is optimized, wherein the color correction principle of CCM is:

[0018]

[0019] Where CCM satisfies the white balance constraint

[0020] Furthermore, the color correction of the reference fabric includes correcting the mapping relationship between pixels before and after the processing based on the collected reference fabric image data.

[0021] Furthermore, the method also includes fixing the AE target value of the cloth recognition device to 0.196.

[0022] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0023] By using this method, when the fabric recognition device shoots the reference fabric, the color difference is significantly reduced. This method is a color correction method for the fabric recognition device, has strong applicability to the textile industry, optimizes the color difference to a minimum, and by fixing the AE target value, uses a color space that is independent of brightness to calculate the color difference, thereby improving the image clarity and reducing the color difference, making the correction more accurate, and improving the efficiency of color correction. This not only helps to improve the judgment efficiency and accuracy of fabric image readers, but also helps to improve the accuracy of computer-aided interpretation such as fabric target detection, recognition, and change detection, providing reliable guarantee for relevant personnel to make correct decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of a color correction method for a cloth recognition device;

[0025] Figure 2 The spectral data of the reference fabric 24 color cards;

[0026] Figure 3 is the Gamma curve. DETAILED DESCRIPTION

[0027] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] It should be noted that the terms "include", "comprises" and "have" and any variations thereof in the specification and claims of the present invention and the above drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0030] like Figure 1 As shown, the present application provides a color correction method for a cloth recognition device, comprising the following steps:

[0031] Step 1: Select reference fabrics. The reference fabrics should be more than 24 pieces of pure color fabrics, covering common colors and with evenly distributed hues. Use a desktop spectrometer to measure the spectrum of the reference fabrics. The spectrum data of the 24 color cards are attached. Figure 2Specifically, color dimension adjustment is to adjust the values ​​of the three RGB components of the pixel points in the image separately. Therefore, in order to cover all the colors in the reference fabric, at least three reference colors are selected from the reference fabric as the basis for color dimension adjustment, such as red, green, and blue (the three primary colors of light), yellow, cyan, and magenta (the three primary colors of color), and red, yellow, blue, and green (the four primary colors of psychology);

[0032] Step 2: Calculate the reference chromaticity X, Y of the reference fabric 1 , Z stimulus value, where X is the red primary color stimulus, Y 1 is the green primary color stimulus amount, Z is the blue primary color stimulus amount;

[0033] Step 3: X, Y 1 , Z stimulus value is converted to linear RGB, and then linear RGB is converted to YCbCr, where Y represents the brightness of the color, Cb and Cr represent the blue concentration offset and red concentration offset of the color respectively. The higher the value of Cb and Cr, the more saturated the color of the pixel will be. The color correction solution based on matrix + 3D lookup table is:

[0034]

[0035] obj=ΔE+penalty

[0036] ΔE is used to represent color accuracy, and penalty is the oversaturation penalty term;

[0037] Step 4: Add a saturation constraint item to the oversaturated colors in the identified reference fabric, adjust the saturation, and generate a color-adjusted image;

[0038] Step 5: For textiles, we pay more attention to the contrast and chromaticity of the fabric during the shooting process, and the brightness is less important. Use Cb Y =Cb / Y and Cr Y =Cr / Y represents the color space that is independent of brightness, with Cb Y Cr Y The Euclidean distance of the coordinates indicates the color difference;

[0039] Step 6. According to the X and Y of the reference fabric 1 , Z stimulus value, converted to Cb Yref and Cr Yref As the color standard values ​​of blue density offset and red density offset, respectively, use the color of the real image to convert Cb Ymeas and Cr YmeasThe measured values ​​of the blue concentration offset and the red concentration offset are used as the measured values, respectively, and the color difference between the measured value and the color standard value is calculated. With the color difference as the target, the CCM is optimized, and the color correction of the reference fabric is performed in real time to minimize the color difference between Cb / Y, Cr / Y and the reference chromaticity value. The method also includes fixing the AE target value of the fabric recognition device to 0.196, and the fabric recognition device automatically fills in the light of the shooting environment.

[0040] Table 1 Using D65 as the light source, the X and Y coordinates of the reference fabric are calculated. 1 , Z standard values ​​of the three stimulus values

[0041] Color No. <![CDATA[X ref ]]> <![CDATA[Y ref ]]> <![CDATA[Z ref ]]> 1 0.378485 0.254695 0.071202 2 0.444722 0.34566 0.112041 3 0.183636 0.167988 0.056855 4 0.654757 0.714442 0.215394 5 0.268086 0.302114 0.209198 6 0.205622 0.245341 0.12379 7 0.188236 0.308084 0.147769 8 0.170878 0.278799 0.171518 9 0.22576 0.283078 0.290166 10 0.179934 0.275092 0.382714 11 0.129718 0.174444 0.304015 12 0.101785 0.112827 0.245209 13 0.112253 0.10804 0.322231 14 0.214282 0.21751 0.464812 15 0.070518 0.065013 0.173204 16 0.345203 0.333879 0.507123 17 0.132539 0.101328 0.240714 18 0.369173 0.33725 0.478147 19 0.083043 0.056568 0.093893 20 0.279243 0.158375 0.181499 21 0.257844 0.140124 0.049665 22 0.658381 0.598298 0.635906 23 0.215185 0.154019 0.143504 24 0.248029 0.143313 0.070073

[0042] Table 2 Based on reference fabric X, Y 1 , Cb obtained by converting the Z stimulus value Yref and Cr Yref value

[0043] Color No. <![CDATA[Cb Yref ]]> CrYref 1 -0.484419 1.12048 2 -0.460688 0.832755 3 -0.450476 0.52114 4 -0.469925 0.21096 5 -0.230535 0.0124653 6 -0.342544 -0.0222016 7 -0.344044 -0.545602 8 -0.250505 -0.596207 9 -0.00842054 -0.305613 10 0.273263 -0.803557 11 0.47389 -0.710241 12 0.67543 -0.491629 13 1.0861 -0.474779 14 0.614817 -0.296162 15 0.874795 -0.270571 16 0.233353 0.0167836 17 0.613583 0.23664 18 0.15909 0.166251 19 0.197722 0.699907 20 -0.0960039 1.22046 21 -0.452236 1.5079 22 -0.0429289 0.294496 23 -0.154937 0.810903 24 -0.390106 1.35577

[0044] The color difference calculation formula in step 6 is:

[0045]

[0046] Gamma uses the gamma curve specified by sRGB. Figure 3 , X, Y in step 3 1 , Z value is converted to linear RGB, and linear RGB is converted to YCbCr under D65 light source. The formula involved is:

[0047]

[0048]

[0049] The above matrix uses a 3x3 matrix to achieve saturation adjustment. When the saturation intensity of the image to be processed needs to be modified, the saturation adjustment matrix is ​​adjusted by modifying the value of the saturation constraint item to achieve the modification of the pixel value in the image to be processed. In step six, CCM is optimized, where the color correction principle of CCM is:

[0050]

[0051] Where CCM satisfies the white balance constraint

[0052] The color correction of the reference cloth includes correcting the mapping relationship between pixels before and after the processing according to the collected reference cloth image data.

[0053] It should be noted that the above-mentioned specific implementation methods are only preferred embodiments of the present invention and the technical principles used. Within the technical scope disclosed by the present invention, any changes, modifications, substitutions, combinations and simplifications made by any technician familiar with the technical field without departing from the spirit and principles of the present invention should be equivalent replacement methods and should be covered by the protection scope of the present invention.

Claims

1. A color correction method for a cloth recognition device, Features: The following steps are involved: Step 1: Select a reference fabric and use a desktop spectrometer to measure the spectrum of the reference fabric; Step 2: Calculate the reference chromaticity X, Y of the reference fabric 1 , Z stimulus value, where X is the red primary color stimulus, Y 1 is the green primary color stimulus amount, Z is the blue primary color stimulus amount; Step 3: X, Y 1 , Z stimulus value is converted to linear RGB, and then linear RGB is converted to YCbCr, where Y represents the brightness of the color, Cb and Cr represent the blue concentration offset and red concentration offset of the color respectively; Step 4: Add a saturation constraint to the oversaturated colors in the identified reference fabric; Step 5: Use Cb Y =Cb / Y and Cr Y =Cr / Y represents the color space that is independent of brightness, with Cb Y Cr Y The Euclidean distance of the coordinates indicates the color difference; Step 6. According to the X and Y of the reference fabric 1 , Z stimulus value, converted to Cb Yref and Cr Yref As the color standard values ​​of blue density offset and red density offset, respectively, use the color of the real image to convert Cb Ymeas and Cr Ymeas The measured values ​​of blue concentration offset and red concentration offset are used as the measured values, respectively. The color difference between the measured value and the color standard value is calculated. With the color difference as the target, CCM is optimized and the color correction of the reference fabric is performed in real time. Ymeas Cr Ymeas The color difference with the reference color value is minimal.

2. The color correction method of the cloth recognition device according to claim 1, Features: In step 3, X and Y 1 , Z stimulus value is converted to linear RGB, and linear RGB is converted to YCbCr under D65 light source. The formula involved is:

3. The color correction method of the cloth recognition device according to claim 2, Features: In step 6, CCM is optimized, where the principle of CCM color correction is: Where CCM satisfies the white balance constraint 4. The color correction method of the cloth recognition device according to claim 3, Features: The color correction of the reference cloth includes correcting the mapping relationship between pixels before and after the processing according to the collected reference cloth image data.

5. The color correction method of the cloth recognition device according to claim 4, Features: The method also includes fixing the AE target value of the cloth recognition device to 0.196.

Citation Information

Patent Citations

  • Color correction method of colored microscopic three-dimensional image pair

    CN102905140A

  • Brightness normalized color space

    CN109429050A

  • Fabric image color calibration algorithm based on spectral reflectivity reconstruction

    CN111047539A

  • Color calibration device for display device and the display device

    JP2002209230A