Illumination Spectrum Generation Method, Spectrum Matching Method and Device, Equipment, Medium

By establishing a spectral formula library and a spectral matching rule library, and using HSB color model and regression function for spectral fitting, the problem of color reduction of items in different colors in different environments is solved, high-quality lighting spectrum matching is achieved, and the color display effect of the product is improved.

CN114742137BActive Publication Date: 2025-07-22KAIWARE (SHENZHEN) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210299334.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-07-22
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

In the prior art, supermarkets and shopping malls use fixed lighting spectrum formulas for different colors of clothing or meat, resulting in a large color difference between the colors of items seen at home after purchase and the colors of the supermarket or shopping mall, and it is impossible to truly restore the true color of the object being illuminated, affecting the display of the value of the product.

Method used

By establishing a spectral formula library and a spectral matching rule library, the HSB color model is used to divide the primary color of the matching HSB information, the sample parameters of the color sample set are collected, the spectral power distribution function under the fitted light source is obtained, and the regression function is used to fit similarity, to determine the unique and high-quality illumination spectral formula.

Benefits of technology

It realizes the accurate matching of high-quality lighting spectral formula based on the HSB information of the illuminated object, ensuring that the illuminated object is truly colored in different environments, and improving the color restoration effect of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742137B_ABST
    Figure CN114742137B_ABST
Patent Text Reader

Abstract

The present application provides a lighting spectrum generation method, a spectrum matching method and device, equipment, and medium, belonging to the field of lighting technology. Among them, the lighting spectrum generation method includes: dividing the HSB information to be matched into primary colors through a preset HSB color model to determine the uniquely corresponding primary color information; forming a color sample set from multiple color samples of the primary color information; collecting the sample parameters corresponding to the color sample set to obtain a first spectral power distribution function; obtaining a second spectral power distribution function under a fitting light source and a preset regression function threshold; performing a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function to obtain a similarity value; performing a similarity judgment on the similarity value to determine the lighting spectrum formula uniquely corresponding to the primary color information. The present application performs spectrum matching on the HSB information through the established spectrum formula library and spectrum matching rule library to determine the unique and high-quality lighting spectrum formula for the object to be illuminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of lighting, and in particular to a method for generating a lighting spectrum, a method and device for spectral matching, equipment, and a medium. Background Art

[0002] In an actual lighting scenario, different objects to be illuminated require different lighting spectra to make the entire lighting environment more realistic, so as to better display the objects to be illuminated and make the entire light environment more in line with people's expectations. For example, in the lighting application in the clothing field, it is recommended to use a lighting spectrum with a color temperature of 3500K for men's clothing, a lighting spectrum with a color temperature of 3000K and a white bias for women's clothing, and a lighting spectrum with a color temperature of 3200K for children's clothing. In addition, in the lighting application in the supermarket area, a lighting spectrum with a color temperature of 1800K should be used for the beef area, and a lighting spectrum with a color temperature of 3500K and a red bias should be used for areas such as vegetables and fruits, so as to better display the objects to be illuminated.

[0003] However, at present, many supermarkets and shopping malls uniformly adopt a fixed lighting spectrum formula for different colors of clothing or meat. As a result, after customers complete their purchases, the colors of the items seen at home are significantly different from those in the supermarket or shopping mall, and the true colors of the objects to be illuminated cannot be restored, and the value of the products cannot be highlighted. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a method for generating a lighting spectrum, a method and device for spectral matching, equipment, and a medium, which can perform spectral matching on the HSB information of the object to be illuminated through the established spectral formula library and spectral matching rule library to determine a unique and high-quality lighting spectrum formula for the object to be illuminated.

[0005] To achieve the above object, the first aspect of the embodiments of the present application proposes a method for generating a lighting spectrum, including:

[0006] Obtain a preset HSB color model, and perform primary color division on the HSB information to be matched through the HSB color model to determine the primary color information uniquely corresponding to the HSB information;

[0007] Obtain a plurality of color samples corresponding to the primary color information according to the HSB color model, and form a color sample set with the plurality of color samples;

[0008] Collect sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include a first spectral power distribution function corresponding to the color sample set;

[0009] Obtain a second spectral power distribution function under a fitting light source and a preset regression function threshold;

[0010] Performing a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function using a regression function to obtain a similarity value;

[0011] Performing a similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral formula uniquely corresponding to the base color information from a preset spectral formula library.

[0012] In some embodiments, the method further includes:

[0013] Obtaining the mapping relationship between the base color information and the formula color patch in the spectral formula library;

[0014] Determining the formula color patch uniquely corresponding to the base color information of the HSB information according to the mapping relationship between the base color information and the formula color patch.

[0015] In some embodiments, the performing a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function using a regression function to obtain a similarity value includes:

[0016] Obtaining the first spectral power distribution function and its corresponding first chromaticity information;

[0017] Obtaining the second spectral power distribution function and its corresponding second chromaticity information;

[0018] Performing a chromaticity judgment process on the first chromaticity information and the second chromaticity information to obtain a chromaticity comparison result;

[0019] Establishing a functional relationship between the first spectral power distribution function and the second spectral power distribution function to obtain the fitting ratio information of the fitting light source;

[0020] Adjusting the functional relationship according to the chromaticity comparison result to update the fitting ratio information;

[0021] Performing a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function using a regression function to obtain a similarity value.

[0022] In some embodiments, the performing a similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral formula uniquely corresponding to the base color information from a preset spectral formula library includes:

[0023] Performing a similarity judgment on the regression function threshold and the similarity value;

[0024] When the similarity value is greater than the regression function threshold, determining the illumination spectral formula uniquely corresponding to the base color information from the preset spectral formula library according to the fitting ratio information.

[0025] In some embodiments, obtaining a plurality of color samples corresponding to the base color information according to the HSB color model, and forming a color sample set with the plurality of color samples, includes:

[0026] Dividing the hue of the base color information according to the HSB color model to obtain the base color hue uniquely corresponding to the base color information, where the base color hue includes any one of a cool color tone, a neutral color tone, and a warm color tone;

[0027] Making a plurality of color samples corresponding to the base color information according to the base color hue corresponding to the base color information, where each color sample includes different materials and different reflection coefficients;

[0028] Forming a color sample set with the plurality of color samples.

[0029] A second aspect of the embodiments of the present application provides an illumination spectrum matching method, including:

[0030] Performing color sampling on the object to be illuminated to be matched to obtain the HSB information of the object to be illuminated;

