Spectral component optimization control method and system of multispectral light source, equipment and medium

Through spectral feedback control and iterative learning technology, the output spectrum of the multi-spectral LED light source is accurately adjusted, solving the problem of inaccurate spectral component control in the existing technology, and improving the image recognition and positioning accuracy of industrial and robot vision systems.

CN118714692APending Publication Date: 2024-09-27RUIDI ANTE PHOTOELECTRIC TECH (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410794567.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing technology is difficult to accurately control the output spectral components of multispectral LED light sources, resulting in the inability to fully utilize the advantages of multispectral light sources in fields such as industrial and robot vision, and the inability to effectively enhance the color contrast between the target and the background in the image.

Method used

By acquiring the digital image of the illuminated object, extracting the color of the target object and comparing it with the set target color, updating the reference spectrum, calculating the dimming signal of the spectral channel, and adjusting the multispectral through iterative learning control theory and spectral feedback controller The output spectrum of the light source to achieve optimal control of spectral components.

Benefits of technology

It achieves the stability and accuracy of the output spectrum of the multispectral LED light source, enhances the color contrast between the target and the background in the image, and improves the accuracy of image recognition, tracking and positioning by the visual system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714692A
    Figure CN118714692A
Patent Text Reader

Abstract

The invention provides a spectral component optimization control method and system for a multispectral light source, equipment and a medium. The method comprises the following steps: acquiring a collected digital image of an irradiated object; extracting the color of the target object in the digital image; updating the reference spectrum through an error between the extracted color of the target object and a set target color; calculating a difference value between the reference spectrum and the spectrum output by the multispectral light source to obtain a spectrum deviation signal of each spectrum channel; calculating a dimming signal of the corresponding channel through the spectrum deviation signal of each spectrum channel; and driving the multispectral light source to output a spectrum through the dimming signal of each spectrum channel. According to the method, the output of the multi-spectral light source can follow the set target spectrum, and the deviation of the output spectrum of the multi-channel light source caused by external factors is inhibited; meanwhile, the target spectrum is generated through a spectrum optimization method, the color contrast between the target and the background in the image can be enhanced, and then the accuracy of recognizing, tracking and positioning the image by the visual imaging system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lighting source control, and in particular to a method, system, device and medium for optimizing the control of spectral components of a multi-spectral light source. Background Art

[0002] Light sources can not only be used for general lighting, but are also an essential component of industrial and robot vision and microscopic imaging lighting. In these non-general lighting fields, high-power, multi-band special light source equipment is usually required, and the irradiance and spectral composition of the output light must be precisely controlled.

[0003] According to the imaging principle and colorimetry principle of digital cameras, the spectral components of the light source output, the reflective spectral characteristics of the object surface, and the spectral sensitivity of the imaging sensor jointly determine the color of the illuminated object in the image. Therefore, the spectral components of the light source will directly affect the contrast between the target object and the background, and thus affect the accuracy of image recognition, tracking, and positioning by automated equipment or robots.

[0004] However, industrial and robotic vision and microscopic imaging applications have put forward extremely high technical requirements for the performance of lighting sources, including high output light power, high uniformity, multi-spectral bands, irradiance and precise control of spectral components, etc. Since multi-spectral LED light sources have multivariable and nonlinear photoelectric thermodynamic characteristics, there is still a lack of methods in the existing technology to accurately control their output spectral components, which leads to the fact that when using this light source in this field, the advantages of multi-spectral light sources cannot be fully utilized.

[0005] There are two main problems with existing LED light source control technologies. First, most technologies use open-loop control to achieve a certain target irradiance by ensuring the amplitude stability of the LED driving current and the corresponding relationship between the preset irradiance amplitude and the current amplitude or table. However, due to the thermal attenuation problem of the luminous efficiency of LED light sources, as the temperature of the light source changes, the open-loop control technology cannot guarantee the stability of the spectral components of the light source output. Second, some technologies use closed-loop control, but the control method is usually only applicable to monochromatic LED light sources, and cannot solve the nonlinearity and coupling problems between channels encountered when designing feedback controllers for multi-spectrum LED light sources. Therefore, the stability of the spectral components of the multi-spectrum LED light source output cannot be guaranteed.

[0006] For lighting systems with two or more different light colors or spectral channels, the existing technology can only adjust the color or color temperature of the lighting light, and cannot optimize the color of the image by controlling the mixed spectral components. The existing method of adjusting light color is based on the principle of colorimetry. According to the position of the color coordinates of the target light (such as RGB coordinates or CIE1931xyz coordinates, etc.) in the area determined by the color coordinates of the light of different channels in the light source system, the ratio between the light powers output by the light sources of each light color channel is calculated. This method is obviously an unintelligent method that cannot deal with the error of the light color parameters of the light source.

[0007] At the same time, the light sources designed and implemented using existing technologies for industrial and robot vision lighting do not have the function of automatically adjusting the spectral composition of the light source to enhance the color contrast between the target and the background in the image, thereby increasing the technical requirements of the visual system for image processing and recognition hardware and software units, as well as the corresponding costs. Summary of the invention

[0008] In order to achieve the above-mentioned purpose and other advantages of the present invention, the first object of the present invention is to provide a method for optimizing the spectral components of a multi-spectral light source, comprising the following steps:

[0009] Acquire a digital image of the captured object;

[0010] Extracting the color of the target object in the digital image;

[0011] Compare the color of the extracted target object with the set target color;

[0012] Update the reference spectrum by the error between the extracted color of the target object and the set target color;

[0013] Calculating the difference between the reference spectrum and the spectrum output by the multi-spectral light source to obtain a spectrum deviation signal for each spectral channel;

[0014] Calculate the dimming signal of the corresponding channel through the spectral deviation signal of each spectral channel;

[0015] The multi-spectrum light source is driven to output a spectrum through a dimming signal of each spectral channel.

[0016] Further, the step of updating the reference spectrum by the error between the extracted color of the target object and the set target color comprises:

[0017] Obtaining a spectral sensitivity parameter matrix of an image acquisition device;

[0018] Obtain the spectral reflectance of the target object surface and construct a parameter matrix;

[0019] Calculating a system parameter matrix using the spectral sensitivity parameter matrix and the parameter matrix;

[0020] Based on iterative learning control theory and the system parameter matrix, a learning gain matrix and a weighting matrix are designed so that the iterative learning process converges to an optimal spectral value;

[0021] The optimal spectrum value is input into the spectrum feedback controller as the target reference signal to be followed. Further, the calculation formula of the system parameter matrix is:

[0022] P=WS

[0023] Among them, P is the system parameter matrix, S is the parameter matrix, and W is the spectral sensitivity parameter matrix.

[0024] Furthermore, the j+1th illumination spectrum iteration formula in the step of designing the learning gain matrix and the weighting matrix based on the iterative learning control theory and the system parameter matrix is:

[0025] z j+1 =Q·(z j +L·e j )

[0026] e j =C d -C j

[0027] Among them, L is the learning gain matrix, Q is the weighting matrix, z j and C j are the illumination spectrum and the color of the image pixel at the jth iteration, respectively, and e j C j With target color C d The difference between .

[0028] Furthermore, making the iterative learning process converge to the optimal spectrum value specifically means making the spectrum radius of the matrix Q·(I-LP) less than 1.

[0029] Furthermore, the calculation of the difference between the reference spectrum and the spectrum output by the multi-spectral light source is specifically achieved by solving the least squares solution of the mixed spectrum output and the normalized spectral power density parameter of each channel, and the formula is:

[0030] p=S + ·z

[0031] Among them, z is the mixed spectrum output by the light source, S is a matrix composed of the normalized spectral power density parameters of each spectral channel, S+ is the pseudo-inverse matrix of S, and p is the optical power of each channel.

[0032] The second object of the present invention is to provide a spectral component optimization control system for a multi-spectral light source, which implements the above method and includes a multi-channel light source chip, a constant current driver, a spectral sensor, a microprocessor, a host computer, and an image acquisition device; wherein,

[0033] The image acquisition device is used to acquire a digital image of the object being photographed;

[0034] The host computer is used to extract the color of the target object in the digital image, compare the extracted color of the target object with the set target color, update the reference spectrum according to the error between the extracted color of the target object and the set target color, and input the reference spectrum into the microprocessor as the target reference signal to be followed;

[0035] The spectrum sensor is used to collect the spectrum output by the multi-spectrum light source;

[0036] The microprocessor is used to calculate the difference between the reference spectrum and the spectrum output by the multi-spectral light source, obtain the spectrum deviation signal of each spectrum channel, input the spectrum deviation signal of each spectrum channel to the controller of the channel to calculate the dimming signal, and input the dimming signal of each spectrum channel to the dimming input end of the constant current driver of the channel;

[0037] The constant current driver is used to drive the multi-channel light source chip to output a spectrum.

[0038] Furthermore, an optical system is installed between the multi-channel light source chip, the spectral sensor, and the image acquisition device, and the optical system is used to change the propagation direction of the illumination light, perform microscopic imaging, magnify the image, and collect reflected light.

[0039] The third object of the present invention is to provide an electronic device, comprising: a memory on which a program code is stored; a processor, which is connected to the memory and implements the above method when the program code is executed by the processor.

[0040] A fourth object of the present invention is to provide a computer-readable storage medium having program instructions stored thereon, wherein the program instructions implement the above method when executed.

[0041] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0042] The present invention provides an optimization configuration method for the output spectral components of a multi-spectral light source for industrial and robot vision and medical microscopic imaging illumination, and a control method for ensuring the stability of the output spectral components of the light source. The method can ensure that the output of the multi-spectral LED light source follows the set target spectrum, and suppresses the deviation of the output spectrum of the multi-channel LED light source caused by external factors; at the same time, the target spectrum is generated by a spectral optimization method, which can enhance the color contrast between the target and the background in the image, thereby improving the accuracy of the visual imaging system in recognizing, tracking and positioning the image.

