Surface color detection method, device, equipment and medium in anodic oxidation dyeing

By calculating the color difference index under multiple light sources, the problem of insufficient detection accuracy of single light source in anodizing dyeing was solved, and color matching detection under multiple light sources was realized, thus improving the detection accuracy.

CN123175437APending Publication Date: 2026-11-27LUXCASE PRECISION TECH (YANCHENG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611297033.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In anodizing dyeing, color difference detection based on a single light source has poor accuracy and cannot effectively reflect the color matching of metals under different light sources.

Method used

By determining the first and second vectors corresponding to multiple light sources, a double-layer loop is performed to calculate the color inconstancy index, color inconstancy index, and metamerism index. Based on these indices, the surface color detection result of the metal is determined.

Benefits of technology

It improves the accuracy of metal surface color detection in anodizing dyeing and can reflect the matching of metal colors under various light sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123175437A_ABST
    Figure CN123175437A_ABST
Patent Text Reader

Abstract

The application discloses a surface color detection method, device, equipment and medium in anodic oxidation dyeing. The method comprises the following steps: determining a first vector corresponding to each light source and a second vector corresponding to each light source, the first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source; taking each light source in the multiple light sources as the first light source in turn, and taking each light source in the multiple light sources as the second light source except the first light source for each first light source; determining a first index, a second index and a third index based on the first vector and the second vector corresponding to the first light source, and the first vector and the second vector corresponding to the second light source; and determining the surface color detection result of the first metal based on the multiple first indexes, the multiple second indexes and the multiple third indexes. The scheme effectively improves the accuracy of surface color detection of the first metal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anodizing dyeing technology, and in particular to a method, apparatus, equipment and medium for detecting surface color in anodizing dyeing. Background Technology

[0002] In the production process of anodizing dyeing, it is usually necessary to detect the surface color of the metal to be tested after dyeing to determine whether the surface color difference (e.g., ΔE94 or ΔE2000) between the tested metal and the target metal is less than a preset color difference. For metals to be tested, such as mobile phone frames, laptop shells, and camera decorative parts, color verification is further required under multiple light sources, including store display lights, photography studio lights, office fluorescent lights, and warm white household lights. However, color difference only reflects the difference between two colors under a single light source. When the surface color difference between the tested metal and the target metal meets the conditions under one light source, it does not mean that the surface color difference between the tested metal and the target metal under another light source will still meet the conditions. This makes the accuracy of surface color detection of the tested metal based on color difference under a single light source poor. Summary of the Invention

[0003] This invention provides a method, apparatus, equipment, and medium for surface color detection in anodizing dyeing, to solve the problem of poor accuracy in detecting the surface color of dyed metal based on color difference under a single light source in anodizing dyeing.

[0004] According to one aspect of the present invention, a method for detecting surface color in anodizing dyeing is provided, the method comprising: The first vector corresponding to multiple light sources and the second vector corresponding to multiple light sources are determined respectively. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal. Each of the multiple light sources is sequentially designated as a first light source, and for each first light source, each of the multiple light sources other than the first light source is sequentially designated as a second light source; Based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source, a first index, a second index, and a third index are determined. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source. The surface color detection result of the first metal is determined based on multiple first indicators, multiple second indicators, and multiple third indicators.

[0005] According to another aspect of the present invention, a surface color detection device for anodizing dyeing is provided, the device comprising: The first determining module is used to determine the first vector corresponding to multiple light sources and the second vector corresponding to multiple light sources respectively. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal. The second determining module is used to sequentially select each of the multiple light sources as a first light source, and for each first light source, sequentially select each of the multiple light sources other than the first light source as a second light source. The third determining module is used to determine a first index, a second index, and a third index based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source. The fourth determining module is used to determine the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators.

[0006] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the surface color detection method in anodizing dyeing according to any embodiment of the present invention.

[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the surface color detection method in anodizing dyeing according to any embodiment of the present invention.

[0008] The technical solution of this invention determines a first vector and a second vector corresponding to each of multiple light sources. The first vector corresponding to a light source is formed by the tristimulus values ​​of a first spectrum under the light source, and the second vector corresponding to a light source is formed by the tristimulus values ​​of a second spectrum under the light source. Each light source is sequentially used as a first light source, and for each first light source, each light source other than the first light source is sequentially used as a second light source, thus achieving a double-layer loop traversal of multiple light sources to obtain multiple ordered light source combinations. Based on the first and second vectors corresponding to the first and second light sources, and the first and second vectors corresponding to the second light sources, a first index, a second index, and a third index are determined. This achieves the calculation of the first index, the second index, and the third index based on the multiple tristimulus values ​​corresponding to the ordered light source combinations, so that the first index... The first index represents the degree of change in the perceived color corresponding to the first spectrum when switching from the first light source to the second light source; the second index represents the degree of change in the perceived color corresponding to the second spectrum when switching from the first light source to the second light source; and the third index represents the degree of change in the deviation between the perceived color corresponding to the first spectrum and the perceived color corresponding to the second spectrum when switching from the first light source to the second light source. Based on multiple first, second, and third indices, the surface color detection result of the first metal is determined. This achieves the determination of the surface color matching result between the first metal and the second metal when switching from the first light source to the second light source using the first, second, and third indices. The surface color detection result of the first metal is reflected based on multiple surface color matching results between the first metal and the second metal, effectively improving the accuracy of surface color detection of the first metal.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a surface color detection method in anodizing dyeing provided by an embodiment of the present invention; Figure 2 A flowchart of another surface color detection method in anodizing dyeing provided by an embodiment of the present invention; Figure 3This is a schematic diagram of a surface color detection device in anodizing dyeing provided by an embodiment of the present invention; Figure 4 This is a schematic diagram of an electronic device for implementing a surface color detection method in anodizing dyeing, as provided in an embodiment of the present invention. Detailed Implementation

[0012] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0014] Figure 1 This is a flowchart illustrating a surface color detection method in anodizing dyeing according to an embodiment of the present invention. This embodiment is applicable to the detection of surface color in dyed metal during anodizing dyeing. The method can be executed by a surface color detection device in anodizing dyeing, which can be implemented in hardware and / or software and configured in an electronic device that implements the surface color detection method in anodizing dyeing. Figure 1 As shown, the surface color detection method in this anodizing dyeing process includes: S101. Determine the first vector corresponding to each of the multiple light sources and the second vector corresponding to each of the multiple light sources. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal.

[0015] In anodizing dyeing, an oxide film is generated by anodizing a metal workpiece, which is then immersed in a dyeing bath to allow dye to penetrate the microporous structure of the oxide film. Finally, the color is fixed by sealing the pores. Reflectance spectrum refers to a curve showing how reflectance changes with the wavelength of incident light within a certain wavelength range. The horizontal axis of the reflectance spectrum represents wavelength, and the vertical axis represents reflectance.

[0016] Multiple light sources can be pre-determined based on the surface color detection requirements. These light sources can include at least: D65 daylight, Studio-LED, Retail-LED, F2 cool white fluorescent, and A incandescent lamps. Tristimulus values ​​can be used to characterize the color visual response of the reflectance spectrum under these light sources. These tristimulus values ​​can be determined based on the spectral power distribution of the light source, the reflectance spectrum, and the spectral tristimulus function. The tristimulus values ​​include CIE-X, CIE-Y, and CIE-Z. The first spectrum can be obtained from the surface of a first metal. The second spectrum can be obtained from the surface of a second metal.

[0017] S102. Sequentially, each of the multiple light sources is taken as the first light source, and for each first light source, each of the multiple light sources other than the first light source is taken as the second light source.

[0018] Specifically, a two-layer cyclic traversal is formed based on multiple light sources. The outer layer selects a first light source from multiple light sources, and the inner layer selects a second light source from the remaining light sources besides the first light source, so that the first light source and the second light source are different, forming multiple ordered combinations of light sources. For example, when the first light source is a D65 daylight source, the second light source is, in sequence, a Studio-LED light source, a Retail-LED light source, an F2 cool white fluorescent light source, and an A incandescent light source; when the first light source is a Studio-LED light source, the second light source is, in sequence, a D65 daylight source, a Retail-LED light source, an F2 cool white fluorescent light source, and an A incandescent light source.

[0019] S103. Based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source, determine the first index, the second index and the third index. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source.

[0020] The first indicator characterizes the degree of change in the perceived color corresponding to the first spectrum when switching from the first light source to the second light source. The second indicator characterizes the degree of change in the perceived color corresponding to the second spectrum when switching from the first light source to the second light source. The third indicator characterizes the degree of change in the deviation between the perceived color corresponding to the first spectrum and the perceived color corresponding to the second spectrum when switching from the first light source to the second light source.

[0021] Specifically, for each ordered combination of light sources, a first index can be calculated based on the first vector corresponding to the first light source and the first vector corresponding to the second light source; a second index can be calculated based on the second vector corresponding to the first light source and the second vector corresponding to the second light source; and a third index can be calculated based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source.

[0022] As an optional implementation of this invention, determining the first index and the second index based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source includes the following steps A1-A3: Step A1: Determine the color adaptation matrix corresponding to the switch from the first light source to the second light source.

[0023] Step A2: Transform the first vector corresponding to the first light source based on the color adaptation matrix to obtain the third vector, and determine the first index based on the third vector and the first vector corresponding to the second light source.

[0024] Step A3: Transform the second vector corresponding to the first light source based on the color adaptation matrix to obtain the fourth vector, and determine the second index based on the fourth vector and the second vector corresponding to the second light source.

[0025] Specifically, the color adaptation matrix can be used to convert the tristimulus values ​​obtained under the first light source into color-adapted tristimulus values ​​under the second light source. The color adaptation matrix is ​​a 3×3 linear transformation matrix. Furthermore, based on the color adaptation matrix, the tristimulus values ​​in the first vector corresponding to the first light source can be transformed, thus forming a third vector from the transformed tristimulus values. Based on the tristimulus values ​​in the third vector and the tristimulus values ​​in the first vector corresponding to the second light source, the first index can be calculated.

[0026] Similarly, based on the color adaptation matrix, the tristimulus values ​​in the second vector corresponding to the first light source can be transformed, thus forming a fourth vector from the transformed tristimulus values. Based on the tristimulus values ​​in the fourth vector and the tristimulus values ​​in the second vector corresponding to the second light source, the second index can be calculated.

[0027] As an optional implementation of the present invention, determining a first index based on a third vector and a first vector corresponding to a second light source includes: determining a first color vector and a second color vector, wherein the first color vector is obtained by converting the third vector to a preset color space, and the second color vector is obtained by converting the first vector corresponding to the second light source to a preset color space; and determining a first index based on the difference between the first color vector and the second color vector.

[0028] Specifically, the preset color space can refer to a pre-defined color coordinate system. For example, the preset color space could be CIELAB. Then, using the white point vector of the second light source as a reference, the tristimulus values ​​in the third vector can be converted to the preset color space, thus forming a first color vector from the multiple color components obtained after the conversion. Similarly, using the white point vector of the second light source as a reference, the tristimulus values ​​in the first vector corresponding to the second light source can be converted to the preset color space, thus forming a second color vector from the multiple color components obtained after the conversion. Finally, the color difference determined based on the first and second color vectors can be used as the first index. The process of determining the second index can be similar to the process of determining the first index.

[0029] For example, the first indicator can be calculated in the following way: ; ; in, Indicates the primary indicator; Indicates the first spectrum; Indicates the first light source; Indicates a second light source; This represents the first vector corresponding to the first light source; This represents the first vector corresponding to the second light source; This represents a transformation based on the color adaptation matrix; Represents the third vector; This represents the CIELAB transformation based on the white point vector of the second light source; This indicates the CIE94 color difference calculation.

[0030] For example, the second indicator can be calculated in the following way: ; ; in, Indicates the second indicator; Indicates the second spectrum; This represents the second vector corresponding to the first light source; This represents the second vector corresponding to the second light source; This represents the fourth vector.

[0031] As an optional implementation of this invention, determining a third index based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source includes the following steps B1-B2: Step B1: Determine the fifth vector. The fifth vector is formed by the ratio of the components of the second vector corresponding to the first light source and the first vector corresponding to the first light source in the same dimension.

[0032] Step B2: Determine the sixth vector, and determine the third index based on the sixth vector and the second vector corresponding to the second light source. The sixth vector is the Hadamard product of the fifth vector and the first vector corresponding to the second light source.

[0033] Specifically, using the tristimulus values ​​in the first vector corresponding to the first light source as a benchmark, the second vector corresponding to the first light source is divided element-wise with the first vector corresponding to the first light source along the same dimension, yielding the fifth vector. Then, the fifth vector is multiplied element-wise with the first vector corresponding to the second light source, yielding the sixth vector. Finally, based on the tristimulus values ​​in the sixth vector and the second vector corresponding to the second light source, the third index can be calculated.

[0034] As an optional implementation of this invention, determining a third index based on a sixth vector and a second vector corresponding to a second light source includes: determining a third color vector and a fourth color vector, wherein the third color vector is obtained by converting the sixth vector to a preset color space, and the fourth color vector is obtained by converting the second vector corresponding to the second light source to a preset color space; and determining a third index based on the difference between the third color vector and the fourth color vector.

[0035] Specifically, using the white point vector of the second light source as a reference, the tristimulus values ​​in the sixth vector can be converted to a preset color space, thus forming a third color vector from the multiple color components obtained after the conversion. Similarly, using the white point vector of the second light source as a reference, the tristimulus values ​​in the second vector corresponding to the second light source can be converted to a preset color space, thus forming a fourth color vector from the multiple color components obtained after the conversion. Finally, the color difference determined based on the third and fourth color vectors can be used as the third index.

[0036] For example, the third indicator can be calculated in the following way: ; ; in, Indicates the third indicator; Represents the fifth vector; It represents the Hadamardi (or Hadama) stack; This indicates that element-wise division is performed along the same dimension.

[0037] S104. Determine the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators.

[0038] Specifically, for each ordered light source combination, the deviation between the first and second indicators is compared with a preset deviation threshold to obtain a first comparison result, and the third indicator is compared with a preset indicator threshold to obtain a second comparison result. Furthermore, the first and second comparison results can characterize the surface color matching result between the first and second metals when switching from the first light source to the second light source. Finally, based on the surface color matching result between the first and second metals corresponding to each ordered light source combination, the surface color detection result of the first metal can be reflected, improving the accuracy of surface color detection of the first metal.

[0039] The technical solution of this invention determines a first vector and a second vector corresponding to each of multiple light sources. The first vector corresponding to a light source is formed by the tristimulus values ​​of a first spectrum under the light source, and the second vector corresponding to a light source is formed by the tristimulus values ​​of a second spectrum under the light source. Each light source is sequentially used as a first light source, and for each first light source, each light source other than the first light source is sequentially used as a second light source, thus achieving a double-layer loop traversal of multiple light sources to obtain multiple ordered light source combinations. Based on the first and second vectors corresponding to the first and second light sources, and the first and second vectors corresponding to the second light sources, a first index, a second index, and a third index are determined. This achieves the calculation of the first index, the second index, and the third index based on the multiple tristimulus values ​​corresponding to the ordered light source combinations, so that the first index... The first index represents the degree of change in the perceived color corresponding to the first spectrum when switching from the first light source to the second light source; the second index represents the degree of change in the perceived color corresponding to the second spectrum when switching from the first light source to the second light source; and the third index represents the degree of change in the deviation between the perceived color corresponding to the first spectrum and the perceived color corresponding to the second spectrum when switching from the first light source to the second light source. Based on multiple first, second, and third indices, the surface color detection result of the first metal is determined. This achieves the determination of the surface color matching result between the first metal and the second metal when switching from the first light source to the second light source using the first, second, and third indices. The surface color detection result of the first metal is reflected based on multiple surface color matching results between the first metal and the second metal, effectively improving the accuracy of surface color detection of the first metal.

[0040] Figure 2This is a flowchart of another surface color detection method in anodizing dyeing provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of determining the first vector and the second vector corresponding to multiple light sources in the aforementioned embodiments, based on the technical solutions of the above embodiments. Solutions not described in detail in this embodiment are found in the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the surface color detection method in this anodizing dyeing process includes: S201. Determine a first reflectance vector based on a first spectrum and a second reflectance vector based on a second spectrum. The first reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the first spectrum, and the second reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the second spectrum.

[0041] Specifically, multiple wavelengths can be obtained by sampling within a preset wavelength range based on a preset sampling interval. For example, sampling at 10nm intervals within the preset wavelength range of 400nm to 700nm yields 31 wavelengths. Furthermore, the reflectance corresponding to each wavelength in the first spectrum can be used to form a first reflectance vector, and the reflectance corresponding to each wavelength in the second spectrum can be used to form a second reflectance vector.

[0042] S202. For each of the multiple light sources, determine the first vector corresponding to the light source based on the first reflectivity vector and the tristimulus value weight matrix corresponding to the light source, and determine the second vector corresponding to the light source based on the second reflectivity vector and the tristimulus value weight matrix corresponding to the light source.

[0043] The tristimulus weight matrix corresponding to the light source can be formed by multiple tristimulus weight vectors corresponding to different wavelengths. The first vector corresponding to the light source can be calculated based on the tristimulus weight matrix and the first reflectivity vector; the second vector corresponding to the light source can also be calculated based on the tristimulus weight matrix and the first reflectivity vector.

[0044] For example, the first vector and the second vector corresponding to the first light source can be calculated in the following way: ; ; in, This represents the tristimulus weight matrix corresponding to the first light source; Represents the first reflectivity vector; This represents the second reflectivity vector.

[0045] For example, for the tristimulus value weight matrix corresponding to the light source, based on the three dimensions corresponding to the tristimulus values, the white point vector corresponding to the light source can be formed by summing the tristimulus value weights corresponding to the same dimensions in the tristimulus value weight matrix.

[0046] S203. Sequentially, each of the multiple light sources is taken as the first light source, and for each first light source, each of the multiple light sources other than the first light source is taken as the second light source.

[0047] S204. Based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source, determine the first index, the second index, and the third index. The first index is the color inconsistency index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconsistency index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source.

[0048] S205. Determine the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators.

[0049] As an optional implementation of the present invention, determining the surface color detection result of the first metal based on multiple first indicators, multiple second indicators, and multiple third indicators includes: determining multiple first deviations based on multiple first indicators and multiple second indicators, wherein the first deviation is the deviation between the first indicator and the second indicator corresponding to the same first light source and second light source; and determining the surface color detection result of the first metal based on the largest third indicator among multiple third indicators and the largest first deviation among multiple first deviations.

[0050] Specifically, the maximum first deviation can be obtained by sorting multiple first deviations in descending order, and the maximum third indicator can be obtained by sorting multiple third indicators in descending order. Furthermore, based on the comparison results of the maximum first deviation with a preset deviation threshold and the comparison results of the maximum third indicator with a budgeted indicator threshold, the surface color detection result of the first metal can be characterized.

[0051] For example, based on multiple ordered light source combinations, the first, second, and third indicators corresponding to each ordered light source combination can be visualized. Furthermore, based on the matching results of each third indicator with multiple preset indicator ranges, each third indicator can be labeled, and different third indicators within the same preset indicator range can use the same label.

[0052] The technical solution of this invention determines a first reflectance vector based on a first spectrum and a second reflectance vector based on a second spectrum. The first reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the first spectrum, and the second reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the second spectrum. For each of the multiple light sources, a first vector corresponding to the light source is determined based on the first reflectance vector and the tristimulus value weight matrix corresponding to the light source, and a second vector corresponding to the light source is determined based on the second reflectance vector and the tristimulus value weight matrix corresponding to the light source. This achieves the calculation of the first vector and the second vector corresponding to the light source based on the first reflectance vector, the second reflectance vector, and the tristimulus value weight matrix corresponding to the light source. The second vector improves the accuracy of determining the first and second vectors; each of the multiple light sources is sequentially used as the first light source, and for each first light source, each of the multiple light sources other than the first light source is sequentially used as the second light source; the first index, the second index, and the third index are determined based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source; the surface color detection result of the first metal is determined based on multiple first indexes, multiple second indexes, and multiple third indexes, realizing the reflection of the surface color detection result of the first metal through multiple surface color matching results between the first metal and the second metal, effectively improving the accuracy of surface color detection of the first metal.

[0053] Figure 3 This is a schematic diagram of a surface color detection device for anodizing dyeing provided in an embodiment of the present invention. This embodiment of the present invention is applicable to the detection of surface color of dyed metal during anodizing dyeing, and the device can be implemented in hardware and / or software. Figure 3 As shown, the surface color detection device in this anodizing dyeing process includes: The first determining module 301 is used to determine the first vector corresponding to multiple light sources and the second vector corresponding to multiple light sources respectively. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal. The second determining module 302 is used to sequentially select each of the multiple light sources as a first light source, and for each first light source, sequentially select each of the multiple light sources other than the first light source as a second light source. The third determining module 303 is used to determine a first index, a second index, and a third index based on the first vector and the second vector corresponding to the first light source and the first vector and the second vector corresponding to the second light source. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source. The fourth determining module 304 is used to determine the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators.

[0054] Based on any of the above optional technical solutions, optionally, the first determining module 301 includes: a fifth determining unit and a sixth determining unit. The fifth determining unit is used to determine a first reflectance vector based on a first spectrum and a second reflectance vector based on a second spectrum, wherein the first reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the first spectrum, and the second reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the second spectrum; the sixth determining unit is used to, for each of the multiple light sources, determine a first vector corresponding to the light source based on the first reflectance vector and the tristimulus value weight matrix corresponding to the light source, and determine a second vector corresponding to the light source based on the second reflectance vector and the tristimulus value weight matrix corresponding to the light source.

[0055] Based on any of the above optional technical solutions, optionally, the third determining module 303 includes: a color adaptation matrix determining unit, a first index determining unit, and a second index determining unit. The color adaptation matrix determining unit is used to determine the color adaptation matrix corresponding to the switch from the first light source to the second light source; the first index determining unit is used to transform the first vector corresponding to the first light source based on the color adaptation matrix to obtain a third vector, and to determine a first index based on the third vector and the first vector corresponding to the second light source; the second index determining unit is used to transform the second vector corresponding to the first light source based on the color adaptation matrix to obtain a fourth vector, and to determine a second index based on the fourth vector and the second vector corresponding to the second light source.

[0056] Based on any of the above optional technical solutions, optionally, the first index determining unit includes: a seventh determining subunit and an eighth determining subunit. The seventh determining subunit is used to determine a first color vector and a second color vector, wherein the first color vector is obtained by converting a third vector to a preset color space, and the second color vector is obtained by converting the first vector corresponding to the second light source to the preset color space; the eighth determining subunit is used to determine a first index based on the difference between the first color vector and the second color vector.

[0057] Based on any of the above optional technical solutions, optionally, the third determining module 303 includes: a fifth vector determining unit and a third index determining unit. The fifth vector determining unit is used to determine a fifth vector, which is formed by the ratio of components of the same dimension in the second vector corresponding to the first light source and the first vector corresponding to the first light source. The third index determining unit is used to determine a sixth vector and, based on the sixth vector and the second vector corresponding to the second light source, determine a third index, where the sixth vector is the Hadamard product of the fifth vector and the first vector corresponding to the second light source.

[0058] Based on any of the above optional technical solutions, optionally, the third index determination unit includes: a ninth determination subunit and a tenth determination subunit. The ninth determination subunit is used to determine the third color vector and the fourth color vector, whereby the third color vector is obtained by converting the sixth vector to a preset color space, and the fourth color vector is obtained by converting the second vector corresponding to the second light source to the preset color space; the tenth determination subunit is used to determine the third index based on the difference between the third color vector and the fourth color vector.

[0059] Based on any of the above optional technical solutions, optionally, the fourth determining module 304 is specifically used to determine multiple first deviations based on multiple first indicators and multiple second indicators, wherein the first deviation is the deviation between the first indicator and the second indicator corresponding to the same first light source and second light source; and to determine the surface color detection result of the first metal based on the largest third indicator among multiple third indicators and the largest first deviation among multiple first deviations.

[0060] The technical solution of this invention involves a first determining module 301 that determines first vectors and second vectors corresponding to multiple light sources. The first vector corresponding to a light source is formed by the tristimulus values ​​of the first spectrum under the light source, and the second vector corresponding to a light source is formed by the tristimulus values ​​of the second spectrum under the light source. A second determining module 302 sequentially uses each of the multiple light sources as a first light source, and for each first light source, sequentially uses each of the multiple light sources other than the first light source as a second light source, thus achieving a double-layer loop traversal of multiple light sources to obtain multiple ordered light source combinations. A third determining module 303 determines a first index, a second index, and a third index based on the first and second vectors corresponding to the first and second light sources, and the first and second vectors corresponding to the second light sources, thus achieving the calculation of the first index, the second index, and the third index based on the multiple tristimulus values ​​corresponding to the ordered light source combinations. The third indicator is used to represent the degree of change of the perceived color corresponding to the first spectrum when switching from the first light source to the second light source, the second indicator represents the degree of change of the perceived color corresponding to the second spectrum when switching from the first light source to the second light source, and the third indicator represents the degree of change of the deviation between the perceived color corresponding to the first spectrum and the perceived color corresponding to the second spectrum when switching from the first light source to the second light source. The fourth determining module 304 determines the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators, realizing the determination of the surface color matching result between the first metal and the second metal when switching from the first light source to the second light source through the first indicators, second indicators and third indicators. The surface color detection result of the first metal is reflected based on multiple surface color matching results between the first metal and the second metal, which effectively improves the accuracy of surface color detection of the first metal.

[0061] The surface color detection device for anodizing dyeing provided in this embodiment of the invention can execute the surface color detection method for anodizing dyeing provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0062] Figure 4 This is a schematic diagram of an electronic device for implementing a surface color detection method in anodizing dyeing, as provided in an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0063] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0064] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0065] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as surface color detection methods in anodizing dyeing.