[0031] Obtaining a spectrum matching rule library established based on color matching rules;

[0032] Obtaining a spectrum formula library of any one of the methods described in the first aspect embodiments of the present application;

[0033] Performing spectrum matching on the HSB information according to the spectrum matching rule library and the spectrum formula library to determine the illumination spectrum formula uniquely corresponding to the HSB information.

[0034] A third aspect of the embodiments of the present application provides an illumination spectrum generating device, including:

[0035] A base color information obtaining module, configured to obtain a preset HSB color model, and perform base color division on the HSB information to be matched through the HSB color model to determine the base color information uniquely corresponding to the HSB information;

[0036] A sample set construction module, configured to obtain a plurality of color samples corresponding to the base color information according to the HSB color model, and form a color sample set with the plurality of color samples;

[0037] A first parameter obtaining module, configured to collect sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include a first spectral power distribution function corresponding to the color sample set;

[0038] A second parameter obtaining module, configured to obtain a second spectral power distribution function under a fitting light source and a preset regression function threshold;

[0039] A similarity fitting module, configured to perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value;

[0040] A spectral formula generation module, configured to perform similarity judgment on the similarity value according to the regression function threshold, so as to determine the illumination spectral formula uniquely corresponding to the base color information from a preset spectral formula library.

[0041] A fourth aspect of the embodiments of the present application provides an illumination spectrum matching device, including:

[0042] An HSB information acquisition module, configured to perform color sampling on an object to be matched to obtain the HSB information of the object;

[0043] A matching rule library acquisition module, configured to acquire a spectral matching rule library established according to color matching rules;

[0044] A spectral formula library acquisition module, configured to acquire the spectral formula library in any one of the methods in the first aspect of the embodiments of the present application;

[0045] A spectral matching module, configured to perform spectral matching on the HSB information according to the spectral matching rule library and the spectral formula library, so as to determine the illumination spectral formula uniquely corresponding to the HSB information.

[0046] A fifth aspect of the embodiments of the present application provides a computer device, where the computer device includes a memory and a processor. Among them, a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is configured to execute:

[0047] The illumination spectrum generation method according to any one of the first aspect of the embodiments of the present application; or

[0048] The illumination spectrum matching method according to any one of the second aspect of the embodiments of the present application.

[0049] A sixth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer is configured to execute:

[0050] The illumination spectrum generation method according to any one of the first aspect of the embodiments of the present application; or

[0051] The illumination spectrum matching method according to any one of the second aspect of the embodiments of the present application.

[0052] The lighting spectrum generation method, spectrum matching method and device, equipment, and medium proposed in the embodiments of the present application obtain a preset HSB color model, divide the HSB information to be matched into primary colors through the HSB color model, and determine the primary color information uniquely corresponding to the HSB information. Multiple color samples corresponding to the primary color information are obtained according to the HSB color model, and the multiple color samples form a color sample set. Then, sample parameters corresponding to the color sample set are collected by a color sampling device, where the sample parameters include the first spectral power distribution function corresponding to the color sample set. The second spectral power distribution function under a fitting light source and a preset regression function threshold are obtained, and the regression function is used to perform a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function to obtain a similarity value. The similarity value is judged according to the regression function threshold to determine the lighting spectrum formula uniquely corresponding to the primary color information from a preset spectral formula library. The present application can perform spectrum matching on the HSB information of the object to be illuminated through the established spectral formula library and spectral matching rule library to determine the unique and high-quality lighting spectrum formula of the object to be illuminated, so as to better display the object to be illuminated according to the lighting spectrum formula. Description of the Drawings

[0053] Figure 1 is a flowchart of the lighting spectrum generation method provided by an embodiment of the present application;

[0054] Figure 2 is a flowchart of the lighting spectrum generation method provided by another embodiment of the present application;

[0055] Figure 3 is Figure 1 a flowchart of step S150 in

[0056] Figure 4 is Figure 1 a flowchart of step S120 in

[0057] Figure 5 is a flowchart of the lighting spectrum matching method provided by an embodiment of the present application;

[0058] Figure 6 is a detailed schematic diagram of the correspondence information between the HSB information data range and the spectral formula library and formula color block information provided by an embodiment of the present application;

[0059] Figure 7 is a detailed schematic diagram of the spectral formula library provided by an embodiment of the present application and the corresponding formula color block area under the CIE color coordinate range;

[0060] Figure 8 is a schematic diagram of the hardware structure of the computer device provided by an embodiment of the present application. Detailed Embodiments

[0061] In order to make the objectives, technical solutions and advantages of this application clearer and more understandable, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0062] It should be noted that although functional module division is carried out in the device schematic diagram and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the sequence in the flowchart. The terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0064] HSB (Hue-Saturation-Brightness) represents a color model, that is, a color model of hue (H), saturation (S), and brightness (B). Based on the human perception of color, it describes three basic characteristics of color. The HSB color model is represented by the three attributes of color, that is, the three attributes of color are quantified. The saturation S and brightness B are represented by percentage values (0%-100%), and the hue is represented by an angle (0°-360°). The saturation S represents the purity of the color. When the saturation is zero, it is gray. White, black, and other grayscale colors have no saturation. The greater the saturation, the purer the color. The brightness B refers to the brightness of the color. When the brightness is zero, it is black, and when the brightness is the maximum, the color is in the most vivid state.

[0065] In an actual lighting scenario, different illuminated objects should select different lighting spectra to make the entire lighting environment more realistic, so as to better display the illuminated objects and make the entire light environment more in line with people's expectations. For example, in the lighting application in the clothing field, it is recommended to use a lighting spectrum with a color temperature of 3500K for men's clothing, a lighting spectrum with a color temperature of 3000K and a white bias for women's clothing, and a lighting spectrum with a color temperature of 3200K for children's clothing. In addition, in the lighting application in the supermarket area, a lighting spectrum with a color temperature of 1800K should be used for the beef area, and a lighting spectrum with a color temperature of 3500K and a red bias should be used for areas such as vegetables and fruits, so as to better display the illuminated objects.

[0066] However, at present, many supermarkets and shopping malls uniformly adopt a fixed lighting spectrum formula for clothing or meat of different colors. As a result, after customers complete their purchases, there is a large color difference between the colors of the items seen at home and those in the supermarket or shopping mall. The true color of the illuminated object cannot be restored, and the value of the commodity cannot be highlighted.