[0043] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. The specific implementation of the present invention is given in detail by the following embodiments and their accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0045] Figure 1 This is a schematic diagram of the principle of the spectral composition optimization control system for a multi-spectral light source;

[0046] Figure 2 A schematic diagram of the overall control strategy for the spectral composition optimization control system of a multi-spectral light source;

[0047] Figure 3 A block diagram of the principle of controlling the output spectral composition of a multi-spectral light source;

[0048] Figure 4 The principle block diagram of the overall control system for stabilizing and enhancing image contrast;

[0049] Figure 5 This is a schematic diagram of the structure principle of the spectral composition optimization control system for a multi-spectral light source;

[0050] Figure 6 A flow chart of a method for optimizing control of spectral components of a multi-spectral light source;

[0051] Figure 7 Updated flow chart for reference spectra;

[0052] Figure 8 is a schematic diagram of an electronic device;

[0053] Fig. 9 A schematic diagram of a storage medium. DETAILED DESCRIPTION

[0054] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.

[0055] In the following description, suffixes such as "component" or "unit" used to indicate elements are used only to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "component" or "unit" may be used mixedly.

[0056] Example 1

[0057] A spectral component optimization control system for a multi-spectral light source, such as Figure 1-Figure 5 As shown, it includes a multi-channel light source chip, a constant current driver, a spectral sensor, a microprocessor for realizing spectral feedback control, a host computer application software for realizing image processing algorithm and intelligent learning control algorithm, and an image acquisition device; wherein,

