Display panel boundary detection positioning method, device and equipment and storage medium
By detecting the vertical direction gradient of the area of interest image of the display panel and updating the boundary information, the problem of inaccurate positioning of fixed threshold segmentation method in the prior art is solved, and high-precision and stable boundary detection are achieved.
Patent Information
- Application Number
- CN202411200501.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
AI Technical Summary
In the existing display panel detection methods, the fixed threshold segmentation method cannot meet the positioning accuracy and stability when detecting the change of the target, resulting in inaccurate boundary positioning.
By detecting the vertical direction gradient of the image of the region of interest, the peak coordinates corresponding to the maximum gradient value are determined, the boundary information is updated according to the vertical coordinate difference of the peak coordinates, and the boundary of the light leakage detection area is determined in combination with the auxiliary positioning area and the offset.
Improve the positioning accuracy and stability when detecting changes in targets, ensuring the accuracy and real-timeness of boundary information.
Smart Images

Figure CN119169037A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automatic optical detection of display panels, and in particular to a display panel boundary detection and positioning method, device, equipment and storage medium. Background Art
[0002] In the LCD / OLED display panel inspection process, boundary positioning is a key step, which ensures that the inspection system can accurately identify the edge of the display panel, thereby performing effective defect detection, dimension measurement and other subsequent processes.
[0003] The existing commonly used positioning methods mostly use a fixed threshold segmentation method to calculate the parameter information of the ROI (Region of Interest) area. However, when the detected target changes, the fixed threshold cannot meet its positioning accuracy and has low stability. Summary of the invention
[0004] The present application provides a display panel boundary detection and positioning method, device, equipment and storage medium, which detects the features of the image of the region of interest, calculates the gradient in the vertical direction, and finally updates the boundary information according to the positioning standard. Therefore, when the detected target changes, its positioning accuracy can also be met, and the stability is high.
[0005] In a first aspect, an embodiment of the present application provides a display panel boundary detection and positioning method, the display panel boundary detection and positioning method comprising:
[0006] Acquire an image of the display panel to be inspected, and intercept an area of interest based on an auxiliary positioning area and a light leakage inspection area in the image;
[0007] Calculate the gradient in the vertical direction of the region of interest and determine the peak coordinates corresponding to the maximum gradient value;
[0008] The offset is determined according to the vertical coordinate difference of the peak coordinates, and the boundary of the light leakage detection area is determined according to the boundary of the auxiliary positioning area and the offset.
[0009] In combination with the first aspect, in one implementation, calculating the gradient of the region of interest in a vertical direction and determining the peak coordinates corresponding to the maximum gradient value includes:
[0010] Calculate the number of non-zero pixels in the horizontal direction of the region of interest to obtain a column array, the length of which is the height of the region of interest;
[0011] Calculate the gradient of the column array and get the gradient value array;
[0012] Determine the two peak coordinate points corresponding to the maximum gradient value in the gradient value array.
[0013] In combination with the first aspect, in one implementation, according to the formula: gradient = (sum(i+1)-sum(i-1)) / 2, the gradient of the column array is calculated to obtain the gradient value array gradient, wherein sum(i+1) is the element of the i+1th row of the column array, and sum(i-1) is the element of the i-1th row of the column array.
[0014] In combination with the first aspect, in one implementation, the step of intercepting the region of interest based on the auxiliary positioning region and the light leakage detection region in the image includes:
[0015] Taking the centroid of the auxiliary positioning area as the center, a rectangular area with a first width and a first height is intercepted as the region of interest.
[0016] In combination with the first aspect, in one implementation, the step of intercepting the region of interest based on the auxiliary positioning region and the light leakage detection region in the image includes:
[0017] Taking the centroid of the auxiliary positioning area as the center, intercepting a rectangular area of a first width and a first height as a first region of interest;
[0018] The first region of interest is taken as a reference, and left and right offsets are performed based on a set offset to obtain a second region of interest and a third region of interest.
[0019] In combination with the first aspect, in one implementation, the first width is 20 pixels, and the first height is the height of the image.
[0020] In combination with the first aspect, in one implementation, the display panel to be detected is a display panel of a mobile phone, a camera or a tablet, and the auxiliary positioning area is a camera hole area of the mobile phone, the camera or the tablet.
[0021] In a second aspect, an embodiment of the present application provides a display panel boundary detection and positioning device, the display panel boundary detection and positioning device comprising:
[0022] An acquisition module, which is used to acquire an image of the display panel to be inspected, and to intercept an area of interest based on an auxiliary positioning area and a light leakage detection area in the image;
[0023] A calculation module, which is used to calculate the gradient in the vertical direction of the region of interest and determine the peak coordinates corresponding to the maximum gradient value;
[0024] A positioning module determines an offset according to a vertical coordinate difference of the peak coordinates, and determines a boundary of a light leakage detection area according to a boundary of the auxiliary positioning area and the offset.
[0025] In a third aspect, an embodiment of the present application provides a display panel boundary detection and positioning device, wherein the display panel boundary detection and positioning device comprises a processor, a memory, and a display panel boundary detection and positioning program stored in the memory and executable by the processor, wherein when the display panel boundary detection and positioning program is executed by the processor, the steps of the above-mentioned display panel boundary detection and positioning method are implemented.
[0026] In a fourth aspect, a computer-readable storage medium stores a display panel boundary detection and positioning program, wherein when the display panel boundary detection and positioning program is executed by a processor, the steps of the above-mentioned display panel boundary detection and positioning method are implemented.
[0027] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0028] The display panel boundary detection and positioning method in the present application acquires an image of the display panel to be detected, and intercepts a region of interest based on an auxiliary positioning area and a light leakage detection area in the image; calculates the gradient of the region of interest in the vertical direction, and determines the peak coordinates corresponding to the maximum gradient value; determines an offset according to the vertical coordinate difference of the peak coordinates, and determines the boundary of the light leakage detection area according to the boundary of the auxiliary positioning area and the offset.
[0029] That is, the present application detects the features of the image of the region of interest, calculates the gradient in the vertical direction, and finally updates the boundary information according to the positioning standard. Therefore, when the detected target changes, its positioning accuracy can also be met, and the stability is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flow chart of an embodiment of a method for detecting and positioning a boundary of a display panel according to the present application;
[0031] Figure 2 A schematic diagram of an auxiliary positioning area and a light leakage detection area in a display panel image of the present application;
[0032] Figure 3 A schematic diagram of a region of interest captured in a display panel image in the present application;
[0033] Figure 4 It is the gradient map in the vertical direction of the region of interest of this application;
[0034] Figure 5 A comparison chart of the automatically calculated update boundary for this application and the fixed threshold calculation boundary in the prior art;
[0035] Figure 6 This is a structural block diagram of an embodiment of a device for detecting and positioning a boundary of a display panel of the present application;
[0036] Figure 7 This is a schematic diagram of the hardware structure of the display panel boundary detection and positioning device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0039] In a first aspect, an embodiment of the present application provides a display panel boundary detection and positioning method.
[0040] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of a method for detecting and positioning a display panel boundary in the present application. Figure 1 As shown, the display panel boundary detection and positioning method includes:
[0041] S1. Acquire an image of a display panel to be inspected, and intercept an area of interest based on an auxiliary positioning area and a light leakage detection area in the image;
[0042] It is worth noting that the display panel to be detected in this embodiment is usually the display panel of a mobile phone, camera or tablet. These display panels can be lit and have cameras. The position of the camera hole corresponding to the camera is fixed and can be used as a reference for auxiliary positioning. That is, the auxiliary positioning area in this embodiment is the camera hole area of the mobile phone, camera or tablet.
[0043] For details, see Figure 2 As shown, it is a picture of the camera taking the camera hole of the mobile phone at a 16° depression angle. The middle elliptical Hole area is the camera hole area, and the upper Ring area is the side annular light leakage detection area. The problem to be solved in this embodiment is how to calculate the upper boundary of the Ring area (Ringlower boundary) when the lower boundary of the Hole area (Hole upper boundary) is known.
[0044] To this end, this embodiment first intercepts the region of interest from the image. Specifically, a rectangular region with a first width and a first height is intercepted with the centroid of the auxiliary positioning region as the center as the region of interest. Preferably, multiple regions can be intercepted to improve the calculation accuracy. Figure 3 As shown, in Figure 3 Three regions are captured: a first region of interest ROI1, a second region of interest ROI2 and a third region of interest ROI3.
[0045] In specific implementation, a rectangular area of a first width and a first height is intercepted as the first region of interest with the center of mass of the auxiliary positioning area as the center; the first region of interest is used as a reference, and the second region of interest and the third region of interest are obtained by performing left and right offsets based on the set offset. Specifically, the offset offset can be set, and the horizontal coordinates of the center of mass of the left and right regions are -offset and offset respectively, wherein the first width is 20 pixels, and the first height is the height of the image.
[0046] S2, calculating the gradient in the vertical direction of the region of interest, and determining the peak coordinates corresponding to the maximum gradient value;
[0047] After the region of interest is intercepted, the gradient in the vertical direction of the region of interest can be calculated. Specifically, step S2 includes:
[0048] S21, calculating the number of non-zero pixels in the horizontal direction of the region of interest, and obtaining a column array, wherein the length of the column array is the height of the region of interest;
[0049] S22, calculating the gradient of the column array to obtain a gradient value array;
[0050] Specifically, in this embodiment, according to the formula: gradient = (sum(i+1)-sum(i-1)) / 2, the gradient of the column array is calculated to obtain the gradient value array gradient, where sum(i+1) is the element of the i+1th row of the column array, and sum(i-1) is the element of the i-1th row of the column array.
[0051] S23. Determine two peak coordinate points corresponding to the maximum gradient value in the gradient value array.
[0052] See also Figure 4 As shown in the figure, from left to right are the gradient maps of ROI2, ROI1 and ROI3. Taking ROI2 as an example, due to the interval between the Ring area and the Hole area, two peak coordinate points will be obtained. Figure 4 You can see that there is a peak and a trough, which correspond to the two peak coordinate points.
[0053] S3. Determine an offset according to the vertical coordinate difference of the peak coordinates, and determine a boundary of the light leakage detection area according to the boundary of the auxiliary positioning area and the offset.
[0054] It can be understood that the vertical coordinate difference between the peak coordinate points is the offset corresponding to the lower boundary of the Ring area and the upper boundary of the Hole area. ROI1, ROI2, and ROI3 each correspond to an offset, and the maximum offset is taken as the final offset.
[0055] See also Figure 4 It can be seen that, taking ROI2 as an example, the vertical coordinate difference of the peak coordinate is 15. After comprehensively comparing the vertical coordinate differences of ROI1, ROI2, and ROI3, the final offset can be determined. Since the upper boundary of the auxiliary positioning area is known, the lower boundary of the light leakage detection area can be determined after obtaining the final offset.
[0056] It is worth noting that when the detected target changes, the distance between the Hole area and the Ring area will change. When a fixed vertical offset threshold is used, the calculated lower boundary of the Ring area is not the actual position. The automatic calculation method can calculate the vertical offset between the Hole area and the Ring area in real time, which is used to update the lower boundary of the Ring area, thereby improving the accuracy of subsequent algorithm detection. Figure 5 As shown, it is a comparison diagram of the automatic calculation of the update boundary of the present application and the fixed threshold calculation boundary in the prior art. Figure 5 It can be seen that the boundaries determined in this application are more accurate.
[0057] In summary, the display panel boundary detection and positioning method in the present application acquires an image of the display panel to be detected, and intercepts a region of interest based on the auxiliary positioning area and the light leakage detection area in the image; calculates the gradient of the region of interest in the vertical direction, and determines the peak coordinates corresponding to the maximum gradient value; determines the offset according to the vertical coordinate difference of the peak coordinates, and determines the boundary of the light leakage detection area according to the boundary of the auxiliary positioning area and the offset.
[0058] That is, the present application detects the features of the image of the region of interest, calculates the gradient in the vertical direction, and finally updates the boundary information according to the positioning standard. Therefore, when the detected target changes, its positioning accuracy can also be met, and the stability is high.
[0059] In a second aspect, an embodiment of the present application further provides a display panel boundary detection and positioning device.
[0060] In one embodiment, referring to Figure 6 , Figure 6 This is a functional module diagram of an embodiment of a display panel boundary detection and positioning device of the present application. Figure 6As shown, the display panel boundary detection and positioning device includes a collection module, a calculation module and a positioning module.
[0061] Wherein, a collection module is used to collect an image of the display panel to be inspected, and to intercept an area of interest based on an auxiliary positioning area and a light leakage detection area in the image;
[0062] A calculation module, which is used to calculate the gradient in the vertical direction of the region of interest and determine the peak coordinates corresponding to the maximum gradient value;
[0063] A positioning module determines an offset according to a vertical coordinate difference of the peak coordinates, and determines a boundary of a light leakage detection area according to a boundary of the auxiliary positioning area and the offset.
[0064] Furthermore, in one embodiment, the calculation module calculates the gradient in the vertical direction of the region of interest and determines the peak coordinates corresponding to the maximum gradient value, including:
[0065] Calculate the number of non-zero pixels in the horizontal direction of the region of interest to obtain a column array, the length of which is the height of the region of interest;
[0066] Calculate the gradient of the column array and get the gradient value array;
[0067] Determine the two peak coordinate points corresponding to the maximum gradient value in the gradient value array.
[0068] Furthermore, in one embodiment, the calculation module is used to:
[0069] According to the formula: gradient = (sum(i+1)-sum(i-1)) / 2, the gradient of the column array is calculated to obtain the gradient value array gradient, where sum(i+1) is the element in the i+1th row of the column array, and sum(i-1) is the element in the i-1th row of the column array.
[0070] Furthermore, in one embodiment, the acquisition module intercepts the region of interest based on the auxiliary positioning region and the light leakage detection region in the image, including:
[0071] Taking the centroid of the auxiliary positioning area as the center, a rectangular area with a first width and a first height is intercepted as the region of interest.
[0072] Further, in another embodiment, the acquisition module intercepts the region of interest based on the auxiliary positioning region and the light leakage detection region in the image, including:
[0073] Taking the centroid of the auxiliary positioning area as the center, intercepting a rectangular area of a first width and a first height as a first region of interest;
[0074] The first region of interest is taken as a reference, and left and right offsets are performed based on a set offset to obtain a second region of interest and a third region of interest.
[0075] Among them, the functional implementation of each module in the above-mentioned display panel boundary detection and positioning device corresponds to each step in the above-mentioned display panel boundary detection and positioning method embodiment, and its functions and implementation processes are no longer repeated here.
[0076] In a third aspect, an embodiment of the present application provides a display panel boundary detection and positioning device, which may be a device with data processing function, such as a personal computer (PC), a notebook computer, or a server.
[0077] Reference Figure 7 , Figure 7 Schematic diagram of the hardware structure of the display panel boundary detection and positioning device involved in the embodiment of the present application. In the embodiment of the present application, the display panel boundary detection and positioning device may include a processor, a memory, a communication interface and a communication bus.
[0078] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0079] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to realize the interconnection of devices inside the display panel boundary detection and positioning device, and an interface for realizing the interconnection of the display panel boundary detection and positioning device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display screen (Display), a keyboard (Keyboard), etc.
[0080] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0081] The processor may be a general-purpose processor, and the general-purpose processor may call the display panel boundary detection and positioning program stored in the memory, and execute the display panel boundary detection and positioning method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the display panel boundary detection and positioning program is called may refer to the various embodiments of the display panel boundary detection and positioning method of the present application, and will not be repeated here.
[0082] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0083] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.
[0084] The readable storage medium of the present application stores a display panel boundary detection and positioning program, wherein when the display panel boundary detection and positioning program is executed by a processor, the steps of the display panel boundary detection and positioning method as described above are implemented.
[0085] Among them, the method implemented when the display panel boundary detection and positioning program is executed can refer to the various embodiments of the display panel boundary detection and positioning method of the present application, and will not be repeated here.
[0086] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0088] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0089] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0090] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0091] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0092] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A display panel boundary detection and positioning method, characterized in that: The display panel boundary detection and positioning method comprises: Acquire an image of the display panel to be inspected, and intercept an area of interest based on an auxiliary positioning area and a light leakage inspection area in the image; Calculate the gradient in the vertical direction of the region of interest and determine the peak coordinates corresponding to the maximum gradient value; The offset is determined according to the vertical coordinate difference of the peak coordinates, and the boundary of the light leakage detection area is determined according to the boundary of the auxiliary positioning area and the offset.
2. The display panel boundary detection and positioning method according to claim 1, characterized in that: The step of calculating the gradient in the vertical direction of the region of interest and determining the peak coordinate corresponding to the maximum gradient value includes: Calculate the number of non-zero pixels in the horizontal direction of the region of interest to obtain a column array, the length of which is the height of the region of interest; Calculate the gradient of the column array and get the gradient value array; Determine the two peak coordinate points corresponding to the maximum gradient value in the gradient value array.
3. The display panel boundary detection and positioning method according to claim 2, wherein: According to the formula: gradient = (sum(i+1)-sum(i-1)) / 2, the gradient of the column array is calculated to obtain the gradient value array gradient, where sum(i+1) is the element in the i+1th row of the column array, and sum(i-1) is the element in the i-1th row of the column array.
4. The display panel boundary detection and positioning method according to claim 1, characterized in that: The intercepting the region of interest based on the auxiliary positioning region and the light leakage detection region in the image comprises: Taking the centroid of the auxiliary positioning area as the center, a rectangular area with a first width and a first height is intercepted as the region of interest.
5. The display panel boundary detection and positioning method according to claim 1, characterized in that: The intercepting the region of interest based on the auxiliary positioning region and the light leakage detection region in the image comprises: Taking the centroid of the auxiliary positioning area as the center, intercepting a rectangular area of a first width and a first height as a first region of interest; The first region of interest is taken as a reference, and left and right offsets are performed based on a set offset to obtain a second region of interest and a third region of interest.
6. The display panel boundary detection and positioning method according to claim 4 or 5, characterized in that: The first width is 20 pixels, and the first height is the height of the image.
7. The display panel boundary detection and positioning method according to claim 1, wherein: The display panel to be detected is a display panel of a mobile phone, a camera or a tablet, and the auxiliary positioning area is a camera hole area of the mobile phone, the camera or the tablet.
8. A display panel boundary detection and positioning device, characterized in that: The display panel boundary detection and positioning device comprises: An acquisition module, which is used to acquire an image of the display panel to be inspected, and to intercept an area of interest based on an auxiliary positioning area and a light leakage detection area in the image; A calculation module, which is used to calculate the gradient in the vertical direction of the region of interest and determine the peak coordinates corresponding to the maximum gradient value; A positioning module determines an offset according to a vertical coordinate difference of the peak coordinates, and determines a boundary of a light leakage detection area according to a boundary of the auxiliary positioning area and the offset.
9. A display panel boundary detection and positioning device, characterized in that: The display panel boundary detection and positioning device includes a processor, a memory, and a display panel boundary detection and positioning program stored in the memory and executable by the processor, wherein when the display panel boundary detection and positioning program is executed by the processor, the steps of the display panel boundary detection and positioning method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a display panel boundary detection and positioning program, wherein when the display panel boundary detection and positioning program is executed by a processor, the steps of the display panel boundary detection and positioning method according to any one of claims 1 to 7 are implemented.
