A four-point positioning-based micro LED lamp bead extraction algorithm
By using a four-point positioning algorithm to extract MicroLED beads, the problem of uneven brightness in MicroLED displays has been solved, achieving high-precision and high-speed bead positioning, thus improving production efficiency and yield.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU WEIDAZHI ELECTRONIC TECH CO LTD
- Filing Date
- 2023-07-07
- Publication Date
- 2026-06-09
Smart Images

Figure CN116704170B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of LED chip positioning and extraction, and more specifically, to an algorithm for extracting MicroLED chips based on four-point positioning. Background Technology
[0002] During the production of MicroLED displays, uneven brightness (known in the industry as "mura") can occur due to factors such as materials and manufacturing processes. These uneven brightness spots can cause visual discomfort, and products with such marks cannot meet end-customer specifications, generally requiring scrapping or downgrading. Furthermore, because MicroLEDs are small, with a display area of only 0.13 inches, current technologies for extracting the MicroLED chips are not precise, leading to significant errors in judging uneven brightness and slow extraction speed. Summary of the Invention
[0003] To address at least one of the aforementioned technical problems, this invention proposes an algorithm for extracting MicroLED beads based on four-point positioning.
[0004] The first aspect of this invention provides an algorithm for extracting MicroLED chips based on four-point positioning, comprising:
[0005] S1, acquire LED bead images, obtain LED bead count information, and generate LED bead matrix;
[0006] S2, calculate the angle between the light-emitting bead region and the horizontal plane based on the bead matrix, and calculate the image coordinate information of the vertex of the light-emitting bead region;
[0007] S3, calculate the standard image coordinate information of the vertices based on the LED matrix generated in S1;
[0008] S4, map the standard image coordinate information of the vertices to the image coordinate information of the vertices of the light-emitting lamp bead region to obtain the affine transformation matrix;
[0009] S5. Calculate the center point coordinates of each LED bead based on the affine transformation matrix and position the LED bead accordingly.
[0010] In a preferred embodiment of the present invention, the step of acquiring LED bead images, obtaining the number of lamps, and generating an LED bead matrix specifically involves:
[0011] Acquire images of LED beads and extract image features;
[0012] The image features are compared with preset image features to obtain the feature similarity.
[0013] Determine whether the feature similarity is greater than or equal to a preset similarity threshold;
[0014] If it is greater than or equal to, then the feature is determined to be a lamp bead feature;
[0015] If it is less than, then the feature is determined to be an image background feature;
[0016] Obtain all LED features and construct LED regions, calculate the number of LEDs, and generate an LED matrix.
[0017] In a preferred embodiment of the present invention, the step of calculating the angle between the light-emitting LED bead region and the horizontal plane based on the LED bead matrix specifically involves:
[0018] The upper edge of the LED bead area is detected using the 2D measurement algorithm in Halcon, and a measurement handle is created.
[0019] The coordinates of the blurred upper edge line segment obtained in advance using the threshold segmentation method are added to the measurement handle using an operator;
[0020] Edge extraction is performed on the LED bead image by measuring parameters to obtain the edge result information of the LED bead image;
[0021] Calculate the angle between the edge line of the LED bead and the horizontal line based on the edge result information of the LED bead image.
[0022] In a preferred embodiment of the present invention, the LED bead region has four vertices. The shape matching algorithm in Halcon is used to search for the LED bead position information at the four vertices of the LED bead region, specifically including:
[0023] Create a shape matching template for LED beads and set the polarity of the shape matching template;
[0024] The LED bead region is calculated using an image segmentation algorithm. The Halcon operator is used to find the bounding rectangle with the smallest angle, and the coordinate information of the four vertices of the rectangle is calculated.
[0025] Based on the coordinate information of the four vertices of the rectangle, the search range of the matching template for each vertex region is drawn, and the image coordinate information of the four vertex LEDs is calculated using the Halcon operator.
[0026] In a preferred embodiment of the present invention, the step of mapping the standard image coordinate information of the vertices to the image coordinate information of the vertices of the light-emitting bead region to obtain the affine transformation matrix is specifically as follows:
[0027] Let the coordinates of two random sets of points be (Px, Py) and (Qx, Qy) respectively. The formula for calculating the affine transformation matrix is as follows:
[0028]
[0029] In the formula, Qx[i] represents the column coordinate of the i-th point after transformation, Qy[i] represents the row coordinate of the i-th point after transformation, minimum represents the matrix of affine transformation, Px[i] represents the column coordinate of the i-th point before transformation, and Py[i] represents the row coordinate of the i-th point before transformation. Represents a point after the transformation. This represents the transformed point. HomMat2D represents the coefficient, meaning that multiplying the distance between the point before and after the transformation by a coefficient minimizes the distance between them.
[0030] In a preferred embodiment of the present invention, the step of calculating the center point coordinates of each LED bead based on the affine transformation matrix and locating the LED bead specifically includes:
[0031] Obtain the LED chip current information and calculate the LED chip grayscale information based on the LED chip current information;
[0032] The grayscale information of the LED beads is compared with the preset grayscale information to obtain the grayscale deviation rate;
[0033] Determine whether the grayscale deviation rate is greater than or equal to a preset deviation rate threshold;
[0034] If it is greater than or equal to, compensation information is generated, the lamp current is compensated according to the compensation information, and the lamp is lit up again.
[0035] If the value is less than 1, the center point coordinates of each LED bead are calculated based on the affine transformation matrix.
[0036] The technical solution of the present invention has the following advantages over the prior art:
[0037] The present invention has high positioning accuracy and efficiency for LED beads, and the extraction time for a single image is only about 200ms, which greatly improves the efficiency of the production line and increases the yield rate of MicroLED manufacturers. Attached Figure Description
[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, some of the drawings in the following description are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the original image of an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of the LED bead area according to an embodiment of the present invention;
[0041] Figure 3This is a schematic diagram of the image before grayscale compensation in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of the image after grayscale compensation according to an embodiment of the present invention.
[0043] In the image, 1 is the LED bead area, and 2 is the background area. Detailed Implementation
[0044] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0045] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0046] Example 1
[0047] See Figure 1-4 As shown, this invention proposes an algorithm for extracting MicroLED chips based on four-point positioning, including:
[0048] S1, acquire LED bead images, obtain LED bead count information, and generate LED bead matrix;
[0049] S2, calculate the angle between the light-emitting bead region and the horizontal plane based on the bead matrix, and calculate the image coordinate information of the vertex of the light-emitting bead region;
[0050] S3, calculate the standard image coordinate information of the vertices based on the LED matrix generated in S1;
[0051] S4, map the standard image coordinate information of the vertices to the image coordinate information of the vertices of the light-emitting lamp bead region to obtain the affine transformation matrix;
[0052] S5. Calculate the center point coordinates of each LED bead based on the affine transformation matrix and position the LED bead accordingly.
[0053] Specifically, when generating the LED matrix, the size of the LED matrix is set to 640x480, meaning there are 640 LEDs in width and 480 LEDs in height. The generated matrix is as follows:
[0054] (0,0)(0,1)(0,2)……(0,639)
[0055] (1,0)(1,1)(1,2)……(1,639)
[0056] ...
[0057] (479,0)(479,1)(479,2)……(479,639).
[0058] According to an embodiment of the present invention, the process involves acquiring images of LED beads, obtaining information on the number of lamps, and generating an LED bead matrix, specifically as follows:
[0059] Acquire images of LED beads and extract image features;
[0060] The image features are compared with preset image features to obtain the feature similarity.
[0061] Determine whether the feature similarity is greater than or equal to a preset similarity threshold;
[0062] If it is greater than or equal to, then the feature is determined to be a lamp bead feature;
[0063] If it is less than, then the feature is determined to be an image background feature;
[0064] Obtain all LED features and construct LED regions, calculate the number of LEDs, and generate an LED matrix.
[0065] It should be noted that the LED bead feature corresponds to the LED bead region 1, the background feature corresponds to the background region 2, and the original image is the LED bead image acquired for the first time.
[0066] According to an embodiment of the present invention, the angle between the light-emitting lamp bead region and the horizontal plane is calculated based on the lamp bead matrix, specifically as follows:
[0067] The upper edge of the LED bead area is detected using the 2D measurement algorithm in Halcon, and a measurement handle is created.
[0068] The coordinates of the blurred upper edge line segment obtained in advance using the threshold segmentation method are added to the measurement handle using an operator;
[0069] Edge extraction is performed on the LED bead image by measuring parameters to obtain the edge result information of the LED bead image;
[0070] Calculate the angle between the edge line of the LED bead and the horizontal line based on the edge result information of the LED bead image.
[0071] According to an embodiment of the present invention, the LED bead region has four vertices. The shape matching algorithm in Halcon is used to search for the LED bead position information at the four vertices of the LED bead region, specifically including:
[0072] Create a shape matching template for LED beads and set the polarity of the shape matching template;
[0073] The LED bead region is calculated using an image segmentation algorithm. The Halcon operator is used to find the bounding rectangle with the smallest angle, and the coordinate information of the four vertices of the rectangle is calculated.
[0074] Based on the coordinate information of the four vertices of the rectangle, the search range of the matching template for each vertex region is drawn, and the image coordinate information of the four vertex LEDs is calculated using the Halcon operator.
[0075] It should be noted that the image coordinate information of the four vertex LEDs includes the row coordinates of the top left LED; the column coordinates of the top left LED; the row coordinates of the top right LED; the column coordinates of the top right LED; the row coordinates of the bottom left LED; the column coordinates of the bottom left LED; and the row coordinates and column coordinates of the bottom right LED.
[0076] It should be noted that since the light-emitting beads of MicroLED are round in shape, when creating the template, an operator is used to create a circular outline. The polarity of the shape matching template can be understood as either the center of the circular outline is white and the outside is black, or the center of the circular outline is black and the outside is white.
[0077] According to an embodiment of the present invention, the standard image coordinate information of the vertices is mapped and calculated with the image coordinate information of the vertices of the light-emitting lamp bead region to obtain an affine transformation matrix, specifically as follows:
[0078] Let the coordinates of two random sets of points be (Px, Py) and (Qx, Qy) respectively. The formula for calculating the affine transformation matrix is as follows:
[0079]
[0080] In the formula, Qx[i] represents the column coordinate of the i-th point after transformation, Qy[i] represents the row coordinate of the i-th point after transformation, minimum represents the affine transformation matrix, Px[i] represents the column coordinate of the i-th point before transformation, and Py[i] represents the row coordinate of the i-th point before transformation. Represents a point after the transformation. This represents the transformed point. HomMat2D represents the coefficient, meaning that multiplying the distance between the point before and after the transformation by a coefficient minimizes the distance between them.
[0081] According to an embodiment of the present invention, the center point coordinates of each LED bead are calculated based on the affine transformation matrix, and the LED beads are positioned accordingly, specifically including:
[0082] Obtain the LED chip current information and calculate the LED chip grayscale information based on the LED chip current information;
[0083] The grayscale information of the LED beads is compared with the preset grayscale information to obtain the grayscale deviation rate;
[0084] Determine whether the grayscale deviation rate is greater than or equal to the preset deviation rate threshold;
[0085] If it is greater than or equal to, compensation information is generated, the lamp current is compensated according to the compensation information, and the lamp is lit up again.
[0086] If the value is less than 1, the center point coordinates of each LED bead are calculated based on the affine transformation matrix.
[0087] In summary, the present invention has high positioning accuracy and efficiency for LED beads, and the extraction time for a single image is only about 200ms, which greatly improves the efficiency of the production line and increases the yield rate of MicroLED manufacturers.
[0088] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0089] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to the above embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0090] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An algorithm for extracting MicroLED chips based on four-point positioning, characterized in that, include: S1, acquire LED bead images, obtain LED bead count information, and generate LED bead matrix; S2, calculate the angle between the light-emitting bead region and the horizontal plane based on the bead matrix, and calculate the image coordinate information of the vertex of the light-emitting bead region; S3, calculate the standard image coordinate information of the vertices based on the LED matrix generated in S1; S4, map the standard image coordinate information of the vertices to the image coordinate information of the vertices of the light-emitting lamp bead region to obtain the affine transformation matrix; S5. Calculate the center point coordinates of each LED bead based on the affine transformation matrix and position the LED bead accordingly. The process of acquiring images of the LED beads, obtaining information on the number of lamps, and generating an LED bead matrix is as follows: Acquire images of LED beads and extract image features; The image features are compared with preset image features to obtain the feature similarity. Determine whether the feature similarity is greater than or equal to a preset similarity threshold; If it is greater than or equal to, then the feature is determined to be a lamp bead feature; If it is less than, then the feature is determined to be an image background feature; Obtain all LED features and construct LED regions, calculate the number of LEDs, and generate an LED matrix; The calculation of the angle between the light-emitting LED bead area and the horizontal plane based on the LED bead matrix is as follows: The upper edge of the LED bead area is detected using the 2D measurement algorithm in Halcon, and a measurement handle is created. The coordinates of the blurred upper edge line segment obtained in advance using the threshold segmentation method are added to the measurement handle using an operator; Edge extraction is performed on the LED bead image by measuring parameters to obtain the edge result information of the LED bead image; Calculate the angle between the edge line of the LED bead and the horizontal line based on the edge result information of the LED bead image; The LED bead region has four vertices. Using the shape matching algorithm in Halcon, the position information of the LED beads at the four vertices of the LED bead region is searched, specifically including: Create a shape matching template for LED beads and set the polarity of the shape matching template; The LED bead region is calculated using an image segmentation algorithm. The Halcon operator is used to find the bounding rectangle with the smallest angle, and the coordinate information of the four vertices of the rectangle is calculated. Based on the coordinate information of the four vertices of the rectangle, the search range of the matching template for each vertex region is drawn, and the image coordinate information of the four vertex LEDs is calculated using the Halcon operator. The process of mapping the standard image coordinates of the vertices to the image coordinates of the vertices in the LED bead region to obtain the affine transformation matrix is as follows: Let the coordinates of two random sets of points be (Px, Py) and (Qx, Qy) respectively. The formula for calculating the affine transformation matrix is as follows: ; In the formula, Qx[i] represents the column coordinate of the i-th point after transformation, Qy[i] represents the row coordinate of the i-th point after transformation, minimum represents the matrix of affine transformation, Px[i] represents the column coordinate of the i-th point before transformation, and Py[i] represents the row coordinate of the i-th point before transformation. Represents a point after the transformation. This represents another point after the transformation, and HomMat2D represents the coefficients.
2. The algorithm for extracting MicroLED beads based on four-point positioning according to claim 1, characterized in that, The process of calculating the center point coordinates of each LED bead based on the affine transformation matrix and locating the LED bead specifically includes: Obtain the LED chip current information and calculate the LED chip grayscale information based on the LED chip current information; The grayscale information of the LED beads is compared with the preset grayscale information to obtain the grayscale deviation rate; Determine whether the grayscale deviation rate is greater than or equal to a preset deviation rate threshold; If it is greater than or equal to, compensation information is generated, the lamp current is compensated according to the compensation information, and the lamp is lit up again. If the value is less than 1, the center point coordinates of each LED bead are calculated based on the affine transformation matrix.