[0058] The image acquisition device is used to acquire a digital image of the object being photographed;

[0059] The host computer is used to extract the color of the target object in the digital image, compare the extracted color of the target object with the set target color, update the reference spectrum according to the error between the extracted color of the target object and the set target color, and input the reference spectrum into the microprocessor as the target reference signal to be followed;

[0060] The spectrum sensor is used to collect the spectrum output by the multi-spectrum light source;

[0061] The microprocessor is used to calculate the difference between the reference spectrum and the spectrum output by the multi-spectral light source, obtain the spectrum deviation signal of each spectrum channel, input the spectrum deviation signal of each spectrum channel to the controller of the channel to calculate the dimming signal, and input the dimming signal of each spectrum channel to the dimming input end of the constant current driver of the channel;

[0062] The constant current driver is used to drive the multi-spectrum light source to output a spectrum.

[0063] In this embodiment, the multi-channel light source chip is a multi-channel LED chip (including a driver, the structure is as follows Figure 1 As shown in the figure, a multi-channel LED chip can include multiple light source channels with different spectral components, such as R (red), G (green), B (blue), C (cyan), A (amber), V (purple), W (white), etc. These different light source channels are integrated into a multi-channel LED chip.

[0064] In this embodiment, Figure 2As shown, the design of a multi-channel feedback controller for a complex nonlinear multi-spectral LED light source is separated from the design of a spectral optimization strategy for enhancing visual imaging contrast, making maximum use of the known principles and input-output data of each part to ensure the feasibility of the solution and analysis.

[0065] The principle of controlling the output spectral composition of a multi-spectrum LED light source is as follows: Figure 3 As shown. Assume that the multi-spectral light source includes m different spectral channels. The difference between the reference spectrum r and the spectrum z measured by the spectral sensor is first input into the spectral signal decoupling module to obtain the spectral deviation signal of each LED channel. The spectral deviation signal of each channel is input into the controller of the channel to calculate the dimming signal, and then the dimming signal u of each channel is input into the dimming input end of the constant current driver of the channel.

[0066] In some preferred embodiments, the spectral signal decoupling module is implemented by a least squares solution for solving the mixed spectral output and the normalized spectral power density parameters of each channel, that is,

[0067] p=S + ·z (1)

[0068] Among them, z is the mixed spectrum output by the light source, S is the matrix composed of the normalized spectral power density parameters of each channel, S+ is the pseudo-inverse matrix of S, and p is the optical power of each channel.

[0069] In some preferred embodiments, the controller of each channel is a PID controller, which calculates the dimming signal of each channel, ie, the input u, to achieve control of the optical power of each channel.

[0070] The intelligent learning optimization strategy of multi-spectral light source is: use (R, G, B) to represent the grayscale value of the three color channels of a certain pixel of the color digital camera. According to the principle of colorimetry, the RGB coordinates can be obtained by the following formula:

[0071] R=k·∫c r (λ)s(λ)z(λ)dλ (2a)

[0072] G=k·∫c g (λ)s(λ)z(λ)dλ (2b)

[0073] B=k·∫c b (λ)s(λ)z(λ)dλ (2c)

[0074] Among them, c r ,c g ,c brepresents the spectral sensitivity of the camera imaging chip, s(λ) is the spectral reflectance of the object surface, z(λ) is the power spectral density of the light source, and the coefficient k is a constant related to the total amplitude flux of the light source. For convenience, k will be ignored in the following expressions.

[0075] Use column vector C = [RGB] T Denotes color coordinates, let z = [z(λ1)…z(λ N )] T , N represents the number of spectral sampling points. The integral form of formulas (2a), (2b), and (2c) can be expressed in the following discretized matrix-vector form:

[0076] C=P·z (3)

[0077] Among them, P is a parameter matrix determined by the spectral sensitivity of the camera and the spectral reflectivity of the object surface (hereinafter referred to as the spectral system matrix), that is,

[0078]

[0079] Substituting formula (4) into formula (3), we can obtain C = W·S·z.

[0080] Let C d represents the target color, and the subscript j represents the jth iteration. The illumination spectrum and the color of the image pixel at the jth iteration are z j and C j , C j The error between the target color and the target color is e j =C d -C j , then the iterative algorithm for finding the j+1th illumination spectrum is:

[0081] z j+1 =Q·(z j +L·e j ) (5)

[0082] Where L is the learning gain matrix and Q is the weighting matrix. It is known from iterative learning control theory that the closed-loop system composed of iterative learning strategy (5) and system (3) is asymptotically stable if and only if ρ(Q·(I-LP))<1, that is, the iterative learning process converges to an optimal spectral value. Here, ρ(M) represents the spectral radius of the matrix M, that is, the maximum eigenvalue of the M matrix.

[0083] The intelligent learning optimization strategy for implementing a multi-spectral light source includes the following steps:

[0084] Measure or read the spectral sensitivity parameter matrix W of the camera from the data sheet of the digital camera;

[0085] Measure the spectral reflectance of the surfaces of several common target objects (including background and target objects) in applications, construct the parameter matrix S, and find P=WS;

[0086] Based on iterative learning control theory and system parameter matrix P, the learning gain matrix L and weight matrix Q are designed so that the spectral radius of the matrix Q·(I-LP) is less than 1.

[0087] Use software to implement the intelligent learning optimization strategy and set the target color value C that the camera needs to achieve. d ;

[0088] After the software calculation converges, the calculated optimal spectrum z=[z(λ1)…z(λ N )] T The input is given to the spectral feedback controller as the target reference signal to be followed, i.e., r = [r(λ1)…r(λ N )] T .

[0089] Through the intelligent learning optimization strategy of the above-mentioned multi-spectrum LED light source, the light source system can intelligently learn to achieve the optimal spectrum of the target image color.

[0090] The feedback controller of the spectral components of the multi-spectral light source output and the intelligent learning optimization strategy can be integrated to form an overall control strategy that can stably enhance the image contrast. With this strategy, the spectral components of the light source output can be adaptively optimized according to the color characteristics of the target object, and the optimal spectral components can be continuously and stably output. Figure 4 shown.

[0091] The overall control strategy to achieve stable enhancement of image contrast includes the following steps:

[0092] A spectral optimization control unit 1 is designed and implemented. Among them, an intelligent learning optimization strategy 11 of a multi-spectral LED light source is designed and implemented according to the method proposed in the present invention. The spectral optimization control unit collects a digital image of the illuminated object 3 through a camera 12. Preferably, the spectral optimization control unit waits for the output of the multi-spectral light source to stabilize and then collects the image of the illuminated object through a camera. Preferably, the spectral optimization control unit also includes an image processing unit for extracting the color of the target object in the image. The intelligent learning optimization strategy compares the extracted color of the target object with the set target color, and the difference between the two is used to update the reference spectrum.

[0093] The spectral feedback control unit 2 is designed and implemented. The controller 21 is designed and implemented according to the feedback control method of the spectral components output by the multi-spectral light source proposed in the present invention. The control unit collects the spectrum output by the light source in real time through the spectral sensor 22. The control unit uses the optimal spectrum provided by the spectral optimization control unit 1 as the target spectrum.

[0094] According to the method proposed in the present invention, the following can be achieved: Figure 5 The active vision system shown can be used to stably enhance the contrast of images in industrial and robotic vision, as well as in microscopic imaging. Figure 5 The arrows in the figure indicate the circuit or optical path connection, as well as the transmission direction of the parameters of the electrical signal, light, or algorithm software.

[0095] The system includes a multi-spectral LED light source, a multi-spectral feedback controller, a constant current driver, a spectral sensor, a digital camera, an image processing unit, and an intelligent learning optimization unit. Preferably, an optical system can be installed between the multi-spectral LED light source, the illuminated object, and the digital camera to change the propagation direction of the illumination light (such as collimation, focusing, etc.), microscopic imaging, magnifying images, collecting reflected light, etc. Preferably, when used for microscopic imaging, the optical system may include an objective lens, a dichroic mirror, a collimating lens, a focusing lens, a total reflector, etc.

[0096] Different from the prior art, the present invention proposes a multi-spectral feedback controller and an intelligent learning optimization strategy, and combines these two control units to achieve the function of stably enhancing the contrast of industrial and robotic visual images, as well as medical or life science imaging.

[0097] The present invention provides an optimization configuration method for the output spectral components of a multi-spectral light source for industrial and robot vision and medical microscopic imaging illumination, and a control method for ensuring the stability of the output spectral components of the light source. The method can ensure that the output of the multi-spectral LED light source follows the set target spectrum, suppressing the deviation of the output spectrum of the multi-channel LED light source due to external factors; at the same time, the target spectrum is generated by a spectrum optimization method, which can enhance the color contrast between the target and the background in the image, thereby improving the accuracy of the visual imaging system in recognizing, tracking and positioning the image.

[0098] The method provided by the invention can stably enhance the contrast of visual images and can be used in industrial and robotic vision systems, medical and life science imaging systems.

[0099] Example 2

[0100] For detailed description of the system, please refer to the corresponding description in the above system embodiment, which will not be repeated here. The spectral component optimization control system of the multi-spectral light source provided in Example 1 corresponds to the spectral component optimization control method of the multi-spectral light source for industrial and robot vision and medical or life science imaging lighting, which realizes the optimization of the spectral component output by the lighting light source to enhance the overall control of the contrast of the imaging visual image, such as Figure 6 As shown, the method comprises the following steps:

[0101] S1. Acquire a digital image of the object being photographed; specifically, Figure 4 As shown, a digital image of the illuminated object is collected by a camera. Preferably, the spectrum optimization control unit waits for the output of the multi-spectral light source to stabilize and then collects the image of the illuminated object by a camera.

[0102] S2, extracting the color of the target object in the digital image; specifically, Figure 4 As shown, the spectrum optimization control unit also includes an image processing module for extracting the color of the target object in the image. S3, comparing the extracted color of the target object with the set target color;

[0103] S4, updating the reference spectrum according to the error between the extracted color of the target object and the set target color;

[0104] In some optional embodiments, such as Figure 7 As shown, the step of updating the reference spectrum by the error between the extracted color of the target object and the set target color includes:

[0105] S41, obtaining a spectral sensitivity parameter matrix of an image acquisition device; specifically, the spectral sensitivity parameter matrix W of a camera may be measured or read from a data manual of the digital camera.

[0106] S42, obtaining the spectral reflectance of the surface of the target object and constructing a parameter matrix; specifically, measuring the spectral reflectance of the surfaces of several target objects (including background and target objects) commonly used in applications, and constructing the parameter matrix S.

[0107] S43, calculating a system parameter matrix using the spectral sensitivity parameter matrix and the parameter matrix; specifically, the calculation formula of the system parameter matrix is:

[0108] P=WS

[0109] Among them, P is the system parameter matrix, S is the parameter matrix, and W is the spectral sensitivity parameter matrix.

[0110] S44. Based on iterative learning control theory and the system parameter matrix P, a learning gain matrix L and a weighting matrix Q are designed so that the iterative learning process converges to the optimal spectral value, specifically, the spectral radius of the matrix Q·(I-LP) is less than 1.

[0111] In this embodiment, (R, G, B) is used to represent the grayscale values ​​of the three color channels of a certain pixel of a color digital camera. According to the principle of colorimetry, the RGB coordinates can be obtained by the following formula:

[0112] R=k·∫c r (λ)s(λ)z(λ)dλ (2a)

[0113] G=k·∫c g (λ)s(λ)z(λ)dλ (2b)

[0114] B=k·∫c b (λ)s(λ)z(λ)dλ (2c)

[0115] Among them, c r ,c g ,c b represents the spectral sensitivity of the camera imaging chip, s(λ) is the spectral reflectance of the object surface, z(λ) is the power spectral density of the light source, and the coefficient k is a constant related to the total amplitude flux of the light source. For convenience, k will be ignored in the following expressions.

[0116] Use column vector C = [RGB] T Denotes color coordinates, let z = [z(λ1)…z(λ N )] T , N represents the number of spectral sampling points. The integral form of formulas (2a), (2b), and (2c) can be expressed in the following discretized matrix-vector form:

[0117] C=P·z (3)

[0118] Among them, P is a parameter matrix determined by the spectral sensitivity of the camera and the spectral reflectivity of the object surface (hereinafter referred to as the spectral system matrix), that is,

[0119]

[0120] Substituting formula (4) into formula (3), we can obtain C = W·S·z.

[0121] Let C d represents the target color, and the subscript j represents the jth iteration. The illumination spectrum and the color of the image pixel at the jth iteration are z j and C j , C jThe error between the target color and the target color is e j =C d -C j , then the iterative algorithm for finding the j+1th illumination spectrum is:

[0122] z j+1 =Q·(z j +L·e j ) (5)

[0123] Where L is the learning gain matrix and Q is the weighting matrix. It is known from iterative learning control theory that the closed-loop system composed of iterative learning strategy (5) and system (3) is asymptotically stable if and only if ρ(Q·(I-LP))<1, that is, the iterative learning process converges to an optimal spectral value. Here, ρ(M) represents the spectral radius of the matrix M, that is, the maximum eigenvalue of the M matrix.

[0124] In this embodiment, the intelligent learning optimization strategy is implemented by software, and the target color value C to be achieved by the camera is set. d .

[0125] S45, after the software calculation converges, the optimal spectrum value z=[z(λ1)…z(λ N )] T The input spectrum feedback controller is used as the target reference signal to be followed, i.e., r = [r(λ1)…r(λ N )] T .

[0126] S5, calculating the difference between the reference spectrum and the spectrum output by the multi-spectral light source to obtain a spectrum deviation signal for each spectral channel; specifically, Figure 4 As shown, the spectrum output by the multi-spectral light source is the spectrum output by the light source collected in real time by the spectral sensor.

[0127] S6, calculating the dimming signal of the corresponding channel through the spectral deviation signal of each spectral channel;

[0128] S7. Drive the multi-spectrum light source to output a spectrum through the dimming signal of each spectral channel.

[0129] like Figure 3 As shown, the difference between the reference spectrum r and the spectrum z measured by the spectral sensor is first input into the spectral signal decoupling module to obtain the spectral deviation signal of each LED channel. The spectral deviation signal of each channel is input into the controller of the channel to calculate the dimming signal, and then the dimming signal u of each channel is input into the dimming input end of the constant current driver of the channel.

[0130] Preferably, the spectral signal decoupling module is implemented by a least squares solution for solving the mixed spectral output and the normalized spectral power density parameters of each channel, that is,

[0131] p=S + ·z (1)

[0132] Among them, z is the mixed spectrum output by the light source, S is the matrix composed of the normalized spectral power density parameters of each channel, S+ is the pseudo-inverse matrix of S, and p is the optical power of each channel.

[0133] Preferably, the controller of each channel is a PID controller, which calculates the dimming signal of each channel, ie, input u, to achieve control of the optical power of each channel.

[0134] The present invention provides an optimization configuration method for the output spectral components of a multi-spectral light source for industrial and robot vision and medical microscopic imaging illumination, and a control method for ensuring the stability of the output spectral components of the light source. The method can ensure that the output of the multi-spectral LED light source follows the set target spectrum, suppressing the deviation of the output spectrum of the multi-channel LED light source due to external factors; at the same time, the target spectrum is generated by a spectrum optimization method, which can enhance the color contrast between the target and the background in the image, thereby improving the accuracy of the visual imaging system in recognizing, tracking and positioning the image.

[0135] The method provided by the invention can stably enhance the contrast of visual images and can be used in industrial and robotic vision systems, medical and life science imaging systems.

[0136] Example 3

[0137] An electronic device, such as Figure 8 As shown, it includes: a memory on which program codes are stored; a processor connected to the memory, and when the program codes are executed by the processor, a method for optimizing the spectral components of a multi-spectral light source is implemented. For a detailed description of the method, reference can be made to the corresponding description in the above method embodiment, which will not be repeated here.

[0138] Example 4

[0139] A computer readable storage medium such as Fig. 9 As shown, program instructions are stored thereon, and when the program instructions are executed, a method for optimizing the spectral components of a multi-spectral light source is implemented. For a detailed description of the method, reference may be made to the corresponding description in the above method embodiment, and no further description is given here.

[0140] The number of devices and processing scales described here are used to simplify the description of the present invention. Applications, modifications and variations of the present invention will be obvious to those skilled in the art.

[0141] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.

[0142] The apparatus, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, electronic device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device and non-volatile computer storage medium will not be repeated here.

[0143] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software units for implementing the method and structures within the hardware component.

[0144] The systems, devices or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions in various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or more software and / or hardware.

[0145] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0146] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0149] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0150] The specification may be described in the general context of computer-executable instructions executed by a computer, such as program units. Generally, program units include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program units may be located in local and remote computer storage media, including storage devices.