[0067] Based on this, the main purpose of the embodiments of this application is to propose a lighting spectrum generation method, a spectrum matching method and device, equipment, and medium, which can efficiently and accurately determine the lighting spectrum formula of different colored illuminated objects by establishing a spectrum formula library and a spectrum matching rule library, so as to better display the illuminated object according to the lighting spectrum formula.

[0068] Refer to Figure 1 , according to the lighting spectrum generation method of the first aspect embodiment of this application, it includes but is not limited to steps S110 to S160.

[0069] S110, obtain a preset HSB color model, and divide the base colors of the HSB information to be matched through the HSB color model to determine the base color information uniquely corresponding to the HSB information;

[0070] S120, obtain multiple color samples corresponding to the base color information according to the HSB color model, and form a color sample set with the multiple color samples;

[0071] S130, collect the sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include the first spectral power distribution function corresponding to the color sample set;

[0072] S140, obtain the second spectral power distribution function under the fitting light source and the preset regression function threshold;

[0073] S150, perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function using a regression function to obtain a similarity value;

[0074] S160, perform a similarity judgment on the similarity value according to the regression function threshold to determine the lighting spectrum formula uniquely corresponding to the base color information from the preset spectrum formula library.

[0075] In step S110, obtain a preset HSB color model, and define the HSB information to be matched through the HSB color model. Specifically, establish a preset HSB color model according to the HSB color mode, and delimit the corresponding range of the color of the illuminated object to be matched according to the HSB color model, that is, the HSB information used to define the target color, then the base color information uniquely corresponding to the HSB information is determined, denoted as base color s.

[0076] It should be noted that when color sampling the object to be matched, different forms of color parameters can be obtained due to different sampling devices. However, by converting different forms of color parameters into equivalent HSB information, the basic colors of the HSB information to be matched can be divided based on the HSB color model, and the unique corresponding basic color s of the HSB information can be determined. Specifically, when the color parameters are obtained through sampling devices such as sensors, the forms of the color parameters include numerical forms represented by different color models such as RGB (Red-Green-Blue), HSL (Hue-Saturation-Lightness), HSV (Hue-Saturation-Value), YUV (luminance-chrominance), RAW (data processed by the image sensor), etc., and the different forms of color parameters obtained can be converted into the corresponding HSB information equivalent to the HSB color model. In addition, the color parameters also include the reflection spectral distribution function of the basic color object, pixel values, RGB values, HSB values, etc.

[0077] In step S120, in order to obtain the sample parameters corresponding to the target color more accurately and comprehensively, a plurality of color samples corresponding to the basic color information are obtained according to the HSB color model, and the plurality of color samples form a color sample set.

[0078] In step S130, the sample parameters corresponding to the color sample set are collected by a color sampling device, where the sample parameters include the first spectral power distribution function f corresponding to the color sample set s . Specifically, the color sampling device includes a radiation spectrometer, an integrating sphere (dark room), a standard light source, and sampling software. It should be noted that this application is not limited to the above color sampling devices, and color sampling devices with the same color sampling function are also applicable to this application and will not be elaborated here.

[0079] It should be noted that when collecting the sample parameters corresponding to the color sample set by the color sampling device, specifically, after putting the multiple color samples corresponding to each basic color s into an integrating sphere with, for example, an R98 reflectance coefficient, the standard light source, the integrating sphere, and the radiation spectrometer are placed, and the integrating sphere is connected to the radiation spectrometer. At the same time, the spectral radiometer needs to be separated by a baffle to avoid the light of the standard light source directly entering the probe. Among them, in order to avoid strong light reflection, the integrating sphere needs to be made as large as possible, and the standard light source does not directly irradiate the color sample, but irradiates it at an angle of 15 degrees with the color sample.

[0080] In steps S140 to S160, the second spectral power distribution function f under the fitting light source is obtained cand a preset regression function threshold, and use the regression function to perform a similarity fitting process on the first spectral power distribution function and the second spectral power distribution function, that is, by establishing a function relationship between the first spectral power distribution function f s and the second spectral power distribution function f c , solving the function relation to obtain a similarity value. Then, perform a similarity judgment on the similarity value according to the preset regression function threshold to determine the illumination spectral recipe uniquely corresponding to the base color information from the preset spectral recipe library. It should be noted that determining the illumination spectral recipe uniquely corresponding to the base color information from the preset spectral recipe library establishes a mapping relationship between the base color information and the corresponding illumination spectral recipe in the spectral recipe library, that is, a spectral recipe library is constructed according to the obtained multiple illumination spectral recipes.

[0081] It should be noted that after determining the base color s uniquely corresponding to the to-be-matched HSB information, each base color s is chromatically divided according to the hue (H), saturation (S), and brightness (B) in the HSB information. The chromaticity is specifically divided into any one of the cold color tone (cw), neutral color tone (nw), and warm color tone (ww), that is, the base color s has a uniquely corresponding base color tone. Then, according to the defined cold color tone (cw), neutral color tone (nw), and warm color tone (ww), standard light sources conforming to the three color tones are defined, which are A light source, U35 light source, and D50 light source respectively. In order to eliminate the color cast error caused by the asynchrony between a single light source and the base color tone to the greatest extent, the corresponding light source weights of different color tone light sources as shown in Table 1 are established. According to the light source weight ratio of the base color tone of different base colors s under different standard light sources, the most accurate reflection spectral curve function f r of the base color s is obtained. In order to perform spectral fitting more effectively, the curve wavelength of the obtained reflection spectral curve function f r is intercepted within the range of 380 - 780 nm, and the intercepted curve is normalized to obtain the curve of the first spectral power distribution function f s .

[0082] Table 1

[0083] Base color tone A light source U35 light source D50 light source Warm tone (ww) 0.7 0.2 0.1 Neutral tone (nw) 0.2 0.6 0.2 Cool tone (cw) 0.1 0.2 0.7

[0084] It should be noted that the fitting light source can be monochromatic light, composite light, or any combination of monochromatic light and composite light. The fitting light source can be independently controllable and contain more than two light sources, and the main wavelength of the fitting light source is between 350 nm and 780 nm. In addition, the fitting light source contains at least one group of composite white light, the color temperature range of the composite white light is 1000K - 10000K, the main wavelength of the composite white light is 350 nm to 780 nm, and the corresponding Ra color rendering index is any value between 0 and 100. At the same time, the form and arrangement of the fitting light source can include any one of interleaving, interpenetrating, embedding, and irregular free distribution, and the packaging form of the fitting light source can be any packaging such as SMD, COB, or any combination of packaging forms.

