Method and device for detecting LED lamp bead, computer device and storage medium
By determining the effective outline and pixel level threshold of the LED beads in the LED backlight board diagram, the pixel defects of the LED beads are automatically detected, solving the problem of low efficiency of traditional human eye detection and achieving more efficient and accurate detection.
Patent Information
- Application Number
- CN202211282460.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-10-19
AI Technical Summary
Traditional LED bead detection relies on human observation, resulting in low detection efficiency and an inability to effectively identify pixel missing issues.
The effective outline of the LED beads is determined by identifying them in the LED backlight panel diagram, and a threshold is obtained based on the pixel level. The number of pixels is counted, binarization is performed, and the ratio is calculated to determine the product's qualification.
This has enabled the automation and improved the accuracy of LED bead testing, thereby increasing testing efficiency.
Smart Images

Figure CN115526883B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of optical measurement, in particular to a detection method and device for LED lamp beads, computer equipment and storage medium. BACKGROUND
[0002] With the progress of science and technology, the field of LED (Light Emitting Diode) develops rapidly. Among them, Mini LED is concerned. As an LCD (Liquid Crystal Display) backlight source, it has many advantages such as wide color gamut coverage, uniform heat dissipation under high brightness, etc. compared with traditional LED backlight source.
[0003] After the Mini LED backlight board is lit, the pixels of some LED lamp beads are missing, which is manifested as incomplete light emission observed by the human eye. In the traditional detection technology of LED lamp beads, the human eye is relied on to observe, and then unqualified products are detected out, which inevitably has the problem of low detection efficiency. SUMMARY
[0004] Therefore, it is necessary to provide a detection method and device for LED lamp beads, computer equipment and computer readable storage medium, which can improve the detection efficiency of LED lamp beads.
[0005] In a first aspect, the present application provides a detection method for LED lamp beads. The method comprises:
[0006] In the LED backlight board diagram, a first circumscribed rectangle corresponding to a first effective contour of the LED lamp bead is determined;
[0007] According to the pixel level of the LED backlight board, a corresponding threshold value is obtained;
[0008] The first total number of pixel points in the first circumscribed rectangle is counted;
[0009] The pixel points in the first circumscribed rectangle are binarized, and the number of pixel points meeting the pixel condition in the binarized first circumscribed rectangle is counted to obtain a first effective number;
[0010] The ratio between the first effective number and the first total number is determined;
[0011] When the ratio is greater than the threshold value, the LED backlight board is determined to be a qualified product.
[0012] In one of the embodiments, before the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead is determined, the method further comprises:
[0013] acquire a color image, and perform grayscale processing on the color image to obtain the LED backlight plate image; or acquire a luminance image, and take the luminance image as the LED backlight plate image;
[0014] extract a lamp bead contour in the LED backlight plate image;
[0015] determine a first effective contour of the LED lamp bead based on the lamp bead contour.
[0016] In one embodiment, the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead includes:
[0017] determine the value of each pixel point located in the lamp bead contour in the LED backlight plate image;
[0018] sort the values of the pixel points in the lamp bead contour to obtain a value sequence;
[0019] perform difference processing on each adjacent value in the value sequence to obtain a difference value sequence;
[0020] determine the maximum value in the value sequence based on the extreme points in the difference value sequence;
[0021] take the maximum value and the value before the maximum value in the value sequence as a target value;
[0022] determine the region corresponding to the target value in the lamp bead contour, and determine the first effective contour according to the region;
[0023] determine a first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead.
[0024] In one embodiment, the method further includes:
[0025] perform image acquisition on unqualified LED backlight plates according to the pixel level to obtain a target LED backlight plate image;
[0026] determine a second effective contour of a target LED lamp bead in the target LED backlight plate image;
[0027] determine a second circumscribed rectangle corresponding to the second effective contour;
[0028] count the second total number of pixel points in the second circumscribed rectangle;
[0029] perform binaryzation processing on the pixel points in the second circumscribed rectangle, and count the number of pixel points satisfying the pixel condition in the binaryzation processed second circumscribed rectangle to obtain a second effective number;
[0030] The minimum ratio between the second effective number and the second total number is taken as the threshold value.
[0031] In one embodiment, after determining that the LED backlight panel is a qualified product, the method further comprises:
[0032] displaying the LED backlight panel as a qualified product on an LED lamp bead detection interface;
[0033] When the ratio is less than or equal to the threshold value, it is determined that the LED backlight panel is an unqualified product.
[0034] displaying the LED backlight panel as an unqualified product on the LED lamp bead detection interface.
[0035] In a second aspect, the application further provides a detection device for an LED lamp bead. The device comprises:
[0036] A first determination module is configured to determine, in an LED backlight panel image, a first circumscribed rectangle corresponding to a first effective contour of an LED lamp bead.
[0037] An acquisition module is configured to acquire a threshold value according to a pixel level of an LED backlight panel.
[0038] A statistics module is configured to count a first total number of pixel points in the first circumscribed rectangle.
[0039] A binarization and statistics module is configured to perform binarization processing on the pixel points in the first circumscribed rectangle, and count the number of pixel points in the first circumscribed rectangle after binarization that meet a pixel condition, to obtain a first effective number.
[0040] A second determination module is configured to determine a ratio between the first effective number and the first total number.
[0041] A determination module is configured to determine that the LED backlight panel is a qualified product when the ratio is greater than the threshold value.
[0042] In one embodiment, before determining the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead, the device further comprises:
[0043] A preprocessing module is configured to acquire a color image, perform grayscale processing on the color image, and obtain the LED backlight panel image; or acquire a luminance image, take the luminance image as the LED backlight panel image; extract a lamp bead contour in the LED backlight panel image; and determine the first effective contour of the LED lamp bead based on the lamp bead contour.
[0044] In one of the embodiments, the first determining module is further configured to determine the values of the pixels within the lamp bead profile in the LED backlight plate image; sort the values of the pixels within the lamp bead profile to obtain a value sequence; perform difference processing on the adjacent values in the value sequence to obtain a difference value sequence; determine a maximum value in the value sequence based on the extreme points in the difference value sequence; take the maximum value and the value before the maximum value in the value sequence as a target value; determine a region corresponding to the target value in the lamp bead profile, and determine the first effective profile according to the region; and determine a first circumscribed rectangle corresponding to the first effective profile of the LED lamp bead.
[0045] In one of the embodiments, the device further comprises:
[0046] A threshold value determining module is configured to perform image acquisition on the unqualified LED backlight plate according to the pixel level to obtain a target LED backlight plate image; determine a second effective profile of a target LED lamp bead in the target LED backlight plate image; determine a second circumscribed rectangle corresponding to the second effective profile; count a second total number of the pixels in the second circumscribed rectangle; perform binaryzation processing on the pixels in the second circumscribed rectangle, and count the number of the pixels in the second circumscribed rectangle after the binaryzation processing that meet the pixel condition to obtain a second effective number; and take the minimum ratio between the second effective number and the second total number as the threshold value.
[0047] In one of the embodiments, the determining module is further configured to display the LED backlight plate as a qualified product on an LED lamp bead detection interface; when the ratio is less than or equal to the threshold value, determine the LED backlight plate as an unqualified product; and display the LED backlight plate as an unqualified product on the LED lamp bead detection interface.
[0048] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0049] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0050] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0051] The aforementioned LED bead detection method, apparatus, computer equipment, and storage medium, through the following steps: First, determine the first circumscribed rectangle corresponding to the first effective contour of the LED bead in the LED backlight panel image; obtain the corresponding threshold based on the pixel level of the LED backlight panel; count the first total number of pixels in the first circumscribed rectangle; perform binarization processing on the pixels in the first circumscribed rectangle, and count the number of pixels in the binarized first circumscribed rectangle that meet the pixel conditions to obtain the first effective number; determine the ratio between the first effective number and the first total number; when the ratio is greater than the threshold, the LED backlight panel is determined to be a qualified product. This achieves automated detection of missing pixels in LED beads, effectively improving the accuracy and efficiency of LED bead detection. Attached Figure Description
[0052] Figure 1 This is an application environment diagram of an LED bead detection method in one embodiment;
[0053] Figure 2 This is a flowchart illustrating an LED bead detection method in one embodiment;
[0054] Figure 3 This is a schematic diagram of a MiniLED backlight panel in one embodiment;
[0055] Figure 4 This is a schematic diagram of the outline of a Mini LED bead in one embodiment;
[0056] Figure 5 This is a schematic diagram of the detection process for Mini LED beads in one embodiment;
[0057] Figure 6 This is a flowchart illustrating the step of determining the first circumscribed rectangle of the LED bead in another embodiment;
[0058] Figure 7 This is a schematic diagram of the slope of the curve for the difference sequence in one embodiment;
[0059] Figure 8 This is a structural block diagram of an LED bead detection device in one embodiment;
[0060] Figure 9 This is a structural block diagram of the LED bead detection device in another embodiment;
[0061] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0063] The detection method of the LED lamp bead provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 . The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or can be placed on the cloud or other network servers. The present application can be executed by the terminal 102 or the server 104, and the embodiments take the terminal 102 as an example for description.
[0064] The terminal 102 determines the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead in the LED backlight plate diagram; the terminal 102 obtains the corresponding threshold value according to the pixel level of the LED backlight plate; the terminal 102 counts the first total number of the pixel points in the first circumscribed rectangle; the terminal 102 performs binaryzation processing on the pixel points in the first circumscribed rectangle, and counts the number of the pixel points meeting the pixel condition in the binaryzation first circumscribed rectangle to obtain the first effective number; the terminal 102 determines the ratio between the first effective number and the first total number; and the terminal 102 determines that the LED backlight plate is a qualified product when the ratio is greater than the threshold value.
[0065] The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be realized by an independent server or a server cluster composed of multiple servers.
[0066] In one embodiment, as shown in Figure 2 , a detection method of an LED lamp bead is provided. Taking the terminal 102 in Figure 1 as an example for description, the method comprises the following steps:
[0067] S202, in the LED backlight plate diagram, the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead is determined.
[0068] The LED backlight panel diagram can refer to an image of a lit LED backlight panel. The LED backlight panel includes a mini LED backlight panel. The LED lamp bead can refer to a lamp bead on the LED backlight panel. The first effective contour can refer to a contour used to determine a circumscribed rectangle of the LED lamp bead, and the first effective contour is different from the second effective contour. The first circumscribed rectangle can refer to a minimum circumscribed rectangle corresponding to the first effective contour of the LED lamp bead. It should be noted that the first circumscribed rectangle wraps the first effective contour, and the range formed by the first circumscribed rectangle is greater than or equal to the range of the first effective contour. The first circumscribed rectangle and the second circumscribed rectangle are different circumscribed rectangles. Figure 3 The figure is a schematic diagram of a mini LED backlight panel in an embodiment. The LED backlight panel of the present application can be as shown in the figure. Figure 3 As can be seen from the figure, there can be multiple LED lamp beads in the LED backlight panel. Figure 4 The figure is a schematic diagram of a mini LED lamp bead contour in an embodiment. As shown in the figure, Figure 4 In the LED backlight panel diagram, the LED lamp bead can be composed of multiple pixel points, and the LED lamp bead has the following typical cases: (1) normal, as shown in figure (a), there is no missing pixel point in the LED lamp bead; (2) lamp bead is inclined, as shown in figure (b), the whole LED lamp bead is inclined; (3) there is a defect, as shown in figure (c), a small amount of pixel points of the LED lamp bead are missing; as shown in figure (d), a large amount of pixel points of the LED lamp bead are missing. Figure 5 The figure is a schematic diagram of the flow of detection of a mini LED lamp bead in an embodiment. As shown in the figure, Figure 5 The main processes can be data acquisition, contour extraction, determination of the minimum circumscribed rectangle, threshold value search, judgment of whether the LED lamp bead is qualified, and interface display.
[0069] Specifically, in the LED backlight panel diagram, the terminal can determine the first effective contour of each LED lamp bead, and then determine the minimum circumscribed rectangle corresponding to each first effective contour.
[0070] In an embodiment, before S202, the terminal can obtain a color diagram, and perform grayscale processing on the color diagram to obtain the LED backlight panel diagram; or obtain a luminance diagram, and take the luminance diagram as the LED backlight panel diagram; extract the lamp bead contour in the LED backlight panel diagram; and determine the first effective contour of the LED lamp bead based on the lamp bead contour. The color diagram can refer to an image collected by a CCD (charge coupled device) color camera. The luminance diagram can refer to an image collected by a CCD area luminance meter.
[0071] S204, obtaining a corresponding threshold value according to the pixel level of the LED backlight panel.
[0072] The pixel level can refer to a level at which the gray scale or brightness is located. The pixel level can be a gray scale level or a brightness level. The gray scale level can range from 0 to 255. The brightness level can refer to a level at which different brightness is located. For example, the brightness level can be 8000 lx or 10000 lx. The threshold value can be used to determine whether the LED backlight panel is a qualified product.
[0073] Specifically, the terminal first determines the pixel level corresponding to the LED backlight panel, and then determines the corresponding threshold value according to the pixel level.
[0074] In one embodiment, the terminal performs image acquisition on the unqualified LED backlight panel according to the pixel level to obtain a target LED backlight panel image; determines a second effective contour of a target LED lamp bead in the target LED backlight panel image; determines a second circumscribed rectangle corresponding to the second effective contour; counts a second total number of pixel points in the second circumscribed rectangle; performs binaryzation processing on the pixel points in the second circumscribed rectangle, and counts a number of pixel points in the binaryzation second circumscribed rectangle that meet a pixel condition to obtain a second effective number; and takes a minimum ratio between the second effective number and the second total number as the threshold value.
[0075] The unqualified LED backlight panel can refer to an unqualified backlight panel used to determine the threshold value. The target LED backlight panel image can refer to an LED backlight panel image obtained after image acquisition on the unqualified backlight panel. The target LED lamp bead can refer to an LED lamp bead in the target LED backlight panel image. The second effective contour can refer to a contour used to determine a circumscribed rectangle of the target LED lamp bead. The second circumscribed rectangle can refer to a minimum circumscribed rectangle of the second effective contour of the target LED lamp bead. It should be noted that the second circumscribed rectangle wraps the second effective contour, and the range formed by the second circumscribed rectangle is greater than or equal to the range of the second effective contour. The second total number can refer to the total number of pixel points in the second circumscribed rectangle. The pixel condition can refer to a condition used to determine the binaryzation pixel points, and the binaryzation pixel points include a first pixel value and a second pixel value. For example, the pixel condition can be that the pixel value of the pixel point is the first pixel value or the second pixel value, and the first pixel value can be 1 and the second pixel value can be 0. The pixel value includes a brightness value and a gray scale value. The second effective number can refer to the number of pixel points obtained by screening the pixel points in the second circumscribed rectangle according to the pixel condition.
[0076] S206, count a first total number of pixel points in the first circumscribed rectangle.
[0077] The first total number can refer to the total number of pixel points in the first circumscribed rectangle.
[0078] Specifically, the terminal can first determine the pixel points in the first circumscribed rectangle, and then count the total number of pixel points in the first circumscribed rectangle.
[0079] S208, binarize the pixel points in the first circumscribed rectangle, and count the number of pixel points in the binarized first circumscribed rectangle that meet the pixel condition to obtain a first effective number.
[0080] The first effective number can refer to the number of pixel points obtained by screening the pixel points in the first circumscribed rectangle according to the pixel condition.
[0081] Specifically, the terminal can first binarize the pixel values of the pixel points in the first circumscribed rectangle to obtain a first pixel value and a second pixel value. When the pixel condition is that the pixel value of the pixel point is the first pixel value, the terminal counts the number of pixel points in the binarized first circumscribed rectangle whose pixel value is the first pixel value to obtain the first effective number. When the pixel condition is that the pixel value of the pixel point is the second pixel value, the terminal counts the number of pixel points in the binarized first circumscribed rectangle whose pixel value is the second pixel value to obtain the first effective number.
[0082] S210, determine the ratio between the first effective number and the first total number.
[0083] The calculation formula of the ratio can be:
[0084]
[0085] Specifically, the terminal can determine the ratio between the first effective number and the first total number according to the calculation formula of the ratio.
[0086] S212, when the ratio is greater than a threshold value, it is determined that the LED backlight plate is a qualified product.
[0087] Specifically, the terminal can determine the size of the ratio and the threshold value. When the ratio of all LED lamp beads in the LED backlight plate diagram is greater than the threshold value, it is determined that the LED backlight plate is a qualified product.
[0088] In one embodiment, the LED backlight plate is displayed as a qualified product on an LED lamp bead detection interface. When the ratio of the LED lamp beads in the LED backlight plate diagram is less than or equal to the threshold value, it is determined that the LED backlight plate is an unqualified product. The LED backlight plate is displayed as an unqualified product on the LED lamp bead detection interface. The LED lamp bead detection interface can refer to an interface for detecting LED lamp beads.
[0089] The detection method of the LED lamp bead comprises the following steps: determining a first circumscribed rectangle corresponding to a first effective contour of the LED lamp bead in an LED backlight plate image; obtaining a corresponding threshold value according to a pixel level of the LED backlight plate; counting a first total number of pixel points in the first circumscribed rectangle; performing binaryzation processing on the pixel points in the first circumscribed rectangle and counting a number of pixel points meeting a pixel condition in the binaryzation first circumscribed rectangle to obtain a first effective number; determining a ratio between the first effective number and the first total number; and determining that the LED backlight plate is a qualified product when the ratio is greater than the threshold value. The detection method realizes automatic detection of whether the pixel of the LED lamp bead is missing, and effectively improves the accuracy and efficiency of the detection of the LED lamp bead.
[0090] In one embodiment, as shown in FIG. 1, the step of determining the first circumscribed rectangle of the LED lamp bead comprises the following steps: Figure 6
[0091] S602, in the LED backlight plate image, determining a value of each pixel point located in the lamp bead contour.
[0092] The value of the pixel point can refer to a pixel value of the pixel point.
[0093] Specifically, in the LED backlight plate image, the terminal determines a gray value or a brightness value of each pixel point in the lamp bead contour of the LED lamp bead.
[0094] S604, sorting the values of each pixel point in the lamp bead contour to obtain a value sequence.
[0095] The value sequence can refer to a sequence composed of the pixel values of the pixel points in the lamp bead contour.
[0096] Specifically, the terminal can sort the gray values or the brightness values of each pixel point in the lamp bead contour according to the size of the gray values or the brightness values to obtain a value sequence arranged from large to small.
[0097] S606, performing difference processing on each adjacent value in the value sequence to obtain a difference value sequence.
[0098] The difference value sequence can refer to a sequence obtained by performing difference processing on the values in the value sequence.
[0099] Specifically, the terminal can subtract a second gray value or a second brightness value from a first gray value or a first brightness value in the value sequence to obtain a difference value, and combine the difference values into the difference value sequence.
[0100] S608, determining a maximum value in the value sequence based on an extreme point in the difference value sequence.
[0101] The extreme point can refer to the first appearing extreme point on a curve formed by the difference values, with the horizontal axis being the arrangement number of each difference value in the difference value sequence and the vertical axis being the value sequence. Figure 7 FIG. 1 is a schematic diagram of a curve of a difference value sequence in one embodiment; as shown in the figure, point A is an extreme point, for example, the extreme point A is the difference value between the adjacent gray value 100 and the gray value 90 in the value sequence, and since 100 is greater than 90, the maximum value is 100. Figure 7
[0102] Specifically, the terminal determines the first appearing extreme point on a curve formed by the difference values, with the horizontal axis being the arrangement number of each difference value in the difference value sequence and the vertical axis being the value sequence, determines the two adjacent values corresponding to the extreme point in the value sequence, compares the two adjacent values, and determines the larger value of the two adjacent values as the maximum value in the value sequence.
[0103] S610, taking the maximum value and the value before the maximum value in the value sequence as the target value.
[0104] The target value can refer to the pixel value used to determine the first effective contour.
[0105] For example, the values of the pixel points in the lamp bead contour are 21, 18, 20, 12, 13 and 15, respectively, the values of the pixel points in the lamp bead contour are sorted, and the value sequence is {21, 20, 18, 15, 13, 12}, the difference between each adjacent value in the value sequence is processed, and the difference value sequence is {1, 2, 3, 2, 1}, drawing and observation can obtain that the extreme point in the difference value sequence is 3, the two adjacent values of 3 in the value sequence are 18 and 15, respectively, and since 18 is greater than 15, the maximum value is 18, and the value before the maximum value in the value sequence is {21, 20}, i.e., the target value is 21, 20 and 18.
[0106] S612, determining the region corresponding to the target value in the lamp bead contour, and determining the first effective contour according to the region.
[0107] The region can refer to the region formed by the target value in the lamp bead contour.
[0108] S614, determining the corresponding first circumscribed rectangle according to the first effective contour of the LED lamp bead.
[0109] Specifically, the terminal can determine the corresponding minimum circumscribed rectangle according to the first effective contour of the LED lamp bead.
[0110] In this embodiment, by determining the value of each pixel point in the lamp bead contour in the LED backlight plate diagram, the values of each pixel point in the lamp bead contour are sorted, a value sequence is obtained, each adjacent value in the value sequence is processed by difference, a difference value sequence is obtained, based on the extreme value points in the difference value sequence, the maximum value in the value sequence is determined, the maximum value and the value before the maximum value in the value sequence are taken as the target value, the corresponding region of the target value in the lamp bead contour is determined, and the first effective contour is determined according to the region, and the first circumscribed rectangle corresponding to the LED lamp bead is determined according to the first effective contour of the LED lamp bead. The circumscribed rectangle of the LED lamp bead can be accurately determined, which lays the foundation for subsequent judgment of whether the LED backlight plate corresponding to the LED lamp bead is a qualified product.
[0111] As an example, the present example is as follows.
[0112] The present application can include a Mini LED lamp bead data acquisition module, a Mini LED lamp bead contour extraction module, a Mini LED lamp bead defect analysis and judgment module, and a Mini LED lamp bead client feedback module.
[0113] I. Mini LED lamp bead data acquisition module
[0114] The Mini LED lamp bead data acquisition module includes a Mini LED backlight plate, a Mini LED backlight plate lighting device, a CCD acquisition instrument, a data receiving device, and a data transmission line.
[0115] The working steps of the lamp bead data acquisition module are as follows:
[0116] Step one: the Mini LED backlight plate lighting device lights up the Mini LED backlight plate;
[0117] Step two: the CCD acquisition instrument acquires Mini LED data;
[0118] Step three: the CCD acquisition instrument transmits the collected data information to the data receiving device through the data transmission line. The CCD acquisition instrument includes but is not limited to a CCD area brightness meter, and the data receiving device includes but is not limited to an electronic computer.
[0119] II. Mini LED lamp bead contour extraction module
[0120] The Mini LED contour extraction module is mainly responsible for extracting the contour information of each Mini LED lamp bead from the data information collected by the Mini LED lamp bead data acquisition module. The extraction of brightness / gray scale contour information can be divided into two steps.
[0121] Step one: we use the common contour extraction algorithm to extract the Mini LED lamp contour. OpenCV provides a lot of contour detection related functions, such as: function boundingRect(), function minEnclosingCircle(), function minAreaRect() and so on, we can directly call, extract the Mini LED lamp contour, and return all the lamp contour package point position coordinates.
[0122] If it is a CCD color camera, the color image collected by the backlight lamp bead acquisition device needs to be converted into a gray image before using the contour extraction algorithm. Color image to gray image can call the gray image operator in OpenCV, Halcon and other image processing software, or use the formula Gray (gray) = R*0.299+G*0.587+B*0.114 conversion, and all the information related to brightness value in the following step two is replaced by gray value.
[0123] Step two: accurate Mini LED backlight each lamp contour.
[0124] The Mini LED backlight each lamp contour obtained in step one will contain many relatively dark pixel points, which are invalid pixel points and need to be removed to obtain more accurate lamp contour. The removal method is as follows:
[0125] 1. Sort the brightness values in each lamp contour from large to small;
[0126] 2. Subtract the brightness values of the previous and the next one to get the corresponding difference, and draw a curve with these differences, with the horizontal axis as the difference arrangement number and the vertical axis as the difference value;
[0127] 3. Draw the slope of the curve through each point, when the slope changes on both sides, the point is the inflection point;
[0128] 4. The point corresponding to the inflection point is the difference of two numbers, and the relatively large value and the value before it are used as the corresponding area of the Mini LED lamp.
[0129] In this way, we get the effective contour of each lamp of the Mini LED backlight.
[0130] Three, Mini LED lamp defect analysis and judgment module
[0131] After the effective contour of the Mini LED is determined, it is necessary to analyze and judge whether there is a defect. It should be noted that the ideal state of the Mini LED backlight panel lamp bead should be a rectangular array, but in fact the lamp beads will be inclined; in addition, the size of the lamp bead defect is different, which is manifested as the difference in the size of the lamp bead contour, and the difference in the brightness between the lamp beads, and the difference in the size of the lamp bead contour, which is manifested as the defect of the Mini LED lamp bead contour, and the size of the Mini LED lamp bead contour without defect, which is similar to the case, which needs to be judged whether the difference in the brightness of the lamp bead itself or the defect of the lamp bead. Based on the above reasons, we can first find the minimum circumscribed rectangle of the contour, and the minimum circumscribed rectangle has good adaptability, that is, even if the lamp bead is tilted, the external contour of the lamp bead can be accurately found, and the missing part can also be enclosed, which is conducive to finding the pixel missing area, and it is conducive to finding the missing pixel and judging whether the Mini LED point with pixel missing is a defect point.
[0132] Judgment method:
[0133] Step one: after finding the effective contour, find its corresponding minimum circumscribed rectangle. There are many algorithms for extracting the minimum circumscribed rectangle, which can be directly called, such as minAreaRect in OpenCV.
[0134] Step two: judge whether there is a pixel value missing in the circumscribed rectangle
[0135] The pixel value of the pixel point in the circumscribed rectangle is binarized, that is, the pixel value of the effective pixel point is 1, and the pixel value of the non-effective pixel point is 0. The minimum circumscribed rectangle may frame the point with pixel value 0. However, not all points with pixel value 0 are defect points, whether it is a defect point needs to be confirmed according to the current lamp bead brightness level and the number of pixel values contained in its circumscribed rectangle.
[0136] Step three: judge whether the pixel missing in the minimum circumscribed rectangle is a defect
[0137] Whether the pixel missing is a defect can be determined according to the proportion of the number of pixel points with pixel value 1 in the minimum circumscribed rectangle to the number of pixels contained in the minimum circumscribed rectangle, that is, a threshold value can be given in advance, and less than or equal to the threshold value is a defect, and the product is unqualified (No Good, NG) product, and greater than the threshold value is a qualified product.
[0138] The threshold needs to be learned in advance for the NG products of different brightness levels of the customer product, to obtain the threshold under different brightness levels. The determination of the threshold can be: 50 pieces of NG products of different brightness levels of the customer, respectively, for the NG products of different brightness levels, as above, that is: Mini LED lamp bead data acquisition, Mini LED lamp bead contour extraction, Mini LED lamp bead minimum bounding rectangle finding. After finding the minimum bounding rectangle, the number of pixel points with pixel value 1 corresponding to each NG lamp bead is counted.
[0139] The ratio of the number of pixel points with pixel value 1 contained in the minimum bounding rectangle of each NG Mini LED lamp bead to the number of pixels contained in the minimum bounding rectangle under the current brightness level is calculated. The minimum value of the ratio of the number of pixel points with pixel value 1 contained in the minimum bounding rectangle of the NG point Mini LED on the backlight plate to the number of pixels contained in the minimum bounding rectangle is taken as the threshold of the NG point under the current brightness level. Similarly, the thresholds of the NG points under other brightness levels are calculated, and the brightness levels and the corresponding thresholds of the current brightness level are recorded and saved. In actual testing, the threshold can be called according to the product brightness level.
[0140] Four, Mini LED lamp bead client feedback module: display the LED backlight plate as a qualified product or the LED backlight plate as an unqualified product in the LED lamp bead detection interface.
[0141] It should be understood that although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other order. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0142] Based on the same inventive concept, the embodiments of the present application also provide a LED lamp bead detection device for implementing the above-mentioned LED lamp bead detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more LED lamp bead detection device embodiments provided below can refer to the limitations of the LED lamp bead detection method in the above text, which will not be repeated here.
[0143] In one embodiment, as Figure 8As shown, a LED lamp bead detection device is provided, comprising: a first determination module 802, an acquisition module 804, a statistics module 806, a binaryzation and statistics module 808, a second determination module 810 and a judgment module, wherein:
[0144] The first determination module 802 is configured to determine a first circumscribed rectangle corresponding to a first effective contour of the LED lamp bead in the LED backlight plate image.
[0145] The acquisition module 804 is configured to acquire a threshold value corresponding to the pixel level of the LED backlight plate.
[0146] The statistics module 806 is configured to count a first total number of pixel points in the first circumscribed rectangle.
[0147] The binaryzation and statistics module 808 is configured to perform binaryzation processing on the pixel points in the first circumscribed rectangle, count the number of pixel points satisfying the pixel condition in the binaryzation first circumscribed rectangle, and obtain a first effective number.
[0148] The second determination module 810 is configured to determine the ratio between the first effective number and the first total number.
[0149] The judgment module 812 is configured to determine that the LED backlight plate is a qualified product when the ratio is greater than the threshold value.
[0150] In an embodiment, the first determination module 802 is further configured to determine the value of each pixel point in the lamp bead contour in the LED backlight plate image; sort the values of each pixel point in the lamp bead contour to obtain a value sequence; perform difference processing on each adjacent value in the value sequence to obtain a difference value sequence; determine the maximum value in the value sequence based on the extreme points in the difference value sequence; take the maximum value and the value before the maximum value in the value sequence as a target value; determine the region corresponding to the target value in the lamp bead contour, and determine the first effective contour according to the region; and determine the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead.
[0151] In an embodiment, the judgment module 812 is further configured to display the LED backlight plate as a qualified product in an LED lamp bead detection interface; determine the LED backlight plate as an unqualified product when the ratio is less than or equal to the threshold value; and display the LED backlight plate as an unqualified product in the LED lamp bead detection interface.
[0152] In an embodiment, as shown in the accompanying drawings, the LED lamp bead detection device further comprises: Figure 9
[0153] The preprocessing module 814 is configured to acquire a color image, and perform grayscale processing on the color image to obtain an LED backlight plate image; or acquire a luminance image and take the luminance image as the LED backlight plate image; extract a lamp bead contour in the LED backlight plate image; and determine a first effective contour of the LED lamp bead based on the lamp bead contour.
[0154] The determining threshold module 816 is configured to perform image acquisition on an unqualified LED backlight plate according to a pixel level to obtain a target LED backlight plate image; determine a second effective contour of a target LED lamp bead in the target LED backlight plate image; determine a second circumscribed rectangle corresponding to the second effective contour; count a second total number of pixel points in the second circumscribed rectangle; perform binaryzation processing on the pixel points in the second circumscribed rectangle, and count a number of pixel points satisfying a pixel condition in the binaryzation second circumscribed rectangle to obtain a second effective number; and take a minimum ratio between the second effective number and the second total number as a threshold value.
[0155] In the above embodiment, the first circumscribed rectangle corresponding to the first effective contour of the LED lamp bead is determined in the LED backlight plate image; the corresponding threshold value is obtained according to the pixel level of the LED backlight plate; the first total number of pixel points in the first circumscribed rectangle is counted; the binaryzation processing is performed on the pixel points in the first circumscribed rectangle, and the number of pixel points satisfying the pixel condition in the binaryzation first circumscribed rectangle is counted to obtain a first effective number; the ratio between the first effective number and the first total number is determined; and when the ratio is greater than the threshold value, the LED backlight plate is determined as a qualified product. The detection of whether the pixel of the LED lamp bead is missing is realized automatically, and the accuracy and efficiency of the detection of the LED lamp bead are effectively improved.
[0156] The modules in the above LED lamp bead detection device can be realized by software, hardware, or a combination thereof, in whole or in part. The modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in the computer device in a software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0157] In an embodiment, a computer device is provided, which can be a terminal or a server. The internal structure of the computer device is shown in FIG. 1. Figure 10As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control ability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. Wireless mode can be achieved through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to realize a kind of detection method of LED lamp bead. The display unit of the computer device is used to form visually visible picture, can be display screen, projection device or virtual reality imaging device, display screen can be liquid crystal display or electronic ink display, the input device of the computer device can be the touch layer covered on display screen, it can also be the key, trackball or touchpad arranged on the shell of computer device, it can also be external keyboard, touchpad or mouse etc.
[0158] Those skilled in the art can understand that, Figure 10 The skilled in the art can understand that,
[0159] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the above-mentioned embodiments.
[0160] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the above-mentioned embodiments.
[0161] In one embodiment, a computer program product is provided, comprising a computer program, and the computer program is executed by a processor to realize the above-mentioned embodiments.
[0162] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.
[0163] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0164] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.
[0165] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for testing LED beads, characterized in that, The method includes: In the LED backlight panel diagram, determining the first circumscribed rectangle corresponding to the first effective contour of the LED bead includes: determining the value of each pixel point located within the bead contour in the LED backlight panel diagram; sorting the values of each pixel point within the bead contour to obtain a value sequence; subtracting adjacent values in the value sequence to obtain a difference sequence; determining the maximum value in the value sequence based on the extreme points in the difference sequence; using the maximum value and the values in the value sequence preceding the maximum value as target values; determining the region corresponding to the target value within the bead contour, and determining the first effective contour based on the region; and determining the corresponding first circumscribed rectangle based on the first effective contour of the LED bead. The corresponding threshold is obtained based on the pixel level of the LED backlight panel; Count the first total number of pixels in the first bounding rectangle; The pixels in the first bounding rectangle are binarized, and the number of pixels in the binarized first bounding rectangle that meet the pixel conditions is counted to obtain the first effective number. Determine the ratio of the first effective quantity to the first total quantity; When the ratio is greater than the threshold, the LED backlight panel is determined to be a qualified product.
2. The method according to claim 1, characterized in that, Before determining the first circumscribed rectangle corresponding to the first effective contour of the LED bead, the method further includes: Obtain a color image and perform grayscale processing on the color image to obtain the LED backlight panel image; or, obtain a brightness image and use the brightness image as the LED backlight panel image. Extract the LED bead outline from the LED backlight panel image; The first effective profile of the LED bead is determined based on the bead profile.
3. The method according to claim 1, characterized in that, The method further includes: Based on the pixel level, images of the defective LED backlight panels are acquired to obtain an image of the target LED backlight panel; Determine the second effective contour of the target LED bead in the target LED backlight panel diagram; Determine the second circumscribed rectangle corresponding to the second valid contour; Count the second total number of pixels in the second bounding rectangle; The pixels in the second bounding rectangle are binarized, and the number of pixels in the binarized second bounding rectangle that meet the pixel conditions is counted to obtain the second effective number. The minimum ratio between the second effective quantity and the second total quantity is used as the threshold.
4. The method according to claim 1, characterized in that, After determining that the LED backlight panel is a qualified product, the method further includes: The LED backlight panel is displayed as a qualified product on the LED bead testing interface. When the ratio is less than or equal to the threshold, the LED backlight panel is determined to be a defective product. The LED backlight panel is displayed as a defective product on the LED bead detection interface.
5. A testing device for LED beads, characterized in that, The device includes: A first determining module is used to determine a first circumscribed rectangle corresponding to a first effective contour of an LED bead in an LED backlight panel image, including: determining the value of each pixel point located within the bead contour in the LED backlight panel image; sorting the values of each pixel point within the bead contour to obtain a value sequence; subtracting adjacent values in the value sequence to obtain a difference sequence; determining the maximum value in the value sequence based on the extreme points in the difference sequence; taking the maximum value and the values in the value sequence preceding the maximum value as target values; determining the region corresponding to the target value within the bead contour, and determining the first effective contour based on the region; and determining the corresponding first circumscribed rectangle based on the first effective contour of the LED bead. The acquisition module is used to obtain the corresponding threshold based on the pixel level of the LED backlight panel; The statistics module is used to count the first total number of pixels in the first outer rectangle; The binarization and statistics module is used to binarize the pixels in the first bounding rectangle and count the number of pixels in the first bounding rectangle that meet the pixel conditions after binarization, so as to obtain the first effective number. The second determining module is used to determine the ratio between the first effective quantity and the first total quantity; The determination module is used to determine that the LED backlight panel is a qualified product when the ratio is greater than the threshold.
6. The apparatus according to claim 5, characterized in that, The device further includes: A preprocessing module is used to acquire a color image and perform grayscale processing on the color image to obtain the LED backlight panel image; or, acquire a brightness image and use the brightness image as the LED backlight panel image; extract the LED bead outline in the LED backlight panel image; and determine the first effective outline of the LED bead based on the LED bead outline.
7. The apparatus according to claim 5, characterized in that, The determination module is also used to display the LED backlight panel as a qualified product on the LED bead detection interface; when the ratio is less than or equal to the threshold, the LED backlight panel is determined to be a defective product; and the LED backlight panel is displayed as a defective product on the LED bead detection interface.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for positioning lamp beads with abnormal colors and storage medium
CN113096060A