[0151] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0152] The above are only embodiments of this specification and are not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of one or more embodiments of this specification.

Claims

1. A method for optimizing and controlling spectral components of a multi-spectral light source, characterized in that: The following steps are involved: Acquire a digital image of the captured object; Extracting the color of the target object in the digital image; Compare the color of the extracted target object with the set target color; Update the reference spectrum by the error between the extracted color of the target object and the set target color; Calculating the difference between the reference spectrum and the spectrum output by the multi-spectral light source to obtain a spectrum deviation signal for each spectral channel; Calculate the dimming signal of the corresponding channel through the spectral deviation signal of each spectral channel; The multi-spectrum light source is driven to output a spectrum through a dimming signal of each spectral channel.

2. The method for optimizing the spectral components of a multi-spectral light source according to claim 1, characterized in that: The step of updating the reference spectrum by using the error between the extracted color of the target object and the set target color comprises: Obtaining a spectral sensitivity parameter matrix of an image acquisition device; Obtain the spectral reflectance of the target object surface and construct a parameter matrix; Calculating a system parameter matrix using the spectral sensitivity parameter matrix and the parameter matrix; Based on iterative learning control theory and the system parameter matrix, a learning gain matrix and a weighting matrix are designed so that the iterative learning process converges to an optimal spectral value; The optimal spectrum value is input into the spectrum feedback controller as a target reference signal to be followed.