[0085] It should be noted that the spectral recipe library can cover the HSB information of all illuminated objects including single-color and multi-color objects.

[0086] In some embodiments, as Figure 2 shown, the lighting spectrum generation method of the embodiment of the present application further includes but is not limited to step S210 and step S220.

[0087] Step S210, obtaining the mapping relationship between the primary color information and the recipe color block in the spectral recipe library;

[0088] Step S220, determining the recipe color block uniquely corresponding to the primary color information corresponding to the HSB information according to the mapping relationship between the primary color information and the recipe color block.

[0089] Specifically, in some embodiments, the mapping relationship between the primary color information and the recipe color block in the spectral recipe library is obtained. Among them, there is a mapping relationship between the primary color information and the corresponding lighting spectral recipe in the spectral recipe library, and each lighting spectral recipe in the spectral recipe library is represented in the form of a recipe color block, that is, there is a mapping relationship between the corresponding HSB information and the recipe color block. According to the mapping relationship between the primary color information and the recipe color block, the recipe color block uniquely corresponding to the primary color information corresponding to the HSB information to be matched is determined.

[0090] It should be noted that the spectral recipe library is processed by color block division to obtain the recipe color block corresponding to each lighting spectral recipe, and the recipe color block uniquely corresponds to the primary color information. Specifically, the obtained spectral recipe library is processed by color block division, that is, the CIE color coordinate xy center point combined with the MacAdam ellipse is used as the range for delimiting the color blocks of the spectral recipe library to obtain the recipe color block corresponding to each lighting spectral recipe. Then, the HSB information to be matched and the recipe color blocks in the spectral recipe library form a mapping relationship, and further the corresponding relationship between the color of the illuminated object to be matched and the recipe color blocks in the spectral recipe library is obtained.

[0091] In some embodiments, as Figure 3As shown, step S150 specifically includes but is not limited to steps S310 to S360.

[0092] Step S310, obtain the first spectral power distribution function and its corresponding first chromaticity information;

[0093] Step S320, obtain the second spectral power distribution function and its corresponding second chromaticity information;

[0094] Step S330, perform chromaticity judgment processing on the first chromaticity information and the second chromaticity information to obtain a chromaticity comparison result;

[0095] Step S340, establish a functional relationship between the first spectral power distribution function and the second spectral power distribution function to obtain the fitting ratio information of the fitting light source;

[0096] Step S350, adjust the functional relationship according to the chromaticity comparison result to update the fitting ratio information;

[0097] Step S360, perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function using a regression function to obtain a similarity value.

[0098] In steps S310 to S330, obtain the first spectral power distribution function f s and its corresponding first chromaticity information, and obtain the second spectral power distribution function f c corresponding second chromaticity information. Specifically, according to reference standards such as GB-T 7921-2008 and GB5820-2003 for uniform color spaces and color difference formulas, calculate the relevant color temperature CCT, color coordinates, gamut index R s and other first chromaticity information of the first spectral power distribution function f g and the fidelity index R f etc. According to IES TM-30-18 Method for Evaluating Light Source Color Rendition, calculate the second spectral power distribution function f c and its corresponding second chromaticity information. Therefore, perform chromaticity judgment processing on the obtained first chromaticity information and second chromaticity information to obtain a chromaticity comparison result.

[0099] In step S340, establish a functional relationship between the first spectral power distribution function f s and the second spectral power distribution function f c to obtain the fitting ratio information of the fitting light source. Specifically, assume there are n groups of independent fitting light sources for spectral fitting (n is a positive integer), and test the light source spectral power distributions f1, f2... f of each group of fitting light sources through a radiation spectrometern , then the second spectral power distribution function f c is used to represent the spectral power distribution function after fitting of n groups of fitting light sources. Specifically, by obtaining multiple groups of typical peaks of the first spectral power distribution function f s , that is, assuming there are z typical peaks (z is a positive integer), let f s1 , f s2 ... f sz respectively represent the values of the 1st to zth typical peaks. As shown in formula (1), z groups of values c s11 , c s12 ... c s1n are obtained by solving multiple groups of relationships in formula (1), until c s21 , c s22 ... c s2n , until c sz1 , c sz2 ... c szn . After that, the average value of each group of values in z groups of values c s11 , c s12 ... c s1n , c s21 , c s22 ... c s2n is obtained until c sz1 , c sz2 ... c szn to obtain the luminous flux occupancy ratios c1, c2... c n representing n groups of independent fitting light sources. Then, combined with formula (2), the functional relationship between the first spectral power distribution function f s and the second spectral power distribution function f c is established to obtain the fitting ratio information of the fitting light source.

[0100]

[0101] f s ≈ f c = c1 * f1 + c2 * f2 + c3 * f3... + c n * f n (2)

[0102] In steps S350 to S360, adjust the above functional relationship according to the chromaticity comparison result to update the fitting ratio information, and use the regression function for the first spectral power distribution function f s and the second spectral power distribution function f cPerform similarity fitting processing to obtain a similarity value. Specifically, when the chromaticity comparison result between the first chromaticity information and the second chromaticity information shows a large difference, it is necessary to adjust the base number of the typical peak z in the fitting light source for spectral fitting to update the fitting ratio information corresponding to the fitting light source. For example, when the chromaticity comparison result between the first chromaticity information and the second chromaticity information shows a large difference, and the obtained similarity value is less than or equal to the preset regression function threshold, it is necessary to increase the base number of the typical peak z, that is, increase the number of typical peaks z, until the similarity value is greater than the preset regression function threshold. However, when the base number of the typical peak z has become very large, it is necessary to increase the base number n of the independent fitting light sources in the spectral fitting until the similarity value is greater than the preset regression function threshold.

[0103] In some embodiments, step S160 specifically includes: performing a similarity judgment on the regression function threshold and the similarity value. When the similarity value is greater than the regression function threshold, determine the illumination spectral formula uniquely corresponding to the base color information from the preset spectral formula library according to the fitting ratio information.

[0104] Specifically, by establishing a functional relationship between the first spectral power distribution function f s and the second spectral power distribution function f c and solving this functional relationship, a similarity value is obtained. To better verify the similarity between the first spectral power distribution function f s and the second spectral power distribution function f c , perform a similarity judgment on the regression function threshold and the similarity value. When the similarity value is greater than the regression function threshold, determine the illumination spectral formula uniquely corresponding to the base color information from the preset spectral formula library according to the fitting ratio information. For example, assume that the preset regression function threshold is 0.95. Then, when the similarity value is greater than the preset regression function threshold 0.95, and the chromaticity comparison result indicates that the first chromaticity information and the second chromaticity information are less than the preset chromaticity comparison threshold, the illumination spectral formula uniquely corresponding to the base color information is obtained according to the fitting ratio information obtained from the second spectral power distribution function f c .