[0066] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0067] In some embodiments, the surface color detection method in anodizing dyeing can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the surface color detection method in anodizing dyeing described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the surface color detection method in anodizing dyeing by any other suitable means (e.g., by means of firmware).

[0068] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0069] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0070] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0071] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0072] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0073] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0074] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0075] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for detecting surface color in anodizing dyeing, characterized in that, The method includes: A first vector corresponding to multiple light sources and a second vector corresponding to multiple light sources are determined respectively. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal. Each of the multiple light sources is sequentially designated as a first light source, and for each first light source, each of the multiple light sources other than the first light source is sequentially designated as a second light source; Based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source, a first index, a second index, and a third index are determined. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source. The surface color detection result of the first metal is determined based on multiple first indicators, multiple second indicators, and multiple third indicators.

2. The method according to claim 1, characterized in that, Determine the first vector corresponding to each of the multiple light sources and the second vector corresponding to each of the multiple light sources, including: A first reflectance vector is determined based on the first spectrum, and a second reflectance vector is determined based on the second spectrum. The first reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the first spectrum, and the second reflectance vector is formed based on the reflectance corresponding to multiple wavelengths in the second spectrum. For each of the multiple light sources, a first vector corresponding to the light source is determined based on the first reflectance vector and the tristimulus value weight matrix corresponding to the light source, and a second vector corresponding to the light source is determined based on the second reflectance vector and the tristimulus value weight matrix corresponding to the light source.