3. The method for optimizing the spectral components of a multi-spectral light source according to claim 2, characterized in that: The calculation formula of the system parameter matrix is: P=WS Among them, P is the system parameter matrix, S is the parameter matrix, and W is the spectral sensitivity parameter matrix.

4. The method for optimizing the spectral components of a multi-spectral light source according to claim 3, characterized in that: The j+1th illumination spectrum iteration formula in the step of designing the learning gain matrix and the weighting matrix based on the iterative learning control theory and the system parameter matrix is: z j+1 =Q·(z j +L·e j ) e j =C d -C j Among them, L is the learning gain matrix, Q is the weighting matrix, z j and C j are the illumination spectrum and the color of the image pixel at the jth iteration, respectively, and e j C j With target color C d The difference between .

5. The method for optimizing and controlling spectral components of a multi-spectral light source according to claim 4, characterized in that: The method of making the iterative learning process converge to the optimal spectrum value specifically means that the spectrum radius of the matrix Q·(I-LP) is less than 1.

6. The method for optimizing and controlling spectral components of a multi-spectral light source according to claim 1, characterized in that: The calculation of the difference between the reference spectrum and the spectrum output by the multi-spectral light source is specifically achieved by solving the least squares solution of the mixed spectrum output and the normalized spectral power density parameters of each channel, and the formula is: p=S + ·z Among them, z is the mixed spectrum output by the light source, S is a matrix composed of the normalized spectral power density parameters of each spectral channel, S+ is the pseudo-inverse matrix of S, and p is the optical power of each channel.