[0105] It should be noted that the regression functions used for the similarity fitting processing of the first spectral power distribution function f s and the second spectral power distribution function f c include CORREL (correlation coefficient function) and RSQ (square of the correlation coefficient function), that is, obtain the value R corresponding to CORREL and the value R 2 . Therefore, when the similarity value is greater than the preset regression function threshold, that is, the value R corresponding to CORREL and the value R 2If the formula (3) is satisfied, the illumination spectrum formula uniquely corresponding to the primary color information is obtained according to the fitting ratio information.

[0106]

[0107] It should be noted that in practical applications, in order to more accurately determine the illumination spectrum formula corresponding to the primary color s, when the similarity value is greater than the preset regression function threshold of 0.95, the experimental data on the matching of the primary color information and the color preference degree of the public under big data statistics can be combined to obtain the illumination spectrum formula uniquely corresponding to the primary color information to be matched.

[0108] In some embodiments, as Figure 4 shown, step S120 specifically includes but is not limited to steps S410 to S430.

[0109] Step S410, dividing the hue of the primary color information according to the HSB color model to obtain the primary color hue uniquely corresponding to the primary color information, and the primary color hue includes any one of a cool color tone, a neutral color tone, and a warm color tone;

[0110] Step S420, making a plurality of color samples corresponding to the primary color information according to the primary color hue corresponding to the primary color information, wherein each color sample includes different materials and different reflection coefficients;

[0111] Step S430, forming a color sample set with the plurality of color samples.

[0112] In step S410, in order to more accurately obtain the reflection spectrum data in the color parameters, the hue of each primary color information is divided according to the HSB color model. Specifically, after defining the unique corresponding primary color information for the HSB information to be matched, each primary color information is divided into any one of a cool color tone (cw), a neutral color tone (nw), and a warm color tone (ww) according to the hue corresponding to the primary color information, that is, the primary color information has a unique corresponding primary color hue, that is, the HSB information to be matched has a unique corresponding primary color hue.

[0113] In steps S420 to S430, in order to obtain color parameters of a more accurate, more complete, and more practical illumination application-compliant color sample set, a plurality of color samples with different materials and different reflection coefficients are produced according to the base color tone corresponding to the base color information. Specifically, the materials for producing the color samples include leather, fiber, cotton and linen, silk, etc., and the reflection coefficients selected according to different materials also include many types, so that a plurality of color samples corresponding to the base color information can be obtained. Finally, a color sample set is constituted by the plurality of color samples, so that more accurate and comprehensive sample parameters of the base color information can be obtained. The present application can perform spectral matching on the HSB information of the object to be illuminated through the established spectral formula library and spectral matching rule library to determine the unique and high-quality illumination spectral formula of the object to be illuminated, so as to better represent the object to be illuminated according to the illumination spectral formula.

[0114] Referring to Figure 5 , the embodiment of the present application also provides an illumination spectral matching method, which is used to perform spectral matching on the object to be illuminated, and the method includes but is not limited to steps S510 to S540.

[0115] Step S510, perform color sampling on the object to be matched to obtain the HSB information of the object to be illuminated;

[0116] Step S520, obtain a spectral matching rule library established according to color matching rules;

[0117] Step S530, obtain the spectral formula library in the method according to any one of the embodiments of the first aspect of the present application;

[0118] Step S540, perform spectral matching on the HSB information according to the spectral matching rule library and the spectral formula library to determine the illumination spectral formula uniquely corresponding to the HSB information.

[0119] In step S510, in order to better obtain a unique, object-compliant, and high-quality lighting spectrum formula, color sampling is performed on the object to be matched to obtain the HSB information of the object. Specifically, since the spectrum formula library is constructed based on the HSB color model, the main form of obtaining the color of the object is the HSB value. It should be noted that when performing color sampling on the object to be matched, different color parameter forms can be obtained due to different sampling devices. However, by converting different color parameter forms into equivalent HSB information forms, the basic colors of the HSB information to be matched can be divided according to the HSB color model, and the basic color information uniquely corresponding to the HSB information can be determined. In addition, color sampling processing is performed on the object to obtain the color parameters of the object, and the obtained color parameters include pixel values, RGB values, HSB values, etc. collected distributively, that is, the object HSB information corresponding to the object is obtained by combining the sensor with the color sampling rule for the object, and the object HSB information is only one of the color representation forms of the object.

[0120] It should be noted that the color parameters obtained by the object through the sensor can be represented in different color models such as RGB (Red-Green-Blue), HSL (Hue-Saturation-Lightness), HSV (Hue-Saturation-Value), YUV (Luminance-Chrominance), RAW (data processed by the image sensor), etc. The different forms of color parameters obtained can be converted into equivalent object HSB information in the HSB color model, so that the object HSB information and the spectrum formula library can be calculated and compared according to the spectrum matching rule library, and the lighting spectrum formula uniquely corresponding to the basic color information of the object and its uniquely corresponding formula color block can be obtained.

[0121] It should be noted that the sampling devices for sampling the color parameters of the object include a radiation spectrometer, a CMOS device, etc. However, the present application is not limited to the above color sampling devices, and color sampling devices with the same color sampling function are also applicable to the present application and will not be elaborated here.

[0122] In steps S520 and S530, obtain a spectral matching rule library established according to color matching rules; obtain a spectral recipe library in the lighting spectral generation method according to any one of the embodiments of the first aspect of the present application. Specifically, the color matching rules include the hue definition of the HSB color model, a preset primary color priority definition, and a preset determination relation formula. When establishing the spectral matching rule library, the hue definition of the HSB color model uses the same definition method as the hue definition in the established HSB color model. The hue definition of the HSB color model represents calibrating the defined primary color information as any one of three types: warm color tone (ww), neutral color tone (nw), and cold color tone (cw).

[0123] It should be noted that in the process of establishing the preset primary color priority definition and the preset determination relation formula, a method combining big data statistics of color preference degrees, actual cases, and experimental data obtained by matching primary color information with the spectral recipe library is used to implement the spectral matching rule library composed of the experimental data, the hue definition of the HSB color model, the primary color priority definition, and the determination relation formula.

