A method for testing the color of LED emission.
By automatically identifying the color of LED lights using cameras and color analysis software, this technology solves the problems of error-prone and inefficient manual testing and high cost of automated testing in existing technologies, achieving efficient and low-cost LED color testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI MAXDONE ELECTRONICS TECH CO LTD
- Filing Date
- 2021-12-21
- Publication Date
- 2026-05-26
AI Technical Summary
Existing LED color testing methods suffer from problems such as errors and low efficiency in manual testing, and excessively high costs that many manufacturers cannot afford in automated testing.
Using a camera and color analysis software, the system captures images of the LED lights illuminating a test background. The color analysis software then automatically identifies the color of the LED lights and compares it with a standard color to determine whether the LEDs pass or fail.
It achieves efficient LED color testing without human intervention, reduces system costs, is suitable for various LED manufacturers, and avoids human error.
Smart Images

Figure CN116309887B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of LED lamp manufacturing technology, specifically a method for testing the color of LED light emission. Background Technology
[0002] Before LED lights leave the factory, they undergo numerous tests to confirm they meet factory requirements. Among these tests, colored LED lights need to be tested to ensure the color they produce when illuminated matches the specified color. Traditional LED color testing primarily employs two methods.
[0003] 1. Human eye recognition: This method relies on the operator's eyes to observe and judge whether the LED color and brightness are correct. The advantage of this method is its simplicity, but the disadvantage is that it is completely dependent on human judgment. Different results will occur depending on the technician's ability, or after working for a long time, the technician will inevitably make errors, which will lead to the inability to control product quality. At the same time, it is not efficient to test entirely by human labor.
[0004] 2. Professional LED Automated Tester: This method involves guiding light from the LED via fiber optic cable into an automated LED tester. The tester analyzes the light and typically returns color and brightness values in various formats, such as RGB, Hue, saturation, brightness, and xy values. These values are then compared with testing standards to confirm product quality. While this method offers high accuracy and automation, the need for specialized equipment makes it costly and not suitable for all manufacturers. Summary of the Invention
[0005] To address the problems of error-prone and inefficient manual testing and excessively high cost of automated testing in LED color testing, which many manufacturers cannot afford, this invention provides a method for testing the color of LED light emission. This method can automatically complete the color testing of LED lights, while having a lower overall cost and being suitable for more application scenarios.
[0006] The technical solution of the present invention is as follows: a method for testing the color of LED emission, characterized in that it includes the following steps:
[0007] S1: Install a test background board and a detection camera, wherein the detection camera is communicatively connected to a server; color analysis software is installed in the server;
[0008] The test background is set within the shooting area of the detection camera;
[0009] The test background board includes: an LED mounting base and an analysis area;
[0010] The analysis area is located around the LED mounting base, and the LED light color collected in the analysis area best represents the color of the LED light under test after it is lit.
[0011] S2: Install the LED to be tested into the LED mounting bracket;
[0012] The standard color corresponding to the LED to be tested is pre-stored in the server;
[0013] S3: Power on the LED to be tested. After the LED lights up, take a picture of the test background board and the LED to be tested through the detection camera to obtain an image to be analyzed.
[0014] S4: Import the image to be analyzed into the server;
[0015] S5: Locate the region where the analysis area is located in the image to be analyzed, obtain all image data within the analysis area, and record it as the color data to be analyzed;
[0016] S6: Based on the color analysis software, identify the color of the color data to be analyzed, and determine the color of the color data to be analyzed, which is the emission color of the LED to be tested;
[0017] S7: Compare the emission color of the LED under test with the standard color of the LED under test to determine whether the color of the LED under test is qualified.
[0018] Its further features are:
[0019] The color analysis software is LabVIEW software;
[0020] The test background board also includes a test reference pattern, which does not coincide with the positions of the LED mounting base and the analysis area;
[0021] Perform image recognition on the image to be analyzed, find the position of the test reference pattern in the image to be analyzed, and record it as the reference position;
[0022] A coordinate system is established with the center point of the reference position as the origin; the position coordinates of the analysis area in the coordinate system are stored in the server in advance.
[0023] Before implementing step S5, perform the following steps:
[0024] a1: Find the origin based on the reference pattern;
[0025] a2: Locate the analysis region using the coordinates of the origin and the analysis region;
[0026] When the number of analysis areas corresponding to the same LED mounting base on the test background board is greater than 1, each analysis area corresponds to a different specification of the LED to be tested; the position coordinates of each analysis area are pre-stored in the server;
[0027] When multiple LEDs of different colors are tested simultaneously using the same test background board, the analysis area is set at the overlapping position of the light-emitting areas of the LEDs under test; the standard color in step S7 is set as the color obtained by overlapping the standard colors of multiple LEDs under test.
[0028] The method for determining the analysis region includes the following steps:
[0029] b1: Install the standard LED light that meets the factory specifications on the LED mounting bracket;
[0030] b2: Store the standard color corresponding to the standard LED light in the server;
[0031] b2: After the LED is turned on, take a picture using the detection camera to obtain a test image;
[0032] b3: The test image is transmitted to the server, and the color analysis software is used to analyze the test image as a whole to find the position that best matches the standard color of the standard LED light, which is recorded as the analysis area corresponding to the standard LED light specification;
[0033] b4: Determine the coordinate position of the analysis area and store the coordinate position and the corresponding LED light specifications in the server;
[0034] Step a1 specifically includes the following steps:
[0035] a11: The test reference pattern is stored in the server in advance;
[0036] a12: Make a copy of the image to be analyzed and use it as the image for origin point analysis;
[0037] a13: Convert the binary image of the origin analysis into a grayscale image and then into a black and white image.
[0038] a14: Take out the pre-stored test reference pattern, perform image recognition on the black and white origin analysis image, find the corresponding position, and record it as the reference image position;
[0039] a15: Find the center point of the reference image location, which is the origin;
[0040] Step S6, the process of identifying and determining the color of the color data to be analyzed, includes the following steps:
[0041] c1: Obtain the color of all pixels in the color data to be analyzed.
[0042] c2: Converts the color pixel of each pixel into a numerical value;
[0043] c3: The average color value is calculated according to the mean formula, which is the color corresponding to the analysis area 6, and also the emission color of the LED 7 to be tested.
[0044] This invention provides a method for testing the color of LED emission. It involves using a camera to capture an image of the LED illuminated on a test background. The color of the image within the analysis area corresponding to the LED represents the color of the LED under test. This image is then analyzed using color analysis software and compared with the standard color of the LED to determine if its emission color conforms to the factory specifications. The entire process requires no manual intervention, minimizing errors and increasing efficiency. Furthermore, this method requires only a standard camera, test background, and color analysis software, resulting in extremely low system cost and applicability to various LED manufacturers. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the testing device structure in the LED emission color testing method of the present invention;
[0046] Figure 2 Example 1 of the test background board;
[0047] Figure 3 Example 2 for testing the background board;
[0048] Figure 4 An example of a reference pattern;
[0049] Figure 5 Example 3 for testing the background board
[0050] Figure 6 This is an example of an image to be analyzed. Detailed Implementation
[0051] like Figure 1 As shown, the present invention provides a method for testing the color of LED emission, which includes the following steps:
[0052] S1: Install the test background board 1 and the detection camera 3. The detection camera 3 is connected to the server 4. Color analysis software is installed in the server 4. The connection between the detection camera 3 and the server 4 can be implemented based on existing technologies, such as USB connection, infrared, Bluetooth and other wireless communication connections. The server 4 can be implemented using a regular PC.
[0053] The test background board 1 is set within the shooting area of the inspection camera 3. The test background board 1 is detachable or can be placed directly within the shooting area of the inspection camera 3 without being fixed, ensuring that multiple test background boards 1 can be used to test LEDs of the same batch in turn, which greatly improves the testing efficiency.
[0054] The test background board 1 includes: LED mounting base 2 and analysis area 6.
[0055] In practice, the detection camera 3 can be any ordinary camera capable of accurately capturing color images. The size of the test background board 1 and the distance between the test background board 1 and the detection camera 3, as well as the camera's focal length, focusing distance, brightness, and saturation, should be adaptively set according to the specific shooting environment and the specific performance of the detection camera 3, to ensure that the analysis area 6 on the test background board 1 can be completely captured by the detection camera 3.
[0056] Analysis area 6 is located around LED mounting base 2. The color of the LED light collected within analysis area 6 best represents the color of the LED 7 under test after it is lit. Because if the camera is directly pointed at the LED after it is lit, the center of the LED will be a bright white light, making color analysis impossible through image recognition. Therefore, the technical solution of this invention is based on color recognition of the area surrounding the LED. Analysis area 6 is set around the LED 7 under test for image acquisition. The specific size of analysis area 6 is adaptively set according to the specifications of the LED. For example, a rectangular area with a width of 160 pixels and a height of 100 pixels can be used.
[0057] The specific method for determining area 6 includes the following steps:
[0058] b1: Install the standard LED light that meets the factory specifications on the LED mounting bracket 2;
[0059] b2: Store the standard colors corresponding to the standard LED lights in server 4;
[0060] b2: After the LED is lit, take a picture using the detection camera 3 to obtain a test image;
[0061] b3: The test image is transmitted to server 4. The color analysis software is used to analyze the test image as a whole and find the position that best matches the standard color of the standard LED light. This position is recorded as the analysis area 6 corresponding to the standard LED light specification.
[0062] b4: Determine the coordinate position of analysis area 6, and store the coordinate position and the corresponding LED light specifications in server 4.
[0063] Different specifications of LED lights are installed on the same LED mounting base 2, and the corresponding analysis area 6 may be different. Therefore, the position of the analysis area 6 on the test background plate 1 needs to be determined separately for each specification of LED light.
[0064] If only one type of LED light is tested on a test background board 1, then, as Figure 3 As shown, the analysis area 6 can be directly marked on the test background board 1 using a rectangular marker box or other marking patterns.
[0065] However, when the same LED mounting bracket 2 on the test background board 1 is used to test multiple types of LEDs, it is impossible to use a fixed pattern or structure to mark and distinguish the analysis area 6 corresponding to the same LED mounting bracket 2. In this case, a coordinate system needs to be established to achieve soft marking of the analysis area for each specification through coordinates.
[0066] like Figure 2 , Figure 5 As shown, a test reference pattern 5 is set on the test background plate 1. The test reference pattern 5 does not coincide with the positions of the LED mounting base 2 and the analysis area 6.
[0067] Perform graphic recognition on the image to be analyzed, find the position of the test reference pattern 5 in the image to be analyzed, and record it as the reference position;
[0068] A coordinate system is established with the center point of the reference position as the origin; the position coordinates of the analysis area 6 corresponding to different specifications of LED lights in the coordinate system are pre-stored in the server 4. In specific implementation, the specific pattern of the test reference pattern 5 can be a circle, a square, an origin, or something else. Figure 2 , Figure 4 As shown, a cross shape or a clearly marked circular pattern can be used, as long as the center point can be found and it is easy to identify based on existing image recognition technology.
[0069] In practical applications, in order to reduce costs, one test background board 1 is mostly used to test LED lights of various specifications. Therefore, the positioning of the analysis area 6 is mostly achieved through the test reference pattern 5. At the same time, because in actual operation, in order to improve operation efficiency, usually multiple test background boards 1 are rotated to test LED lights of the same specification in one batch. Therefore, when replacing the test background board 1, there is often an inconsistency in the installation position of the test background board 1. At this time, the method of finding the origin based on the reference pattern 5 and then finding the analysis area 6 will not be affected by the change in the position of the background board 1. That is, in the technical solution of the present invention, through the setting of the reference pattern 5 and the coordinate system, the test background board 1 can be used to test LED lights of different specifications, further reducing the cost of the system; at the same time, through the setting of the reference pattern 5 and the coordinate system, it is ensured that during the test process, the position of the analysis area 6 will not be detected incorrectly due to the influence of the test background board 1, thereby ensuring the accuracy of the final result.
[0070] S2: Install the LED 7 to be tested in the LED mounting seat 2;
[0071] Pre-store the standard color corresponding to the LED 7 to be tested in the server 4.
[0072] When testing the LED lights based on the technical solution of the present invention, in order to improve the test efficiency, two LED lights of different colors can also be tested simultaneously. When testing multiple LED lights of different colors, the analysis area 6 is set at the overlapping position of the light-emitting areas of the LEDs 7 to be tested; the standard color in step S7 is set as the color obtained after overlapping the standard colors of multiple LEDs 7 to be tested. As Figure 2 shown, the red LED light and the green LED light are tested simultaneously through two LED mounting seats 2. Before the test is implemented, first use standard red and green LED lights to find the analysis area 6 where the two LED lights overlap, and store the coordinates and the standard color corresponding to the analysis area 6 in the server. In the overlapping area between the red with RGB(255,0,0) value and the green with RGB(0,255,0) value, find the area with RGB(255,255,0) and set it as the analysis area 6 for the two. And the RGB of the standard color corresponding to the analysis area 6 is set as (255,255,0).
[0073] During the test, power on the two LED lights simultaneously, and then use the camera for detection to collect the image in the analysis area 6 and send it to the color analysis software for color analysis. When the color of the analysis area 6 is consistent with the pre-stored standard color, it indicates that both LED lights are qualified. When the color of the analysis area 6 is inconsistent with the pre-stored standard color, the color deviation of which color LED light can be determined through the RGB value of the color corresponding to the analysis area 6.
[0074] Because a certain degree of error is permissible in actual production, when selecting the analysis area, whether testing a single LED or performing color superposition tests on multiple LEDs, the RGB value range between 100 and 255 can be chosen as the analysis area. The specific value range can be set according to the specific factory standards of the LED being tested.
[0075] S3: Power on the LED 7 to be tested. After the LED lights up, use a camera to capture images of the test background board 1 and the LED 7 to be tested, obtaining images for analysis. In practical applications, to ensure usable data, images can be captured every 5ms, two to three times consecutively. Use the clearest image for testing. If the test environment is relatively standard, repeated acquisition is unnecessary; only one image needs to be captured each time. Specific implementation examples are provided. Figure 6 As shown.
[0076] S4: Import the image to be analyzed into server 4.
[0077] S5: Locate the region where analysis area 6 is located in the image to be analyzed, obtain all image data within analysis area 6, and record it as the color data to be analyzed.
[0078] When the test background board 1 does not have a marked structure for the analysis area 6 but determines the analysis area 6 through a coordinate system, before implementing step S5, the following steps are performed to find the analysis area 6:
[0079] a1: Find the origin based on baseline pattern 5;
[0080] a2: Locate analysis area 6 using the coordinates of the origin and the corresponding LED specification analysis area 6.
[0081] In order to accurately find the origin and establish an accurate coordinate system, the following steps are usually performed when implementing step a1:
[0082] a11: The test reference pattern 5 is stored in the server in advance;
[0083] a12: Make a copy of the image to be analyzed and use it as the image for origin point analysis;
[0084] a13: Convert the binary image of the origin analysis image into a grayscale image and then into a black and white image.
[0085] a14: Take out the pre-stored test reference pattern 5, perform image recognition on the black and white origin analysis image, find the corresponding position, and record it as the reference image position;
[0086] a15: Find the center point of the reference image, which is the origin.
[0087] In step a13, the image to be analyzed is processed into grayscale, some interference items in the image are evaluated, the shape of the matching graphic is highlighted, and the position of the reference pattern 5 can be quickly and accurately identified.
[0088] The position coordinates of analysis area 6 in step a2 can be recorded using either the center coordinates or the top-left corner coordinates. In this embodiment, the center coordinates are used. The calculation process is as follows:
[0089] Let the coordinates of the origin be (X1, Y1), and the coordinates of the center of the rectangular analysis area 6 be (X2, Y2). The calculation for setting a rectangle with a width of 160 and a height of 100 is as follows:
[0090] The coordinates of the upper left corner of analysis area 6 are (X1-X2-80, Y2-Y1-50), and the coordinates of the lower left corner are (X1-X2-80, Y2-Y1+50).
[0091] The coordinates of the upper right corner are (X1-X2+80, Y2-Y1-50), and the coordinates of the lower right corner are (X1-X2+80, Y2-Y1+50).
[0092] S6: Based on color analysis software, the color of the color data to be analyzed is identified, and the color of the color data to be analyzed is determined through color matching, which is the emission color of the LED 7 to be tested. The color analysis software can be existing technology software, or it can be self-made by technicians.
[0093] When specifically identifying the color of the color data to be analyzed, the color of all pixels in the color data to be analyzed is obtained based on existing color recognition technology. The color pixels are converted into numerical values, and then the average value is calculated according to the mean formula. This average value is the color corresponding to the analysis area 6, which is also the emission color of the LED 7 to be tested.
[0094] S7: Compare the emission color of the LED 7 under test with the standard color of the LED 7 under test to determine whether the color of the LED 7 under test is qualified.
[0095] The color analysis software in this invention uses LabVIEW software. LabVIEW is a development environment developed by National Instruments (NI). For image processing, analysis, and machine vision, NI provides a dedicated machine vision platform that can be seamlessly integrated with other automation equipment based on LabVIEW to meet the hardware and software requirements of various machine vision applications.
[0096] The technical solution of this invention, based on color analysis software, can be implemented using existing modules in LabVIEW software.
[0097] For example, when establishing a reference coordinate system through the origin in the technical solution of this invention, the IMAQ Find CoordSys (Rect)2 and IMAQFind CoordSys (2 Rects)2 functions in the LabVIEW Vision and Motion > Machine Vision > Coordinate System function palette are used to complete the construction process.
[0098] For example, in the technical solution of this invention, the process of obtaining the color of all pixels in the color data to be analyzed in step S6 includes: based on the bit depth of the image, the VI returns the pixel value as a cluster of 32-bit unsigned integers or four unsigned 16-bit integers. Then, the Vision utilities>Color utilities>IMAQ IntegerToColorValue VI is used to convert the 32-bit integers into a cluster containing three elements (R,G,B), (H,S,L), (H,S,V), or (H,S,I).
[0099] Using the technical solution of this invention, a camera is used to photograph the area illuminated by the lit LED, and then LabVIEW software is used to analyze the image to determine the color and brightness of the LED. This not only results in high testing efficiency and low overall cost, but also prevents human error. Compared with existing testing methods, the testing method of this invention has significant advantages when testing a very large number of LEDs at once.
Claims
1. A method of testing the color of light emitted by an LED, characterized by, It includes the following steps: S1: Install a test background board and a detection camera, wherein the detection camera is communicatively connected to a server; color analysis software is installed in the server; The test background plate is detachably set within the shooting area of the detection camera; The test background board includes: an LED mounting base and an analysis area; The analysis area is located around the LED mounting base, and the LED light color collected in the analysis area best represents the color of the LED light under test after it is lit. S2: Install the LED to be tested into the LED mounting bracket; The standard color corresponding to the LED to be tested is pre-stored in the server; S3: Power on the LED to be tested. After the LED lights up, take a picture of the test background board and the LED to be tested through the detection camera to obtain an image to be analyzed. S4: Import the image to be analyzed into the server; S5: Locate the region where the analysis area is located in the image to be analyzed, obtain all image data within the analysis area, and record it as the color data to be analyzed; S6: Based on the color analysis software, identify the color of the color data to be analyzed, and determine the color of the color data to be analyzed, which is the emission color of the LED to be tested; S7: Compare the emission color of the LED under test with the standard color of the LED under test to determine whether the color of the LED under test is qualified; The method for determining the analysis region includes the following steps: b1: Install the standard LED light that meets the factory specifications on the LED mounting bracket; b2: Store the standard color corresponding to the standard LED light in the server; b2: After the LED is turned on, take a picture using the detection camera to obtain a test image; b3: The test image is transmitted to the server, and the color analysis software is used to analyze the test image as a whole to find the position that best matches the standard color of the standard LED light, which is recorded as the analysis area corresponding to the standard LED light specification; b4: Determine the coordinate position of the analysis area and store the coordinate position and the corresponding LED light specifications in the server; The test background board also includes a test reference pattern, which does not coincide with the positions of the LED mounting base and the analysis area; Perform image recognition on the image to be analyzed, find the position of the test reference pattern in the image to be analyzed, and record it as the reference position; A coordinate system is established with the center point of the reference position as the origin; the position coordinates of the analysis area in the coordinate system are stored in the server in advance. Before implementing step S5, perform the following steps: a1: Find the origin based on the test reference pattern; a2: Locate the analysis region using the coordinates of the origin and the analysis region; Step a1 specifically includes the following steps: a11: The test reference pattern is stored in the server in advance; a12: Make a copy of the image to be analyzed and use it as the image for origin point analysis; a13: Convert the binary image of the origin analysis into a grayscale image and then into a black and white image. a14: Take out the pre-stored test reference pattern, perform image recognition on the black and white origin analysis image, find the corresponding position, and record it as the reference image position; a15: Find the center point of the reference image location, which is the origin.
2. The method of claim 1, wherein: The color analysis software is LabVIEW.
3. The method of claim 1, wherein the method further comprises: determining the color of the light emitted by the LED. When the number of analysis areas corresponding to the same LED mounting base on the test background board is greater than 1, each analysis area corresponds to a different specification of the LED to be tested; the position coordinates of each analysis area are pre-stored in the server.
4. The method of claim 1, wherein: When multiple LEDs of different colors are tested simultaneously using the same test background board, the analysis area is set at the overlapping position of the light-emitting areas of the LEDs to be tested; the standard color in step S7 is set as the color obtained by overlapping the standard colors of multiple LEDs to be tested.
5. The method of claim 1, wherein: Step S6, the process of identifying and determining the color of the color data to be analyzed, includes the following steps: c1: Obtain the color of all pixels in the color data to be analyzed. c2: Converts the color pixel of each pixel into a numerical value; c3: The average color value is calculated according to the mean formula, which is the corresponding color in the analysis area, and also the emission color of the LED to be tested.