Light source color self-adaptive adjusting method and device, circuit board processing equipment and medium
By acquiring multi-channel images of circuit board processing equipment and analyzing the maximum density grayscale value, the color of the light source is automatically adjusted, solving the problems of inconsistent and low precision in light source color adjustment in existing technologies, and realizing efficient and automated matching of light source color in circuit board processing equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU VEGA TECH CO LTD
- Filing Date
- 2021-10-29
- Publication Date
- 2026-06-16
AI Technical Summary
Existing monochromatic or tri-color light source systems have difficulty automatically adjusting the light source color to match the target object color during circuit board processing, and the adjustment accuracy is low, failing to meet the color variation requirements of different board materials.
By acquiring multi-channel images of the target object, analyzing the maximum density grayscale value of each channel, and adjusting the light source color according to these values to match the light source color with the target object, automated and real-time light source color adjustment is achieved using computer-readable storage media and circuit board processing equipment.
It improves the accuracy and automation of light source color adjustment, ensures a high degree of consistency between the light source color and the target object color, and achieves real-time and high-efficiency light source color adjustment.
Smart Images

Figure CN116091794B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of light source adjustment technology, and in particular to a method, device, circuit board processing equipment, and medium for adaptive adjustment of light source color. Background Technology
[0002] Equipment used for circuit board processing, such as drilling rigs or milling machines, can be equipped with CCD (Charge Coupled Device) cameras. Since the colors that the human eye can see are electromagnetic waves of a specific wavelength range reflected by objects, for this type of circuit board processing equipment, when processing different colored boards, different lighting conditions are required from the light source so that the color of the light source is as consistent as possible with the color of the main target image area when processing different circuit boards. This results in a high contrast between the target image and its surrounding background area, or a high brightness in the overall image.
[0003] In related technologies, equipment manufacturers typically use monochromatic light sources directly, or mixed light sources with RGB three channels, to better adapt to changing industrial environments and raw materials. However, existing monochromatic light source or tri-color light source solutions have certain drawbacks. For example, for systems with only a single monochromatic light source, the light source needs to be manually replaced when the color of the substrate changes. Similarly, for current tri-color light source systems with color matching capabilities, when the substrate color changes, not only is manual adjustment of the light source's color ratio necessary, but the accuracy is also low, failing to ensure a high degree of consistency between the adjusted light source color and the subject color. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, the first objective of this invention is to propose a method for adaptive adjustment of light source color. This method not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of light source color adjustment, enabling real-time adjustment.
[0005] A second objective of this invention is to provide a computer-readable storage medium.
[0006] The third objective of this invention is to provide a circuit board processing device.
[0007] The fourth objective of this invention is to provide a light source color adaptive adjustment device.
[0008] To achieve the above objectives, a first aspect of the present invention proposes a light source color adaptive adjustment method, the method comprising: acquiring a multi-channel image of a target object; acquiring the maximum density gray value corresponding to each channel in the multi-channel image; and adjusting the color of the light source according to the maximum density gray value corresponding to each channel so that the color of the light source matches the target object.
[0009] The adaptive light source color adjustment method according to embodiments of the present invention acquires a multi-channel image of the target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel, so that the color of the light source matches the color of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of the light source color adjustment, making the adjustment real-time.
[0010] According to one embodiment of the present invention, obtaining the maximum density gray value corresponding to each channel in a multi-channel image includes: obtaining a grayscale image of each channel; obtaining grayscale distribution density data corresponding to each channel based on the grayscale image; and obtaining the maximum density gray value corresponding to each channel based on the grayscale distribution density data.
[0011] According to one embodiment of the present invention, obtaining a grayscale image of each channel includes: obtaining the pixel value of each channel corresponding to each pixel in a multi-channel image; and obtaining a grayscale image of each channel based on the pixel value of each channel corresponding to each pixel.
[0012] According to one embodiment of the present invention, obtaining grayscale distribution density data corresponding to each channel based on a grayscale image includes: obtaining the number of pixels corresponding to each grayscale level for each channel based on the grayscale image; and obtaining grayscale distribution density data corresponding to each channel based on the number of pixels corresponding to each grayscale level.
[0013] According to one embodiment of the present invention, the grayscale distribution density data corresponding to each channel is expressed in any one of histogram, line chart, or pie chart.
[0014] According to one embodiment of the present invention, obtaining the maximum density gray value corresponding to each channel based on gray-scale distribution density data includes: taking the gray level with the most pixels among all gray levels corresponding to each channel as the maximum density gray value corresponding to the corresponding channel.
[0015] According to one embodiment of the present invention, adjusting the color of a light source based on the maximum density grayscale value corresponding to each channel includes: obtaining the brightness value of the corresponding channel of the light source based on the maximum density grayscale value corresponding to each channel; and adjusting the color of the light source based on the brightness value.
[0016] To achieve the above objectives, a second aspect of the present invention provides a computer-readable storage medium storing a light source color adaptive adjustment program thereon, which, when executed by a processor, implements the above-described light source color adaptive adjustment method.
[0017] According to embodiments of the present invention, a computer-readable storage medium acquires a multi-channel image of a target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of a light source based on the maximum density grayscale value corresponding to each channel to match the color of the light source with that of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of the light source color adjustment, enabling real-time adjustment.
[0018] To achieve the above objectives, a third aspect of the present invention provides a circuit board processing device, which includes: a memory, a processor, and a light source color adaptive adjustment program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described light source color adaptive adjustment method.
[0019] According to an embodiment of the present invention, the circuit board processing equipment acquires a multi-channel image of a target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel, so that the color of the light source matches the color of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation level of the light source color adjustment, making the adjustment real-time.
[0020] To achieve the above objectives, a fourth aspect of the present invention provides a light source color adaptive adjustment device, which includes: an acquisition module for acquiring a multi-channel image of a target object; an analysis module for acquiring the maximum density gray value corresponding to each channel in the multi-channel image; and a control module for adjusting the color of the light source according to the maximum density gray value corresponding to each channel, so that the color of the light source matches the target object.
[0021] According to an embodiment of the present invention, the adaptive color adjustment device for a light source acquires a multi-channel image of a target object through an acquisition module, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image through an analysis module, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel through a control module, so that the color of the light source matches the color of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of the light source color adjustment, making the adjustment real-time.
[0022] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] Figure 1 This is a flowchart of a light source color adaptive adjustment method according to an embodiment of the present invention;
[0024] Figure 2 This is a flowchart illustrating the process of obtaining the maximum density grayscale value for each channel in a multi-channel image according to an embodiment of the present invention.
[0025] Figure 3 This is a structural block diagram of a circuit board processing apparatus according to an embodiment of the present invention;
[0026] Figure 4 This is a structural block diagram of a light source color adaptive adjustment device according to an embodiment of the present invention. Detailed Implementation
[0027] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0028] The following description, with reference to the accompanying drawings, describes the light source color adaptive adjustment method, light source color adaptive adjustment device, circuit board processing equipment, and computer-readable storage medium provided in the embodiments of the present invention.
[0029] Figure 1 The flowchart below shows a light source color adaptive adjustment method according to an embodiment of the present invention. Figure 1 As shown, the adaptive color adjustment method for the light source may include the following steps:
[0030] Step S101: Acquire a multi-channel image of the target object.
[0031] Specifically, equipment used for circuit board processing, such as drilling rigs or milling machines, can be equipped with CCD cameras. For this type of circuit board processing equipment, there is a software system that controls the camera hardware system, hereinafter referred to as camera software. This camera software can control the camera hardware to acquire a frame of an image of the target object in a soft-trigger manner, and perform image preprocessing operations such as noise reduction, edge sharpening, and image flipping, and then control the camera hardware to send back the image frame data. It should be noted that the acquired image of the target object is a color image, i.e., a multi-channel image. Specifically, each pixel of this multi-channel image is composed of three colors: R (Red), G (Green), and B (Blue). The individual R, G, and B images are each a single-channel image, i.e., a grayscale image; that is, the multi-channel image is an RGB three-channel image. It is understood that this application does not impose specific limitations on multi-channel images. For example, a multi-channel image can also include four channels, including, in addition to the red, green, and blue color channels, a transparency alpha channel, the specific channel of which depends on the image file format.
[0032] Step S102: Obtain the maximum density gray value corresponding to each channel in the multi-channel image.
[0033] Specifically, each pixel in a multi-channel image consists of three components: R, G, and B. The brightness of R, G, and B can be represented by different grayscale values. Within each channel, all pixels can be divided into grayscale levels. The number of pixels corresponding to each grayscale level is the grayscale distribution density, also known as the probability density. The maximum value corresponds to the maximum density grayscale value. In a specific example, a single pixel in a multi-channel image can be represented by 24 bits in a computer. The first 8 bits represent the R channel, the middle 8 bits represent the G channel, and the last 8 bits represent the B channel (of course, the RGB arrangement may also be different; this discussion only considers one case). That is, the brightness of each channel can be represented by 256 (2^8) grayscale levels from 0 to 255. From this, the grayscale distribution density data for each channel of the multi-channel image can be obtained, and the grayscale value with the most pixels corresponding to each channel, i.e., the maximum density grayscale value, can be selected. The data format of the maximum density gray value can be represented as R:###, G:### or B:###, where ### is any value in the range of [0-255].
[0034] Step S103: Adjust the color of the light source according to the maximum density gray value corresponding to each channel so that the color of the light source matches the target object.
[0035] Optionally, adjusting the color of the light source according to the maximum density grayscale value corresponding to each channel includes: obtaining the brightness value of the corresponding channel of the light source according to the maximum density grayscale value corresponding to each channel; and adjusting the color of the light source according to the brightness value.
[0036] Specifically, since the maximum density grayscale value is the grayscale value with the highest distribution probability for the corresponding channel, when adjusting the color of the light source based on the maximum density grayscale value corresponding to each channel, the color of the light source matches the target object to a high degree. Furthermore, the brightness value of the corresponding channel of the light source can be obtained first based on the maximum density grayscale value for each channel, and then the color of the light source can be adjusted based on the brightness value. In a specific example, one end of the light source controller can be connected to the USB interface of an IPC (Industrial Personal Computer) via an RS232-USB (Recommended Standard 232-Universal Serial Bus) adapter cable, and the other end is connected to the light source via a multi-channel interface on the panel, serving as a relay control function. The camera software sends byte data to the light source controller via a serial port according to relevant communication protocols. The light source controller is connected to the three-color light source, and the light source controller interprets the brightness values corresponding to the maximum density grayscale values of the R, G, and B channels respectively, thereby adjusting the color of the three-color light source to match the color of the light source with the target object. For example, based on the maximum density grayscale values corresponding to the three channels, the brightness values of the R channel, G channel, and B channel in the three-color light source are obtained as 255, 255, and 0, respectively, and the final mixed light source color is yellow.
[0037] The adaptive color adjustment method for light sources according to embodiments of the present invention, on the one hand, automatically analyzes multi-channel images captured by a camera, calculates the maximum density grayscale values of the three single channels in the RGB space, outputs the three primary color ratios, and automatically sets the brightness values of the three independent color channels according to these ratios. This maximizes the position of the light source's spectrum within the object's reflectance spectrum, thereby enhancing the overall brightness of the image or helping to achieve high contrast between the target image and its surrounding background. Simultaneously, since each of the RGB three channels is accurate to 256 grayscale levels, compared to the subjective judgment of the target image color and adjustment of the controller brightness value during manual adjustment, this method effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color. On the other hand, when the color of the subject changes, automatically adjusting the color ratio of the system's light source effectively improves the automation level of light source color adjustment, enabling real-time adjustment.
[0038] Figure 2 A flowchart for obtaining the maximum density grayscale value corresponding to each channel in a multi-channel image according to an embodiment of the present invention is provided, with reference to... Figure 2 As shown, obtaining the maximum density gray value corresponding to each channel in a multi-channel image may include the following steps:
[0039] Step S201: Obtain the grayscale image for each channel.
[0040] Specifically, each pixel in a multi-channel image is composed of R, G, and B components. The brightness of R, G, and B can be described by different gray levels. Furthermore, the RGB channels of a color image can be extracted separately using programming techniques to form three corresponding grayscale images. It's important to note that grayscale images differ from color images. In a color image, a pixel typically requires several values to represent it, while in a grayscale image, a pixel only needs one value (brightness, also known as gray level). The most common grayscale level is 256, with a value range of [0, 255]. If a pixel value = 0, it represents a pure black point; if a pixel value = 255, it represents a pure white point.
[0041] Optionally, obtaining the grayscale image for each channel includes: obtaining the pixel value of each channel corresponding to each pixel in the multi-channel image; and obtaining the grayscale image for each channel based on the pixel value of each channel corresponding to each pixel. In other words, the output of the acquisition module can be used as input, and the pixel value of each channel corresponding to each pixel can be obtained through programming, and the grayscale image for each channel can be obtained based on these pixel values. The programming methods include, but are not limited to, the relevant APIs (Application Programming Interfaces) in OpenCV (Open Source Computer Vision Library).
[0042] Step S202: Obtain the grayscale distribution density data corresponding to each channel based on the grayscale image.
[0043] Furthermore, the grayscale distribution density data corresponding to each channel is obtained based on the grayscale image, including: obtaining the number of pixels corresponding to each gray level of each channel based on the grayscale image; and obtaining the grayscale distribution density data corresponding to each channel based on the number of pixels corresponding to each gray level.
[0044] In other words, after obtaining the grayscale images of three channels corresponding to a multi-channel image, these three grayscale images can be passed as parameters to the relevant API, i.e., a single-channel grayscale image is used as input to the API. All pixels in the input grayscale image are divided into grayscale levels from 0 to 255, with each grayscale level having a corresponding number of pixels. Based on the number of pixels corresponding to each grayscale level, the grayscale distribution density data for each channel can be obtained. The API outputs this grayscale distribution density data for each channel, which can be expressed as a histogram, line chart, or pie chart.
[0045] Step S203: Obtain the maximum density gray value corresponding to each channel based on the grayscale distribution density data.
[0046] Furthermore, the maximum density gray value corresponding to each channel is obtained based on the gray-level distribution density data, including: taking the gray level with the most pixels among all gray levels corresponding to each channel as the maximum density gray value corresponding to the corresponding channel.
[0047] In other words, obtaining the number of pixels corresponding to each gray level in each channel yields the gray-level distribution density data for each channel. This gray-level distribution density data can then be used to obtain the maximum density gray value for each channel, and the color of the light source can be adjusted based on this maximum density gray value to match the target object. Optionally, the gray level with the most pixels among all gray levels for each channel can be used as the maximum density gray value for that channel. In a specific example, the gray-level distribution density data for each channel can be sorted to obtain the gray level with the most pixels, which is the maximum density gray value.
[0048] In summary, the adaptive light source color adjustment method according to embodiments of the present invention acquires a multi-channel image of the target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel, so that the color of the light source matches the color of the target object. Therefore, it not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also improves the automation level of the light source color adjustment, making the adjustment real-time.
[0049] In one embodiment, a computer-readable storage medium is provided that stores a light source color adaptive adjustment program thereon, which, when executed by a processor, implements the above-described light source color adaptive adjustment method.
[0050] According to embodiments of the present invention, a computer-readable storage medium acquires a multi-channel image of a target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of a light source based on the maximum density grayscale value corresponding to each channel to match the color of the light source with that of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of the light source color adjustment, enabling real-time adjustment.
[0051] Figure 3 This is a structural block diagram of a circuit board processing apparatus according to an embodiment of the present invention, with reference to... Figure 3 As shown, the circuit board processing equipment 300 includes: a memory 301, a processor 302, and a light source color adaptive adjustment program stored in the memory 301 and run on the processor 302. When the processor 302 executes the program, it implements the above-mentioned light source color adaptive adjustment method.
[0052] According to an embodiment of the present invention, the circuit board processing equipment acquires a multi-channel image of a target object, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel, so that the color of the light source matches the color of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation level of the light source color adjustment, making the adjustment real-time.
[0053] Figure 4 This is a structural block diagram of a light source color adaptive adjustment device according to an embodiment of the present invention, with reference to... Figure 4 As shown, the adaptive color adjustment device for the light source includes: an acquisition module 401 for acquiring a multi-channel image of the target object; an analysis module 402 for acquiring the maximum density gray value corresponding to each channel in the multi-channel image; and a control module 403 for adjusting the color of the light source according to the maximum density gray value corresponding to each channel, so that the color of the light source matches the target object.
[0054] In one embodiment, the analysis module 402 is specifically used to: obtain the pixel value of each channel corresponding to each pixel in the multi-channel image; and obtain the grayscale image of each channel based on the pixel value of each channel corresponding to each pixel.
[0055] In one embodiment, the analysis module 402 is specifically used to: obtain a grayscale image of each channel; obtain grayscale distribution density data corresponding to each channel based on the grayscale image; and obtain the maximum density grayscale value corresponding to each channel based on the grayscale distribution density data.
[0056] In one embodiment, the analysis module 402 is specifically used to: obtain the number of pixels corresponding to each gray level of each channel based on the grayscale image; and obtain the grayscale distribution density data corresponding to each channel based on the number of pixels corresponding to each gray level.
[0057] Furthermore, the analysis module 402 is specifically used to: take the gray level with the most pixels among all gray levels corresponding to each channel as the maximum density gray value corresponding to the corresponding channel.
[0058] Optionally, the grayscale distribution density data corresponding to each channel can be expressed in any of the following formats: histogram, line chart, or pie chart.
[0059] In one embodiment, the control module 403 is specifically used to: obtain the brightness value of the corresponding channel of the light source according to the maximum density gray value of each channel; and adjust the color of the light source according to the brightness value.
[0060] It should be noted that for the description of the adaptive adjustment device for light source color in this application, please refer to the description of the adaptive adjustment method for light source color in this application, and will not be repeated here.
[0061] According to an embodiment of the present invention, the adaptive color adjustment device for a light source acquires a multi-channel image of a target object through an acquisition module, obtains the maximum density grayscale value corresponding to each channel in the multi-channel image through an analysis module, and adjusts the color of the light source according to the maximum density grayscale value corresponding to each channel through a control module, so that the color of the light source matches the color of the target object. This not only effectively improves accuracy and ensures a high degree of consistency between the adjusted light source color and the target object color, but also enhances the automation of the light source color adjustment, making the adjustment real-time.
[0062] It should be understood that, although Figure 1-2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0063] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0064] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0065] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0066] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0067] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0068] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for adaptive adjustment of light source color, characterized in that, The method includes: Acquire multi-channel images of the target object; Obtain the maximum density gray value corresponding to each channel in the multi-channel image; The color of the light source is adjusted according to the maximum density gray value corresponding to each channel so that the color of the light source matches the target object. The step of obtaining the maximum density gray value corresponding to each channel in the multi-channel image includes: Obtain the grayscale image of each channel; The grayscale distribution density data corresponding to each channel is obtained based on the grayscale image; The maximum density gray value corresponding to each channel is obtained based on the grayscale distribution density data.
2. The adaptive color adjustment method for light sources according to claim 1, characterized in that, The process of obtaining the grayscale image for each channel includes: Obtain the pixel value of each channel corresponding to each pixel in the multi-channel image; The grayscale image of each channel is obtained based on the pixel value of each channel corresponding to each pixel.
3. The adaptive color adjustment method for light sources according to claim 1, characterized in that, The step of obtaining the grayscale distribution density data corresponding to each channel based on the grayscale image includes: The number of pixels corresponding to each gray level of each channel is obtained based on the grayscale image. The grayscale distribution density data corresponding to each channel is obtained based on the number of pixels corresponding to each grayscale level.
4. The adaptive color adjustment method for light sources according to claim 3, characterized in that, The grayscale distribution density data corresponding to each channel is expressed in any one of the following formats: histogram, line chart, or pie chart.
5. The adaptive adjustment method for light source color according to claim 3, characterized in that, The step of obtaining the maximum density gray value corresponding to each channel based on the grayscale distribution density data includes: The gray level with the most pixels among all gray levels corresponding to each channel is taken as the maximum density gray value of the corresponding channel.
6. The light source color adaptive adjustment method according to any one of claims 1-5, characterized in that, The step of adjusting the color of the light source according to the maximum density grayscale value corresponding to each channel includes: The brightness value of the corresponding channel of the light source is obtained based on the maximum density gray value corresponding to each channel; The color of the light source is adjusted according to the brightness value.
7. A computer-readable storage medium, characterized in that, It stores a light source color adaptive adjustment program, which, when executed by the processor, implements the light source color adaptive adjustment method according to any one of claims 1-6.
8. A circuit board processing equipment, characterized in that, include: The system includes a memory, a processor, and a light source color adaptive adjustment program stored in the memory and executable on the processor. When the processor executes the program, it implements the light source color adaptive adjustment method according to any one of claims 1-6.
9. A light source color adaptive adjustment device, characterized in that, The device includes: The acquisition module is used to acquire multi-channel images of the target object; The analysis module is used to obtain the maximum density gray value corresponding to each channel in the multi-channel image; The control module is used to adjust the color of the light source according to the maximum density gray value corresponding to each channel, so that the color of the light source matches the target object; The analysis module is specifically used for: acquiring a grayscale image of each channel; acquiring grayscale distribution density data corresponding to each channel based on the grayscale image; and acquiring the maximum density grayscale value corresponding to each channel based on the grayscale distribution density data.