[0124] It should be noted that the three color attributes are quantified. The saturation S and brightness B are represented by percentage values (0%-100%), and the chromaticity H is represented by an angle (0°-360°). Among them, in the range of the chromaticity H, the value 0 can coincide with the value 360 and be connected end to end, that is, 360° of the chromaticity H is equivalent to 0°. As Figure 5 shown, the preset primary color priority definition is from level 1 to level 34, and it decreases gradually. The primary color information and the recipe color blocks in the spectral recipe library form a mapping relationship. When the constructed spectral recipe library contains 34 kinds of primary color proportions, the corresponding primary color number, hue classification, spectral recipe library number, recipe color block area number, and primary color priority are determined according to the HSB information data range of the object to be illuminated. Among them, S1 to S 34 represents the primary color number, P1 to P 34 represents the corresponding spectral recipe library number, G1 to G 34 represents the recipe color block area number corresponding to the number in the spectral recipe library number. The hue classification includes warm color tone (ww), neutral color tone (nw), cold color tone (cw), and natural color tone (sw). The corresponding H value, B value, and S value are determined according to the obtained HSB information of the object to be illuminated, so as to Figure 6 query the recipe color block area corresponding to the HSB information, and obtain the unique corresponding lighting spectral recipe of the object to be illuminated according to the spectral recipe library. Among them, Figure 6 the numbers from number 35 to number 37 are used to represent the numbers and hue classification information corresponding to the warm color tone (ww), neutral color tone (nw), cold color tone (cw), and natural color tone (sw).

[0125] It should be noted that the specific steps of the judgment relational formula include, but are not limited to, steps S521 to S523.

[0126] In step S521, first define the total color amount of the selected area as 1, extract the basic color ratios of the set 34 basic colors in the image recognition area, and count the ratio values of each basic color.

[0127] In step S522, perform a sorting of the content ratios according to the ratio values of each basic color to obtain the basic color C with the largest content ratio among them. max ;

[0128] In step S523, determine the judgment relational formula corresponding to the spectral matching rule library according to the largest basic color C. max

[0129] Specifically, in step S523 of some embodiments, compare the largest basic color C with a preset content threshold to determine the basic color number corresponding to the selected area in the spectral formula library. For example, when the content threshold is set to 70%, then when the largest basic color C is greater than or equal to 70%, match the basic color number corresponding to the basic color C in the spectral formula library, that is, match one of P1 to P. When the content threshold is set to 70%, then when the largest basic color C is less than 70%, perform steps S5231 and S5232. max max max 34 max

[0130] In step S5231, according to the result of the descending order of the content ratio sorting in step S522, obtain the first four groups of basic colors after sorting, and respectively set them as C1, C2, C3, C4, and set the total amount of C1, C2, C3, C4 to 1. It should be noted that the number of basic colors selected from the sorting result is not limited to four groups. When three groups of basic colors are selected, they are correspondingly set as C1, C2, C3.

[0131] In step S5232, classify the selected basic colors according to the calibrated warm color tone (ww), neutral color tone (nw), and cold color tone (cw), and at the same time perform a sorting of the content ratios of the basic colors in the three color tones, that is, respectively define the contents corresponding to the warm color tone (ww), neutral color tone (nw), and cold color tone (cw) as C. ww nw cw ww nw cw

[0132] It should be noted that in step S521 of some embodiments, when there are only two primary colors in the image recognition area, the corresponding primary color formula is determined according to the primary color C with the largest proportion content obtained max and the primary color C with the smallest proportion content min The difference between them. Specifically, assume C max and C min The lower limit threshold of the difference between them is 15%, and C max and C min The upper limit threshold of the difference between them is 25%, then the following three cases ① to ③ are included.

[0133] ① When C max -C min <15%, respectively count the proportion of the primary color content of C ww , C nw and C cw , and execute the full-spectrum matching rule for two primary colors;

[0134] ② When 15% ≤ C max -C min <25%, following the principle of color priority, that is, select the spectral formula corresponding to the color with a higher priority of the primary color in the spectral formula library for spectral adaptation;

[0135] ③ When C max -C min ≥25%, following the principle of content proportion priority, that is, select the spectral formula corresponding to C max for spectral adaptation.

[0136] Among them, the upper limit threshold and the lower limit threshold of the difference between C max and C min are not specifically limited and can be adjusted according to requirements.

[0137] It should be noted that in step S521 of some embodiments, when there are more than two primary colors in the image recognition area, the corresponding primary color formula is determined according to the primary color C with the largest proportion content obtained max and the second primary color C2 with the second largest proportion content. Specifically, assume C max and the lower limit threshold of the difference between C and C2 is 20%, and C max and the upper limit threshold of the difference between C and C2 is 30%, then the following three cases ④ to ⑥ are included.

[0138] ④ When C max -C2 ≥ 30%, following the principle of content proportion priority, that is, select the spectral formula corresponding to C max for spectral adaptation;

[0139] ⑤ When 20% ≤ C maxWhen C < 30%, if C max is the primary color S 34 , then select the spectral adaptation to the spectral formula corresponding to P cw ; if C max is not the primary color S 34 , respectively count the proportion of the primary color content of C ww , C nw and C cw , and execute the full-spectrum matching rules for two or more primary colors;

[0140] ⑥ When C max - C2 < 20%, if C max is the primary color S 34 , then select the spectral adaptation to the spectral formula corresponding to P cw ; if C max is not the primary color S 34, , respectively count the proportion of the primary color content of C ww , C nw and C cw , and execute the full-spectrum matching rules for two or more primary colors.

[0141] It should be noted that the full-spectrum matching rules include the full-spectrum matching rules for two primary colors and the full-spectrum matching rules for two or more primary colors. Among them, executing the full-spectrum matching rules for two primary colors includes the following⑦ to five cases.

[0142] ⑦ When both C max and C min are warm tones (ww), then select the spectral adaptation to the spectral formula corresponding to P ww ;

[0143] ⑧ When both C max and C min are neutral tones (nw), then select the spectral adaptation to the spectral formula corresponding to P nw ;

[0144] ⑨ When both C max and C min are cold tones (cw), then select the spectral adaptation to the spectral formula corresponding to P cw ;

[0145] ⑩ When C max or C min is the primary color S 33 , then match the spectral formula of the primary color tone corresponding to the non-primary color S 33 among them. For example, when C max is the primary color S 33 , C min is the primary color S 30 , and the primary color S 30If the corresponding base color tone is a cold color tone (cw), then select the spectral adaptation to the corresponding P cw spectral formula.