7. A spectral component optimization control system for a multi-spectral light source, implementing the method according to any one of claims 1 to 6, characterized in that: It includes a multi-channel light source chip, a constant current driver, a spectrum sensor, a microprocessor, a host computer, and an image acquisition device; among them, The image acquisition device is used to acquire a digital image of the object being photographed; The host computer is used to extract the color of the target object in the digital image, compare the extracted color of the target object with the set target color, update the reference spectrum according to the error between the extracted color of the target object and the set target color, and input the reference spectrum into the microprocessor as the target reference signal to be followed; The spectrum sensor is used to collect the spectrum output by the multi-spectrum light source; The microprocessor is used to calculate the difference between the reference spectrum and the spectrum output by the multi-spectral light source, obtain the spectrum deviation signal of each spectrum channel, input the spectrum deviation signal of each spectrum channel to the controller of the channel to calculate the dimming signal, and input the dimming signal of each spectrum channel to the dimming input end of the constant current driver of the channel; The constant current driver is used to drive the multi-channel light source chip to output a spectrum.

8. The spectral component optimization control system of a multi-spectral light source as claimed in claim 7, characterized in that: An optical system is installed between the multi-channel light source chip, the spectrum sensor, and the image acquisition device, and the optical system is used to change the propagation direction of the illumination light, perform microscopic imaging, magnify the image, and collect reflected light.

9. An electronic device, characterized in that: include: A memory having program code stored therein; A processor is connected to the memory, and when the program code is executed by the processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed, the method according to any one of claims 1 to 6 is implemented.