3. The method according to claim 1, characterized in that, The first index and the second index are determined based on the first vector and the second vector corresponding to the first light source, and the first vector and the second vector corresponding to the second light source, including: Determine the color adaptation matrix corresponding to the switch from the first light source to the second light source; The first vector corresponding to the first light source is transformed based on the color adaptation matrix to obtain the third vector, and the first index is determined based on the third vector and the first vector corresponding to the second light source. The second vector corresponding to the first light source is transformed based on the color adaptation matrix to obtain a fourth vector, and the second index is determined based on the fourth vector and the second vector corresponding to the second light source.

4. The method according to claim 3, characterized in that, Determining the first index based on the third vector and the first vector corresponding to the second light source includes: A first color vector and a second color vector are determined. The first color vector is obtained by converting the third vector to a preset color space, and the second color vector is obtained by converting the first vector corresponding to the second light source to the preset color space. The first index is determined based on the difference between the first color vector and the second color vector.

5. The method according to claim 1, characterized in that, The third index is determined based on the first and second vectors corresponding to the first light source and the first and second vectors corresponding to the second light source, including: A fifth vector is determined, which is formed by the ratio of the components of the second vector corresponding to the first light source and the first vector corresponding to the first light source in the same dimension; A sixth vector is determined, and the third index is determined based on the sixth vector and the second vector corresponding to the second light source. The sixth vector is the Hadamard product of the fifth vector and the first vector corresponding to the second light source.