[0146] When C max and C min do not meet the rule conditions of the above ⑦ to ⑩, then select the spectral adaptation to the corresponding P sw spectral formula.

[0147] Among them, implementing the full-spectrum matching rules for two or more base colors includes the following and two cases.

[0148] When C ww 、C nw 、C cw When the proportion of the corresponding base color content of any one of them exceeds 50%, then select the spectral formula corresponding to the base color tone of the base color with the largest proportion of the base color content for spectral adaptation. For example, when C ww > 50%, then select the spectral adaptation to the corresponding P ww spectral formula.

[0149] When C ww 、C nw 、C cw do not meet the rule conditions in the above , then select the spectral adaptation to the corresponding P sw spectral formula. It should be noted that when C ww 、C nw 、C cw do not meet all the recognition rule conditions of the above ① to , then select the spectral adaptation to the corresponding P sw spectral formula.

[0150] In the embodiment of the present application, by obtaining the color parameters of the illuminated object, dividing the obtained basic color data into units, converting the color data of each unit into HSB information, and at the same time performing a determination process through the spectral matching rule library, combining Figure 6 the HSB information, spectral formula library, formula color block area, etc. set in it, finally obtain a unique high-quality illumination spectral formula that conforms to the illuminated object.

[0151] In a specific embodiment, the object to be illuminated may be monochromatic or complex in color. Sampling may be performed by, for example, dividing the color image of the object to be illuminated into a grid, dividing the color of each region in the image into relatively small grids, then statistically processing the color of each grid to obtain its corresponding HSB information, and then performing spectral matching on the HSB information of the object to be illuminated through the established spectral recipe library and spectral matching rule library to determine the unique and high-quality illumination spectral recipe of the object to be illuminated.

[0152] It should be noted that, as Figure 7 shown, in order to more clearly show the correspondence between the spectral recipe library and the recipe color block area, the recipe color block area corresponding to the spectral recipe library is represented by the coordinate values within the CIE color coordinate area range, and the correspondence between the spectral recipe library and the recipe color block area is constructed when the representation form of the recipe library is the combination of the xy center point of the color coordinate and the MacAdam ellipse to represent the range of the recipe library color blocks. Among them, the MacAdam ellipse representation includes the x center point, y center point, deflection angle of the area, major axis and minor axis of the corresponding color block area. This application can perform spectral matching on the HSB information of the object to be illuminated through the established spectral recipe library and spectral matching rule library to determine the unique and high-quality illumination spectral recipe of the object to be illuminated.

[0153] It should be noted that the spectral matching rule library includes the matching of monochromatic objects and mixed-color objects.

[0154] In step S540, spectral matching is performed on the HSB information according to the spectral matching rule library and the spectral recipe library to determine the illumination spectral recipe uniquely corresponding to the HSB information. After obtaining the constructed spectral recipe library, arithmetic comparison processing is performed on the HSB information of the object to be illuminated and the spectral recipe library according to the spectral matching rule library to determine the unique base color information corresponding to the HSB information. The illumination spectral recipe uniquely corresponding to the base color information is determined according to the spectral recipe library. According to the mapping relationship between the base color information and the recipe color block, the recipe color block uniquely corresponding to the base color information corresponding to the HSB information to be matched is determined. This application can perform spectral matching on the HSB information of the object to be illuminated through the established spectral recipe library and spectral matching rule library to determine the unique and high-quality illumination spectral recipe of the object to be illuminated.

[0155] The embodiment of the present application also provides an illumination spectral generation device for executing the illumination spectral generation method of the above embodiment. The device includes a base color information acquisition module, a sample set construction module, a first parameter acquisition module, a second parameter acquisition module, a similarity fitting module, and a spectral recipe generation module.

[0156] The base color information acquisition module is used to acquire a preset HSB color model, and perform base color division on the HSB information to be matched through the HSB color model to determine the base color information uniquely corresponding to the HSB information; the sample set construction module is used to obtain multiple color samples corresponding to the base color information according to the HSB color model, and form a color sample set with the multiple color samples; the first parameter acquisition module is used to collect sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include the first spectral power distribution function corresponding to the color sample set; the second parameter acquisition module is used to obtain the second spectral power distribution function under a fitting light source and a preset regression function threshold; the similarity fitting module is used to perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value; the spectral formula generation module is used to perform a similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral formula uniquely corresponding to the base color information from a preset spectral formula library.

[0157] The illumination spectral generation device according to the embodiment of the present application is used to execute the illumination spectral generation method in the above embodiment, and its specific processing process is the same as that of the illumination spectral generation method in the above embodiment, and will not be elaborated here one by one.

[0158] The embodiment of the present application further provides an illumination spectral matching device, which is used to execute the illumination spectral matching method in the above embodiment. The device includes an HSB information acquisition module, a matching rule library acquisition module, a spectral formula library acquisition module, and a spectral matching module.

[0159] The HSB information acquisition module is used to perform color sampling on the object to be matched to obtain the HSB information of the object to be matched; the matching rule library acquisition module is used to acquire a spectral matching rule library established according to color matching rules; the spectral formula library acquisition module is used to acquire the spectral formula library in the illumination spectral generation method according to any one of the embodiments of the first aspect of the present application; the spectral matching module is used to perform spectral matching on the HSB information according to the spectral matching rule library and the spectral formula library to determine the illumination spectral formula uniquely corresponding to the HSB information. The illumination spectral matching device according to the embodiment of the present application is used to execute the illumination spectral matching method in the above embodiment, and its specific processing process is the same as that of the illumination spectral matching method in the above embodiment, and will not be elaborated here one by one.

[0160] The embodiment of the present application further provides a computer device, which includes a memory and a processor. Among them, a program is stored in the memory, and when the program is executed by the processor, the processor is used to execute the illumination spectral generation method according to any one of the embodiments of the first aspect of the present application or the illumination spectral matching method according to any one of the embodiments of the second aspect of the present application.

[0161] Next, in combination with Figure 8Describe in detail the hardware structure of the computer device. The computer device includes: a processor 810, a memory 820, an input / output interface 830, a communication interface 840, and a bus 850.

[0162] The processor 810 can be implemented in ways such as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0163] The memory 820 can be implemented in forms such as a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 820 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 820 and are called by the processor 810 to execute the lighting spectrum generation method in the embodiments of the present application or execute the lighting spectrum matching method in the embodiments of the present application.

[0164] The input / output interface 830 is used to implement information input and output.

[0165] The communication interface 840 is used to implement communication interaction between this device and other devices. It can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.); and the bus 850 transmits information between various components of the device (such as the processor 810, the memory 820, the input / output interface 830, and the communication interface 840).

[0166] Among them, the processor 810, the memory 820, the input / output interface 830, and the communication interface 840 achieve communication connections with each other inside the device through the bus 850.

[0167] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a computer, the computer is used to execute the lighting spectrum generation method according to any one of the first aspect embodiments of the present application or the lighting spectrum matching method according to any one of the second aspect embodiments of the present application.

[0168] A memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0169] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0170] Those skilled in the art can understand that Figures 1 to 5 the technical solutions shown do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those illustrated, or combine certain steps, or different steps.

[0171] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0173] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0174] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0175] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.

[0176] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0178] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0179] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the rights of the embodiments of this application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall fall within the scope of the rights of the embodiments of this application.

Claims

1. A method for generating an illumination spectrum, characterized in that, Including: Obtain a preset HSB color model, and perform primary color division on the HSB information to be matched through the HSB color model to determine the primary color information uniquely corresponding to the HSB information; Obtain multiple color samples corresponding to the primary color information according to the HSB color model, and form a color sample set with the multiple color samples; Collect sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include a first spectral power distribution function corresponding to the color sample set; Obtain a second spectral power distribution function under a fitting light source and a preset regression function threshold; Perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value; wherein, the performing similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value includes: obtaining the first spectral power distribution function and its corresponding first chromaticity information; obtaining the second spectral power distribution function and its corresponding second chromaticity information; performing chromaticity judgment processing on the first chromaticity information and the second chromaticity information to obtain a chromaticity comparison result; establishing a functional relationship between the first spectral power distribution function and the second spectral power distribution function to obtain fitting ratio information of the fitting light source; adjusting the functional relationship according to the chromaticity comparison result to update the fitting ratio information; performing similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value; Perform similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral formula uniquely corresponding to the primary color information from a preset spectral formula library.

2. The lighting spectrum generation method according to claim 1, characterized in that The method further includes: Obtain the mapping relationship between the primary color information and the formula color block in the spectral formula library; Determine the formula color block uniquely corresponding to the primary color information corresponding to the HSB information according to the mapping relationship between the primary color information and the formula color block.

3. The lighting spectrum generation method according to claim 1, characterized in that The performing similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral formula uniquely corresponding to the primary color information from a preset spectral formula library includes: Perform similarity judgment on the regression function threshold and the similarity value. When the similarity value is greater than the regression function threshold, determine the illumination spectral formula uniquely corresponding to the primary color information from the preset spectral formula library according to the fitting ratio information.

4. The lighting spectrum generation method according to any one of claims 1 to 3, characterized in that, The obtaining multiple color samples corresponding to the primary color information according to the HSB color model and forming a color sample set with the multiple color samples includes: Perform hue division on the primary color information according to the HSB color model to obtain the primary color hue uniquely corresponding to the primary color information, and the primary color hue includes any one of a cool hue, a neutral hue, and a warm hue; Make multiple color samples corresponding to the primary color information according to the primary color hue corresponding to the primary color information, where each color sample includes different materials and different reflection coefficients; Construct a color sample set from the multiple color samples.

5. Lighting spectrum matching method, characterized in that, Including: Perform color sampling on the object to be matched to obtain the HSB information of the object; Obtain a spectral matching rule library established according to color matching rules; Obtain the spectral recipe library in the illumination spectral generation method according to any one of claims 1 to 4; Perform spectral matching on the HSB information according to the spectral matching rule library and the spectral recipe library to determine the illumination spectral recipe uniquely corresponding to the HSB information.

6. Lighting spectrum generation device, characterized in that, Including: A primary color information acquisition module, configured to obtain a preset HSB color model, and perform primary color division on the HSB information to be matched through the HSB color model to determine the primary color information uniquely corresponding to the HSB information; A sample set construction module, configured to obtain multiple color samples corresponding to the primary color information according to the HSB color model, and construct a color sample set from the multiple color samples; A first parameter acquisition module, configured to collect sample parameters corresponding to the color sample set through a color sampling device, where the sample parameters include a first spectral power distribution function corresponding to the color sample set; A second parameter acquisition module, configured to obtain a second spectral power distribution function under a fitting light source and a preset regression function threshold; A similarity fitting module, configured to perform similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value; where performing similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value includes: obtaining the first spectral power distribution function and its corresponding first chromaticity information; obtaining the second spectral power distribution function and its corresponding second chromaticity information; performing chromaticity judgment processing on the first chromaticity information and the second chromaticity information to obtain a chromaticity comparison result; establishing a functional relationship between the first spectral power distribution function and the second spectral power distribution function to obtain the fitting ratio information of the fitting light source; adjusting the functional relationship according to the chromaticity comparison result to update the fitting ratio information; performing similarity fitting processing on the first spectral power distribution function and the second spectral power distribution function by using a regression function to obtain a similarity value; A spectral recipe generation module, configured to perform similarity judgment on the similarity value according to the regression function threshold to determine the illumination spectral recipe uniquely corresponding to the primary color information from a preset spectral recipe library.

7. Lighting spectrum matching device, characterized in that Including: An HSB information acquisition module, configured to perform color sampling on the object to be matched to obtain the HSB information of the object; A matching rule library acquisition module, configured to obtain a spectral matching rule library established according to color matching rules; A spectral recipe library acquisition module, configured to obtain the spectral recipe library in the illumination spectral generation method according to any one of claims 1 to 4; A spectral matching module, configured to perform spectral matching on the HSB information according to the spectral matching rule library and the spectral recipe library to determine the illumination spectral recipe uniquely corresponding to the HSB information.

8. A computer device, characterized in that, The computer device includes a memory and a processor. Among them, a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is configured to execute: The lighting spectrum generation method according to any one of claims 1 to 4; or The lighting spectrum matching method according to claim 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer is configured to execute: The lighting spectrum generation method according to any one of claims 1 to 4; or The lighting spectrum matching method according to claim 5.

Citation Information

Patent Citations

  • Spectral confocal displacement sensor ranging calculation method, system and device and storage medium

    CN112230236A

  • RGB image color restoration method and computer readable storage medium

    CN112562017A