6. The method according to claim 5, characterized in that, The third index is determined based on the sixth vector and the second vector corresponding to the second light source, including: A third color vector and a fourth color vector are determined. The third color vector is obtained by converting the sixth vector to a preset color space, and the fourth color vector is obtained by converting the second vector corresponding to the second light source to a preset color space. The third index is determined based on the difference between the third color vector and the fourth color vector.

7. The method according to claim 1, characterized in that, The surface color detection result of the first metal is determined based on multiple first indicators, multiple second indicators, and multiple third indicators, including: Multiple first deviations are determined based on multiple first indicators and multiple second indicators. The first deviation is the deviation between the first indicator and the second indicator corresponding to the same first light source and second light source. The surface color detection result of the first metal is determined based on the largest third index among the plurality of third indices and the largest first deviation among the plurality of first deviations.

8. A surface color detection device for anodizing dyeing, characterized in that, The device includes: The first determining module is used to determine a first vector corresponding to multiple light sources and a second vector corresponding to multiple light sources respectively. The first vector corresponding to the light source is formed by the tristimulus value of the first spectrum under the light source, and the second vector corresponding to the light source is formed by the tristimulus value of the second spectrum under the light source. The first spectrum is the reflectance spectrum corresponding to the first metal after anodizing and staining, and the second spectrum is the reflectance spectrum corresponding to the second metal for detecting the first metal. The second determining module is used to sequentially select each of the multiple light sources as a first light source, and for each first light source, sequentially select each of the multiple light sources other than the first light source as a second light source. The third determining module is used to determine a first index, a second index, and a third index based on the first vector and the second vector corresponding to the first light source and the first vector and the second vector corresponding to the second light source. The first index is the color inconstancy index corresponding to the first spectrum when switching from the first light source to the second light source. The second index is the color inconstancy index corresponding to the second spectrum when switching from the first light source to the second light source. The third index is the metamerism index corresponding to the first spectrum and the second spectrum when switching from the first light source to the second light source. The fourth determining module is used to determine the surface color detection result of the first metal based on multiple first indicators, multiple second indicators and multiple third indicators.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the surface color detection method in anodizing dyeing according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the surface color detection method in anodizing dyeing as described in any one of claims 1-7.