Precision measurement methods, systems, media, equipment and terminals for flat panel screen gap dimensions

By combining grayscale and block statistics with the adaptive Hough line detection using the bisection method, the problems of low efficiency and poor accuracy in the measurement of screen gap size in flat panels are solved. This enables precise positioning of the outer edge of the R-zone of the back cover of the flat panel and precise measurement of the screen gap size, thus expanding the working range of the vision system.

CN115775230BActive Publication Date: 2025-11-14WUHAN UNIV OF TECH CHONGQING RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211440246.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-11-14
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

In existing technologies, the measurement of screen gap size of flat panels is inefficient and inaccurate, making it difficult to achieve automated measurement. Furthermore, existing edge line detection algorithms cannot eliminate interference from non-target edges and cannot achieve adaptive line detection.

Method used

By using grayscale and setting the region of interest, region extraction and segmentation based on block statistics, combined with adaptive Hough line detection using the bisection method, the precise positioning of the outer edge of the R-zone and the precise measurement of the screen gap size are achieved.

Benefits of technology

It enables precise, non-contact, and automated measurement of the screen gap size of flat panels, expands the working range of vision systems, improves measurement efficiency and accuracy, and solves the measurement complexity and interference problems existing in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115775230B_ABST
    Figure CN115775230B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of flat panel screen gap size measurement technology, and discloses a method, system, medium, device, and terminal for precise measurement of flat panel screen gap size. It involves pixel statistics from k sub-blocks through grayscale conversion and setting of the region of interest; obtaining the outer edge region of the R-zone through region extraction and segmentation based on block statistics; achieving precise localization of the outer edge in the local image of the R-zone through adaptive Hough line detection based on the bisection method; and applying the bisection method to the Hough transform, making the Hough transform adaptable to all local images of the screen gap and completing adaptive line detection. This invention reduces image complexity and highlights the proportion of the detection target by grayscale conversion and setting of the region of interest, improving the execution time and efficiency of the image algorithm; the region extraction allows subsequent algorithms to better handle the outer edge and eliminate interference from other edges; and the adaptive threshold segmentation improves the accuracy and efficiency of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of flat panel screen gap size measurement technology, and particularly relates to a method, system, medium, device and terminal for precise measurement of flat panel screen gap size. Background Technology

[0002] The screen gap is a tiny gap formed between the touchscreen and the back cover of a tablet during assembly. The dimensional tolerance of this gap significantly affects the product quality of the tablet. While touchscreens are manufactured with high precision, the back cover is prone to dimensional deviations due to current limitations in manufacturing processes. The rounded area (R-zone) on the back cover is a small, rounded region designed to facilitate assembly with the touchscreen; its dimensions directly determine the dimensional tolerance of the screen gap.

[0003] Currently, most methods involve manually measuring the screen gap size using plug gauges. However, manual measurement is inefficient, the results are subjective, and accuracy cannot be guaranteed. Using a two-dimensional measuring instrument relies on manual labor and is insufficient for automated measurement. Vision measurement can be used to perform non-contact measurement of the R-zone dimensions of a flat panel back cover, indirectly automating the screen gap measurement. However, single image acquisition is limited by the size of the image sensor, making full-size vision measurement of large workpieces like flat panel back covers difficult.

[0004] The core of the image algorithm for measuring the screen gap size of a flat panel is the straight line detection of the outer edge of the R area of ​​the back cover of the flat panel. However, the boundaries of different areas of the workpiece form other edges in the image. Existing edge straight line detection algorithms cannot eliminate the interference of non-target edges. The actual workpiece surface has scratches, bright spots and other surface defects and uneven gray levels, which cause local damage and blurring of the edges in the image. The algorithm is difficult to apply directly in such situations with large interference and cannot achieve adaptive straight line detection.

[0005] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:

[0006] (1) The traditional method of directly measuring the screen gap size by hand is inefficient and has poor accuracy, while the two-dimensional measurement method relies on manual labor and is difficult to automate.

[0007] (2) In the existing indirect measurement methods based on machine vision, single image acquisition is limited by the size of the image sensor, making it difficult to perform full-size visual measurement of large workpieces such as flat panel back covers.

[0008] (3) Existing edge line detection algorithms cannot eliminate interference from non-target edges, making them difficult to apply directly in situations with significant interference, and they cannot achieve adaptive line detection. Summary of the Invention

[0009] To address the problems existing in the prior art, this invention provides a method, system, medium, device, and terminal for precise measurement of flat panel screen gap size.

[0010] This invention is implemented as follows: a method for precise measurement of the screen gap size of a flat panel, comprising: performing pixel statistics from k sub-blocks by grayscale conversion and setting the region of interest; obtaining the outer edge region of region R by region extraction and segmentation based on block statistics; achieving precise localization of the outer edge in the local image of region R by adaptive Hough line detection based on the bisection method; and applying the bisection method to the Hough transform, so that the Hough transform adapts to all local images of the screen gap and completes adaptive line detection.

[0011] Furthermore, the method for precise measurement of the screen gap size of a flat panel includes the following steps:

[0012] Step 1: Determine the region L to which the local image in area R belongs based on the local image acquisition location, convert the original RGB image to grayscale, and set the region of interest (ROI).

[0013] Step 2: Divide the sub-blocks into k equal-distance sub-blocks according to the axis of symmetry and set statistical windows in the sub-blocks. Perform mean and standard deviation statistics on the pixels in the window regions at different positions of the sub-blocks.

[0014] Step 3: Determine the midpoint of the outer edge and the segmentation threshold of the outer edge region in the k sub-blocks, coarsely locate the midpoint and angle of the outer edge and calculate the adaptive segmentation threshold;

[0015] Step 4: Construct the minimum bounding rectangle of the outer edge to extract the outer edge region, and perform binary segmentation of the outer edge region using an adaptive segmentation threshold;

[0016] Step 5: Extract the outer edge region after binary segmentation, use Hough transform based on the bisection method to detect the outer edge line, and fuse the information of local measurement points to complete the precise measurement of the screen gap size.

[0017] Furthermore, in step one, determining the region L to which the local image of area R belongs based on the local image acquisition location includes:

[0018] a. If L=1, then the local image of region R was acquired on the left side of the back cover of the flat plate;

[0019] b. If L=2, then the local image of region R is acquired from the lower part of the back cover of the flat plate;

[0020] c. If L=3, then the local image of region R was acquired on the right side of the back cover of the tablet;

[0021] d. If L=4, then the local image of region R is acquired on the upper part of the back cover of the flat plate.

[0022] Step one, converting the original RGB image to grayscale and setting the region of interest (ROI), includes:

[0023] After converting the local image of the R region of the 3-channel image to grayscale, then using a fixed width d... R Extract a ROI image of size M×N from the center of the grayscale image.

[0024] When L=1 or L=3, the ROI image size M=d R N is the number of rows in the grayscale image;

[0025] When L=2 or L=4, the ROI image size is N=d. R M is the number of columns in the grayscale image.

[0026] Furthermore, step two, which involves dividing the scale into k sub-blocks at equal intervals based on the axis of rotation and setting the statistical windows within each sub-block, includes:

[0027] Let the ROI image size be M×N, the sub-block width be d, and the statistical window width be ds.

[0028] When L = 1 or L = 3, divide the vertical axis into k equally spaced sub-blocks of size M × d, with y = N / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d. s ×d;

[0029] When L = 2 or L = 4, divide the horizontal direction into k equally spaced sub-blocks of size d × N, with y = M / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d × d. s .

[0030] Step two involves calculating the mean and standard deviation of pixels in different locations within the window region of the sub-block, including:

[0031] Set the position of the statistics window to the position of the geometric center point.

[0032] When L=1 or L=3, the statistical window moves from left to right along the image x-axis and calculates the mean and standard deviation of pixels within the window region; for sub-block B i When the x-coordinate of the statistical window position is j, the image of the window region is R(j). The mean M(j) and standard deviation S(j) of the window region are calculated using the following formula:

[0033]

[0034] When L=2 or L=4, the statistical window moves from top to bottom along the image y-axis and calculates the mean and standard deviation of pixels within the window region; for sub-block B i When the y-coordinate of the statistical window position is j, the image of the window region is R(j), and the mean M(j) and standard deviation S(j) of the window region are calculated.

[0035] Furthermore, step three, determining the midpoint of the outer edge and the segmentation threshold of the outer edge region in the k sub-blocks, includes:

[0036] Let's assume it's in sub-block B i In this context, when the statistical window is located at the midpoint of the outer edge, the areas on both sides of the outer edge occupy equal areas within the window, and the mean pixel value of the window area is between the mean gray values ​​of the areas on both sides of the outer edge, then the standard deviation of the pixels in the window area is the maximum value.

[0037] When L=1 or L=3, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates are solved according to the following formula, with M(x) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i ;

[0038]

[0039] When L=2 or L=4, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates can be calculated similarly, using M(y) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i .

[0040] For k sub-blocks, determine the segmentation thresholds for the midpoint of the outer edge and the outer edge region in the k sub-blocks.

[0041] Step three, which involves coarsely locating the midpoint and angle of the outer edge and calculating the adaptive segmentation threshold, includes:

[0042] When L = 1 or L = 3, the coordinates Q of the midpoint of the outer edge are coarsely located using equation (4). a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. a Calculate the average slope and roughly locate the angle of the outer edge in the Hough polar coordinate system. The adaptive segmentation threshold T for the outer edge region is calculated using the following formula. a :

[0043]

[0044] When L=2 or L=4, the coordinates of the midpoint Q of the outer edge are similar to those for coarse positioning. a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. aCalculate the average slope and coarsely locate the angle θ of the outer edge in the Hough polar coordinate system. a (θ a ∈[π / 4,3π / 4]), the adaptive segmentation threshold T of the outer edge region is calculated. a .

[0045] Furthermore, step four, which involves constructing the minimum bounding rectangle of the outer edge to extract the outer edge region, includes:

[0046] Let the precise angle θ of the outer edge be θ a Within the δ neighborhood, the angular range of the outer edge in the Hough polar coordinate system is determined as [β]. l ,β r ], and the midpoint Q of the coarsely located outer edge a As the geometric center of the smallest enclosing rectangle.

[0047] When L = 1 or L = 3, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(sin(β) l ))>abs(sin(β r If )), then take β. l Use the diagonal of the smallest enclosing rectangle; otherwise, take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region.

[0048] When L = 2 or L = 4, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(cos(β) l ))>abs(cos(β r If )), then take β. l Use the diagonal of the smallest enclosing rectangle; otherwise, take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region.

[0049] Step four, which involves binary segmenting the outer edge region using an adaptive segmentation threshold, includes:

[0050] For the extracted outer edge region, an adaptive segmentation threshold T is used. a Perform binarization segmentation.

[0051] When L=1 or L=3, the left and right regions are divided with the outer edge as the boundary.

[0052] When L=2 or L=4, the upper and lower regions are divided with the outer edge as the boundary.

[0053] Furthermore, step five involves edge extraction of the outer edge region after binary segmentation, which includes:

[0054] The Canny operator is used to extract the outer edge region after binary segmentation.

[0055] When L=1 or L=3, extract the outer edges on the boundaries of the left and right regions.

[0056] When L=2 or L=4, extract the outer edges on the boundaries of the upper and lower regions.

[0057] Step five, which involves detecting outer edge lines using the Hough transform based on the bisection method, includes:

[0058] (1) Set the initial search interval v l =0 and The length of the convergence interval ε, and the distance r during Hough transform discretization. h and angle θ h The detection range of the angle of the straight line [β] l ,β r ]; Set the initial value of the accumulator threshold v to v l Set the iteration flag F to true;

[0059] (2) Determine whether to execute the binary search loop based on the iteration flag F. Start the loop when F is true, otherwise end the loop.

[0060] (3) When v r -v l When ε > ε, let the accumulator threshold v = (v l +v r ) / 2; when v r -v l When ε <= ε, let the accumulator threshold v = v l Set F to false;

[0061] (4) Use Hough transform to detect the edges extracted by Canny under the accumulator threshold v, and obtain the distance and angle of H straight lines;

[0062] (5) Determine based on the number of lines H: When H > 1, let the left endpoint v of the binary search interval be v. l =v; When H==0, let v be the right endpoint of the binary search interval. r =v; When H == 1, set F to false and terminate the loop;

[0063] (6) The loop body returns to step (2) for judgment;

[0064] (7) After the loop ends, take the final line detection result. If there are multiple approximately equal solutions (r,θ) in the detection result, then average the multiple results to obtain a unique (r,θ).

[0065] (8) Find the midpoint of the outer edge of the local image based on the part L to which the local image belongs: when L = 1 or L = 3, the y-coordinate of the midpoint is N / 2; when L = 2 or L = 4, the x-coordinate of the midpoint is M / 2.

[0066] Step five, which involves fusing information from local measurement points to complete the precise measurement of the screen gap size, includes:

[0067] Based on the midpoint of the outer edge in 16 local images, the physical coordinates of 16 local outer edge measurement points are obtained. The distance of the local outer edge is measured according to the following formula. The average value of multiple sets of local outer edge distance measurement results is used to obtain the distance of the outer edge of the R area. Based on the standard touch screen size, the screen gap size is accurately measured indirectly.

[0068]

[0069] Another objective of this invention is to provide a precision measurement system for the screen gap size of a flat panel using the aforementioned precision measurement method. The precision measurement system for the screen gap size of a flat panel includes a vision system and a motion system. The vision system uses a high-resolution camera to present a clear image of the object being measured, and the motion system uses high-precision dual linear motors to synchronously drive and achieve precise movement and positioning of the vision system.

[0070] The vision system uses an MV-CA050-A0GM monochrome CCD camera, an MVL-HT-1-65 telecentric lens, and a P-RV-5080-1 ring light source mounted on the front to provide clear images with a resolution of 2448×2048.

[0071] The mobile system adopts a gantry structure and uses a Hanqu HWP220 high-precision linear motor as the drive motor. A Siemens S7-1200 PLC controls the dual motors to drive the x and y axes synchronously. The movement distance is fed back by a grating ruler to realize the positioning of the vision system in a two-dimensional plane, thus extending the working range of monocular vision to 340×340mm.

[0072] Another object of the present invention is to provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the method for precise measurement of the screen gap size of the flat panel.

[0073] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method for precise measurement of the screen gap size of a flat panel.

[0074] Another objective of this invention is to provide an information data processing terminal for implementing the aforementioned precision measurement system for flat panel screen gap dimensions.

[0075] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:

[0076] First, addressing the technical problems existing in the prior art and the difficulty of solving them, this paper closely analyzes, in conjunction with the technical solution to be protected by this invention and the results and data obtained during the research and development process, how the technical solution of this invention solves the technical problems, and the inventive technical effects brought about by solving these problems. The specific description is as follows:

[0077] To address the limitations of existing measurement equipment and methods in accurately measuring the screen gap size of flat panel displays, this invention designs a mobile vision measurement system. This system utilizes dual-motor synchronous drive to achieve precise monocular vision-based mobile positioning. Local information is acquired at 16 local image acquisition locations in the R-zone of the flat panel's back cover. Through local information fusion, the full-size precise measurement of the R-zone of the flat panel's back cover is achieved, ultimately indirectly realizing the precise measurement of the screen gap size. Furthermore, addressing the issue that existing edge line detection algorithms are difficult to directly apply to local images of the R-zone, this invention proposes a line detection algorithm for the outer edge of the R-zone. This algorithm rapidly obtains accurate outer edge regions of the R-zone through region extraction and segmentation based on block statistics, and accurately locates the outer edges in the local images of the R-zone using adaptive Hough line detection based on a bisection method.

[0078] This invention provides a precision measurement system for the screen gap size of a flat panel. Because the back cover of a flat panel is large and the camera's field of view cannot cover the entire detection area, a moving vision method is used for overall size measurement. The camera moves to multiple local image acquisition positions and acquires images, expanding the working range of the vision and ultimately achieving precise, non-contact, and automated measurement of the screen gap size. This invention reduces image complexity and highlights the proportion of the detection target by using grayscale and setting regions of interest, improving the execution time of the image algorithm and increasing efficiency. This invention performs pixel statistics from k sub-blocks, which can stably determine the outer edge and segmentation threshold. By adjusting the value of k, the accuracy of the coarsely located outer edge midpoint and adaptive segmentation threshold can be improved while maintaining efficiency. This invention uses region extraction to allow subsequent algorithms to better handle the outer edge and eliminate interference from other edges; adaptive threshold segmentation solves the problem of traditional segmentation algorithms requiring manual threshold setting, improving the accuracy and efficiency of the algorithm. This invention applies the bisection method to the Hough transform, enabling the Hough transform to perform line detection with the optimal accumulator threshold, allowing the Hough transform to adapt to all local images of the screen gap and complete adaptive line detection.

[0079] Second, considering the technical solution as a whole or from a product perspective, the technical effects and advantages of the technical solution to be protected by this invention are specifically described as follows:

[0080] This invention provides a system for precise measurement of the screen gap size of a flat panel, enabling the measurement of the entire R-zone of the flat panel's back cover. The purpose of this invention is to provide a precise and efficient system for large-sized workpieces such as flat panel back covers, expanding the working range of vision systems and solving the problem of traditional vision measurement being limited by object size. By using the flat panel back cover as the measurement subject, precise measurement of the screen gap size is indirectly achieved, reducing the complexity of precise screen gap measurement.

[0081] This invention provides an algorithm for precise measurement of the screen gap size of a flat panel, enabling the detection of straight lines at the outer edges of local images of the screen gap. The purpose of this invention is to provide an accurate and effective algorithm for detecting straight lines at the edges of the R-zone of a flat panel's back cover. Based on this algorithm, outer edges can be detected in local images, thus solving the problems of existing algorithms being unable to exclude other edges and being difficult to apply directly in situations with significant interference. This provides an algorithmic foundation for achieving precise measurement of the screen gap size.

[0082] Third, as supplementary evidence of the inventive step of the claims of this invention, it is also reflected in the following important aspects:

[0083] (1) The technical solution of the present invention fills the technical gap in the industry at home and abroad: The technical solution of the present invention fills the gap in visual measurement technology for large-sized workpieces such as flat back covers.

[0084] (2) The technical solution of the present invention solves the technical problem that people have long wanted to solve but have never been able to solve: The technical solution of the present invention solves the problem of rapid, accurate and stable detection of the outer edge of the R area of ​​the back cover of a flat plate in the case of precise measurement of screen gap size. Attached Figure Description

[0085] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0086] Figure 1 This is a flowchart of a method for precise measurement of the screen gap size of a flat panel provided in an embodiment of the present invention;

[0087] Figure 2 This is a schematic diagram of the method for precise measurement of the screen gap size of a flat panel provided in an embodiment of the present invention;

[0088] Figure 3 This is a schematic diagram of the structure of the mobile vision measurement system provided in an embodiment of the present invention;

[0089] Figure 4 This is a schematic diagram of 16 local image acquisition locations provided in an embodiment of the present invention;

[0090] Figure 5 This is a schematic diagram of a local outer edge ranging model provided in an embodiment of the present invention;

[0091] Figure 6 This is a schematic diagram of a partial image of region R provided in an embodiment of the present invention;

[0092] Figure 7 This is a schematic diagram of the ROI image provided in an embodiment of the present invention;

[0093] Figure 8 This is a schematic diagram of dividing the data into k sub-blocks according to an embodiment of the present invention;

[0094] Figure 9 This is a schematic diagram of the midpoint of the outer edge of one of the k sub-blocks provided in an embodiment of the present invention;

[0095] Figure 10 This is a schematic diagram of the outer edge region extracted using the minimum bounding rectangle provided in an embodiment of the present invention;

[0096] Figure 11 This is a schematic diagram of adaptive threshold segmentation of the outer edge region provided in an embodiment of the present invention;

[0097] Figure 12This is a schematic diagram of edge extraction provided in an embodiment of the present invention;

[0098] Figure 13 This is a schematic diagram of the outer edge straight line detection results provided in an embodiment of the present invention;

[0099] Figure 14 This is a schematic diagram illustrating the effect of sub-block width d on the error rate provided in an embodiment of the present invention;

[0100] Figure 15 This is a schematic diagram illustrating the impact of the number of sub-blocks on the average algorithm time provided in an embodiment of the present invention;

[0101] Figure 16 Figure (a) is a schematic diagram of the outer edge detection error provided in the embodiment of the present invention, and Figure (b) is a schematic diagram of the angle error of the outer edge line detection.

[0102] Figure 17 These are schematic diagrams of the detection results of different line detection algorithms provided in the embodiments of the present invention; wherein, Figure (a) is a schematic diagram of LSD detection results, Figure (b) is a schematic diagram of Hough detection results, Figure (c) is a schematic diagram of LS fitting results, and Figure (d) is a schematic diagram of the detection results of the present invention;

[0103] Figure 18 These are schematic diagrams of the outer edge line detection results at different locations provided in the embodiments of the present invention; wherein, Figure (a) is a schematic diagram of the L1 detection result, Figure (b) is a schematic diagram of the L2 detection result, Figure (c) is a schematic diagram of the L3 detection result, and Figure (d) is a schematic diagram of the L4 detection result;

[0104] Figure 19 This is a schematic diagram illustrating the data fluctuation of different samples provided in the embodiments of the present invention;

[0105] Figure 20 This is a schematic diagram of the measurement error of the R-zone dimension provided in an embodiment of the present invention. Detailed Implementation

[0106] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0107] To address the problems existing in the prior art, the present invention provides a method, system, medium, device and terminal for precise measurement of flat panel screen gap size. The present invention will be described in detail below with reference to the accompanying drawings.

[0108] I. Explanatory and Illustrative Embodiments. To enable those skilled in the art to fully understand how the present invention is specifically implemented, this section provides an explanatory and illustrative description of the embodiments described in the claims.

[0109] like Figure 1 As shown, the method for precise measurement of the screen gap size of a flat panel provided in this embodiment of the invention includes the following steps:

[0110] S101, determine the location L of the local image in region R based on the location of the local image acquisition, convert the original RGB image to grayscale and set the region of interest (ROI);

[0111] S102, Divide the sub-blocks into k equal-distance sub-blocks according to the axis of symmetry and set statistical windows in the sub-blocks, and perform mean and standard deviation statistics on the pixels in the window regions at different positions of the sub-blocks;

[0112] S103, determine the midpoint of the outer edge and the segmentation threshold of the outer edge region in k sub-blocks, coarsely locate the midpoint and angle of the outer edge and calculate the adaptive segmentation threshold;

[0113] S104, construct the minimum bounding rectangle of the outer edge to extract the outer edge region, and perform binary segmentation of the outer edge region with an adaptive segmentation threshold;

[0114] S105 performs edge extraction on the outer edge region after binary segmentation, detects the outer edge straight line using Hough transform based on the bisection method, and fuses the information of local measurement points to complete the precise measurement of the screen gap size.

[0115] As a preferred embodiment, such as Figure 2 As shown, the precise measurement method for the screen gap size of a flat panel provided in this embodiment of the invention specifically includes the following steps:

[0116] Step 1: Determine the location L of the local image in area R based on the location of the local image acquisition;

[0117] a. If L=1, then the local image of region R was acquired on the left side of the back cover of the flat plate;

[0118] b. If L=2, then the local image of region R is acquired from the lower part of the back cover of the flat plate;

[0119] c. If L=3, then the local image of region R was acquired on the right side of the back cover of the tablet;

[0120] d. If L=4, then the local image of region R is acquired on the upper part of the back cover of the flat plate.

[0121] Step 2: Convert the original RGB image to grayscale and set the region of interest (ROI);

[0122] The local image of the R region in the 3-channel array is converted to grayscale, and then a fixed width d is applied.R Extract a ROI image of size M×N from the center of the grayscale image.

[0123] When L=1 or L=3, the ROI image size M=d R N is the number of rows in the grayscale image.

[0124] When L=2 or L=4, the ROI image size is N=d. R M is the number of columns in the grayscale image.

[0125] Step 3: Divide the scale into k sub-blocks at equal intervals according to the weighing axis and set the statistical window in the sub-blocks;

[0126] Let the ROI image size be M×N, the sub-block width be d, and the statistical window width be ds.

[0127] When L = 1 or L = 3, divide the vertical axis into k equally spaced sub-blocks of size M × d, with y = N / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d. s ×d.

[0128] When L = 2 or L = 4, divide the horizontal direction into k equally spaced sub-blocks of size d × N, with y = M / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d × d. s .

[0129] Step 4: Calculate the mean and standard deviation of pixels in the window region at different positions of the sub-block;

[0130] Set the position of the statistics window to the position of its geometric center point.

[0131] When L=1 or L=3, the statistical window moves from left to right along the image x-axis and calculates the mean and standard deviation of pixels within the window region. For sub-block B i When the x-coordinate of the statistical window position is j, the image of the window region is R(j). The mean M(j) and standard deviation S(j) of the window region can be obtained according to equation (2).

[0132]

[0133] When L=2 or L=4, the statistical window moves from top to bottom along the image y-axis and calculates the mean and standard deviation of pixels within the window region. For sub-block B i When the y-coordinate of the statistical window position is j, the image of the window region is R(j). The mean M(j) and standard deviation S(j) of the window region can be calculated similarly.

[0134] Step 5: Determine the segmentation thresholds for the midpoints of the outer edges and the outer edge regions in the k sub-blocks;

[0135] Let's assume it's in sub-block B iIn this context, when the statistical window is located at the midpoint of the outer edge, the areas on both sides of the outer edge occupy equal areas within the window, and the mean pixel value of the window area is between the mean gray values ​​of the areas on both sides of the outer edge of the window, the standard deviation of the pixels in the window area is at its maximum value.

[0136] When L=1 or L=3, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates can be obtained according to equation (3), with M(x) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i .

[0137]

[0138] When L=2 or L=4, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates can be calculated similarly, using M(y) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i .

[0139] For k sub-blocks, the segmentation thresholds for the midpoint of the outer edge and the outer edge region in the k sub-blocks can be determined.

[0140] Step 6: Coarsely locate the midpoint and angle of the outer edge and calculate the adaptive segmentation threshold;

[0141] When L = 1 or L = 3, the coordinates Q of the midpoint of the outer edge are coarsely located using equation (4). a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. a Calculate the average slope to roughly determine the angle of the outer edge in the Hough polar coordinate system. The adaptive segmentation threshold T of the outer edge region is calculated using equation (5). a .

[0142]

[0143] When L=2 or L=4, the coordinates of the midpoint Q of the outer edge are similar to those for coarse positioning. a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. a Calculate the average slope to roughly determine the angle θ of the outer edge in the Hough polar coordinate system. a (θ a ∈[π / 4,3π / 4]), similar to calculating the adaptive segmentation threshold T for the outer edge region. a .

[0144] Step 7: Construct the minimum bounding rectangle of the outer edge to extract the outer edge region;

[0145] Let the precise angle θ of the outer edge be θ a Within the δ-neighborhood, the angular range of the outer edge in the Hough polar coordinate system is determined to be [β]. l ,β r The midpoint Q of the coarsely located outer edge. a As the geometric center of the smallest enclosing rectangle.

[0146] When L = 1 or L = 3, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(sin(β) l ))>abs(sin(β r If )), then take β. l As the diagonal of the smallest enclosing rectangle, otherwise take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region.

[0147] When L = 2 or L = 4, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(cos(β) l ))>abs(cos(β r If )), then take β. l As the diagonal of the smallest enclosing rectangle, otherwise take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region.

[0148] Step 8: Perform binary segmentation on the outer edge region using an adaptive segmentation threshold;

[0149] For the extracted outer edge region, an adaptive segmentation threshold T is used. a Perform binarization segmentation.

[0150] When L=1 or L=3, the left and right regions are divided with the outer edge as the boundary.

[0151] When L=2 or L=4, the upper and lower regions are divided with the outer edge as the boundary.

[0152] Step 9: Extract the edges of the outer edge region after binary segmentation;

[0153] The Canny operator is used to extract the outer edge region after binary segmentation.

[0154] When L=1 or L=3, extract the outer edges on the boundaries of the left and right regions.

[0155] When L=2 or L=4, extract the outer edges on the boundaries of the upper and lower regions.

[0156] Step 10: Use Hough transform based on bisection to detect outer edge straight lines;

[0157] (1) Set the initial search interval v l =0 and The length of the convergence interval ε, and the distance r during Hough transform discretization. h and angle θ h The detection range of the angle of the straight line [β] l ,β r The initial value of the accumulator threshold v is set to v. l The iteration flag F is set to true.

[0158] (2) Determine whether to execute the binary search loop based on the iteration flag F. Start the loop when F is true, otherwise end the loop.

[0159] (3) When v r -v l When ε > ε, let the accumulator threshold v = (v l +v r ) / 2; when v r -v l When ε <= ε, let the accumulator threshold v = v l Set F to false.

[0160] (4) Use Hough transform to detect the edges extracted by Canny under the accumulator threshold v, and obtain the distance and angle of H straight lines.

[0161] (5) Determine based on the number of lines H: When H > 1, let the left endpoint v of the binary search interval be v. l =v. When H = 0, let v be the right endpoint of the binary search interval. r =v; when H==1, set F to false and terminate the loop.

[0162] (6) The loop body returns to (2) to make a judgment.

[0163] (7) After the loop ends, take the final line detection result. If there are multiple approximately equal solutions (r,θ) in the detection result, then average the multiple results to obtain a unique (r,θ).

[0164] (8) Find the midpoint of the outer edge of the local image based on the part L to which the local image belongs: when L = 1 or L = 3, the y-coordinate of the midpoint is N / 2; when L = 2 or L = 4, the x-coordinate of the midpoint is M / 2.

[0165] Step 11: Integrate information from local measurement points to complete the precise measurement of the screen gap size;

[0166] Based on the midpoint of the outer edge in 16 local images, the physical coordinates of 16 local outer edge measurement points are obtained. The distance of the local outer edge is measured according to formula (1). The average value of multiple sets of local outer edge distance measurement results is used to obtain the distance of the outer edge of the R area. The screen gap size is accurately measured indirectly according to the standard touch screen size.

[0167] The system structure for precise measurement of flat panel screen gap size provided in this embodiment of the invention is as follows:

[0168] The mobile vision measurement system centers on a vision system and a motion system. The vision system uses a high-resolution camera to present clear images of the object being measured, while the motion system uses high-precision dual linear motors for synchronous drive to achieve precise movement and positioning of the vision system. The mobile vision measurement system, for example... Figure 3 As shown.

[0169] For the vision system, since precision measurement requires high image quality, the selected camera is an MV-CA050-A0GM black and white CCD camera with an MVL-HT-1-65 telecentric lens and a P-RV-5080-1 ring light source mounted on the front. The vision system can provide clear images with a resolution of 2448×2048.

[0170] The mobile system adopts a gantry structure, using a Hanqu HWP220 high-precision linear motor as the drive motor, and a Siemens S7-1200 PLC to control the dual motors to synchronously drive the x and y axes. The movement distance is fed back by a grating ruler, realizing the precise positioning of the vision system in a two-dimensional plane, and extending the working range of monocular vision to 340×340mm.

[0171] This invention is implemented as follows: a system for precise measurement of the screen gap size of a flat panel, the system principle of which is as follows:

[0172] Based on the rectangular structure of the flat plate back cover, let the left, lower, right, and upper parts of the R area of ​​the flat plate back cover be L1, L2, L3, and L4, respectively. According to the workpiece coordinate system, 5, 3, 5, and 3 local image acquisition positions are sequentially set at equal intervals at L1, L2, L3, and L4, respectively. Figure 4 As shown. Because the distortion at the center is relatively small when the CCD camera is imaging, the midpoint of the outer edge in the local image of region R is taken as the measurement point, and the physical coordinates of the measurement point are obtained from the calibrated camera intrinsic and extrinsic parameters.

[0173] Let the physical coordinates P of the measurement point be obtained at the local image acquisition position i in L1. i The vision system locates the physical coordinates P of the measurement point at the local image acquisition position j corresponding to L3.j The distance to the local outer edge of region R can be measured in the global coordinate system. A schematic diagram of the distance measurement at the local outer edge of region R is shown below. Figure 5 As shown.

[0174] Let the distances of movement of the vision system along the x and y axes, as fed back by the grating ruler, be Δx and Δy, respectively. i-j Δy i-j Considering the error of the mobile system, Δy i-j The value is not zero. Due to clamping errors, the outer edge of the screen gap is not parallel to the y-axis of the moving system, and the included angle is... The distance D can be obtained by taking the median value of the outer edge line detection angle in the 16 local images. From the schematic diagram of the local outer edge measurement in region R, it can be seen that the distance D from the measurement point pair to the local outer edge of region R is... i-j It can be calculated according to formula (1). The distance of the outer edge of the R area is obtained by averaging the results of multiple local outer edge distance measurements, and the screen gap size is indirectly measured according to the standard touch screen size.

[0175]

[0176] In the workflow of the mobile vision measurement system, the mobile system is controlled by a PLC and driven by two synchronous motors to complete the positioning. The vision system sequentially positions itself to the local image acquisition position to acquire local images of the R area. The PC host computer uses multi-threading technology to perform concurrent image processing. The image algorithm performs line detection on the outer edge and takes the midpoint as the measurement point. The physical coordinates of the measurement point are obtained through the calibrated camera intrinsic and extrinsic parameters. The PLC feeds back the positioning information to the communicating PC host computer by acquiring the movement distance of the grating ruler. The local information is fused by combining the positioning information of the vision system with the physical coordinate information of the measurement point at the local image acquisition position to complete the measurement.

[0177] II. Application Examples. To demonstrate the inventiveness and technical value of the technical solution of this invention, this section provides application examples of the technical solution of the claims on specific products or related technologies.

[0178] The method for precise measurement of the screen gap size of a flat panel provided in this embodiment of the invention specifically includes the following steps:

[0179] Step 1: Determine the region L to which the local image of area R belongs based on the image acquisition location;

[0180] First, read the RGB image captured by the CCD camera at acquisition position 1, and determine the location of the R-area local image, L=1. This indicates that the R-area local image was acquired on the left side of the back cover of the tablet. Figure 6 As shown.

[0181] Step 2: Convert the original RGB image to grayscale and set the region of interest (ROI);

[0182] The local image of the R region in the 3-channel array is converted to grayscale, and then a fixed width d is applied. R =400 Extracting a Region of Interest (ROI) image of size M×N=400×2048 from the center of the grayscale image, the position R of the left boundary of the ROI image in the RGB image can be calculated. S =1024, the ROI image of the rectangular outline region is as follows Figure 7 As shown.

[0183] Step 3: Divide the area into k sub-blocks at equal intervals according to the axis of symmetry and set the statistical window in each sub-block;

[0184] Let the width of the sub-block be d = 381, and the width of the statistics window be ds = 21.

[0185] Divide the column vertically into k = 13 equal-spaced sub-blocks with dimensions M × d = 400 × 381, using y = 1024 as the axis of symmetry. The size of the statistical window within each sub-block is d. s ×d=21×381. Figure 8 This is a diagram illustrating the division into k sub-blocks.

[0186] Step 4: Calculate the mean and standard deviation of pixels in the window region at different positions of the sub-block;

[0187] Set the position of the statistics window to the position of its geometric center point.

[0188] The statistical window moves along the image x-axis from left x=10 to right x=388, and the mean and standard deviation of pixels within the window region are calculated. For sub-block B i When the x-coordinate of the statistical window position is j, the image of the window region is R(j). The mean M(j) and standard deviation S(j) of the window region can be obtained according to equation (1).

[0189]

[0190] Step 5: Determine the segmentation thresholds for the midpoints of the outer edges and the outer edge regions in the k sub-blocks;

[0191] Let's assume it's in sub-block B i In this context, when the statistical window is located at the midpoint of the outer edge, the areas on both sides of the outer edge occupy equal areas within the window, and the mean pixel value of the window area is between the mean gray values ​​of the areas on both sides of the outer edge of the window, the standard deviation of the pixels in the window area is at its maximum value.

[0192] sub-blockB i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates can be obtained according to equation (2), with M(x) i (as sub-block B) iSegmentation threshold T for the inner and outer edge regions i .

[0193]

[0194] For k sub - blocks, the mid - points of the outer edges and the segmentation threshold of the outer edge regions in the k sub - blocks can be determined. The mid - points of the outer edges in the k sub - blocks are as Figure 9 shown.

[0195] Step 6: Coarsely locate the mid - point and angle of the outer edge and calculate the adaptive segmentation threshold;

[0196] Coarsely locate the coordinates Q of the mid - point of the outer edge by Equation (3) a (244, 1024). Use the mid - points of the outer edges in the k sub - blocks to find the average slope for the mid - point Q of the outer edge a (244, 1024), and thus coarsely locate the angle θ of the outer edge in the Hough polar coordinate system a = 0.4263°. Calculate the adaptive segmentation threshold T of the outer edge region by Equation (4) a = 136.

[0197]

[0198] Step 7: Construct the minimum - bounding rectangle of the outer edge to extract the outer edge region;

[0199] Assume that the exact angle θ of the outer edge is within the neighborhood of δ = 0.4° of θ a . The coarsely - located range of the angle of the outer edge in the Hough polar coordinate system is [0.0263°, 0.8263°]. Take the coarsely - located mid - point Q of the outer edge a (244, 1024) as the geometric center of the minimum - bounding rectangle.

[0200] According to the coarsely - located range of the angle of the outer edge in the Hough polar coordinate system being [0.0263°, 0.8263°], since abs(sin(0.0263°)) < abs(sin(0.8236°)), take β r = 0.8263° as the diagonal of the minimum - bounding rectangle, and extract the outer edge region with the minimum - bounding rectangle. The extracted outer edge region is as Figure 10 shown.

[0201] Step 8: Perform binary segmentation on the outer edge region with the adaptive segmentation threshold;

[0202] For the extracted outer edge region, perform binary segmentation with the adaptive segmentation threshold T a = 136, and segment the left - and right - hand regions bounded by the outer edge, as Figure 11 shown.

[0203] Step 9: Extract the edges of the outer edge region after binary segmentation;

[0204] The Canny operator is used to extract the outer edge of the binary segmented region, extracting the outer edges on the boundaries of the left and right regions, such as... Figure 12 As shown.

[0205] Step 10: Use Hough transform based on bisection to detect outer edge straight lines;

[0206] (1) Set the initial search interval v l =0 and v r =2086, convergence interval length ε=1, distance r during Hough transform discretization. h =1 and angle θ h =0.01°, the angle range for detecting straight lines is [0.0263°, 0.8263°]. The initial value of the accumulator threshold v is set to v. l The iteration flag F is set to true.

[0207] (2) Determine whether to execute the binary search loop based on the iteration flag F. Start the loop when F is true, otherwise end the loop.

[0208] (3) When v r -v l When ε > ε, let the accumulator threshold v = (v l +v r ) / 2; when v r -v l When ε <= ε, let the accumulator threshold v = v l Set F to false.

[0209] (4) Use Hough transform to detect the edges extracted by Canny under the accumulator threshold v, and save the distance and angle results of the detected H straight lines.

[0210] (5) Determine based on the number of lines H: When H > 1, let the left endpoint v of the binary search interval be v. l =v. When H < 1, i.e., H == 0, let v be the right endpoint of the binary search interval. r =v. When H == 1, set F to false and terminate the loop.

[0211] (6) The loop body returns to (2) to make a judgment.

[0212] (7) After the loop ends, take the final line detection result. If there are multiple approximately equal solutions (r, θ) in the detection result, then average the multiple results to obtain a unique (r, θ) and obtain the precise angle θ = 0.4663° of the outer edge line.

[0213] (8) Based on the fact that the local image of region R belongs to part L=1 and the midpoint y coordinate is N / 2=1024, the coordinates of the midpoint of the outer edge in the local image of region R are (244.6669,1024) in the ROI image and (1268.6669,1024) in the local image of region R.

[0214] The line detection results at the outer edge of region R are as follows: Figure 13 As shown.

[0215] Step 11: Integrate information from local measurement points to complete the precise measurement of the screen gap size;

[0216] Based on the midpoint of the outer edge in 16 local images of the R area, the physical coordinates of 16 local outer edge measurement points are obtained. The distance of the local outer edge is measured according to Equation (5). The average value of multiple sets of local outer edge distance measurement results is used to obtain the distance of the outer edge of the R area. The screen gap size is accurately measured indirectly according to the standard touch screen size.

[0217]

[0218] III. Evidence of the Relevant Effects of the Embodiments. The embodiments of the present invention have achieved some positive effects during research and development or use, and indeed possess significant advantages compared to existing technologies. The following description, in conjunction with data, charts, and other materials from the experimental process, illustrates these advantages.

[0219] To verify the accuracy of region extraction and segmentation, 320 correctly detected local images of region R were used as ground truth. Outer edge lines were detected as measurements under different d values. Detection results with a midpoint position error exceeding 2 pixels were considered erroneous. Based on this, the influence of sub-block width d on the error rate was obtained. The results are as follows: Figure 14 As shown. The results show that increasing the sub-block width d can reduce the error rate, but if the value is too large, it will reduce the accuracy of pixel statistics. When 311 < d < 441, the maximum error rate is 0.3125%. The accuracy of region extraction and segmentation of the algorithm of this invention is as high as 99.68%.

[0220] To verify the speed of region extraction and segmentation, different k values ​​were used to test the average time of region extraction and segmentation and the overall average time of the algorithm in 16 images. The results are as follows: Figure 15 As shown in the figure. The results show that the time for region extraction and segmentation increases approximately linearly with the increase of k. The overall algorithm time mainly depends on the value of k. The algorithm of this invention takes less than 60ms for region extraction and segmentation, and the overall algorithm time is less than 200ms.

[0221] To verify the high accuracy of adaptive line detection, this invention quantitatively simulates a local image of region R based on theoretical analysis of surface imaging and image features in region R. The position and angle of the outer edge in the image are known. Theoretical values ​​for different angles and positions of the outer edge are obtained using rotation transformation. The algorithm of this invention is then used to detect the outer edge, and the detected values ​​are obtained by comparing the angle and position errors of the outer edge line detection. The results are as follows: Figure 16 As shown in the figure. The results show that the detection angle error of the outer edge straight line is less than 0.01° and the position error is less than 0.2 pixels.

[0222] To verify the good detection performance of the algorithm of this invention, after extracting and segmenting the outer edge region of a local image of the actual R region, the outer edges were detected using LSD line detection, Hough line detection, LS line fitting, and the algorithm of this invention, respectively. The line detection results of the outer edges by different algorithms were obtained, as shown below. Figure 17 As shown. The results show that due to surface defects and uneven gray levels leading to edge damage and blurring, the LSD algorithm cannot detect continuous straight lines when the outer edge is damaged. The Hough line detection has difficulty in setting the optimal accumulator threshold to detect the outer edge. The LS line fitting is affected by outliers, causing the fitted line to deviate from the outer edge. The algorithm of this invention can resist interference and accurately detect straight lines at the outer edge.

[0223] To verify the practicality of the algorithm of this invention, detection results of the outer edge straight line were obtained by detecting local images of the R region at different locations acquired in actual experiments. Figure 18 As shown. The results show that, for local images of the R region corresponding to different parts, the algorithm of this invention can adaptively and accurately detect straight lines at the outer edge, thereby achieving full-size measurement of the R region of the flat panel back cover.

[0224] The equipment tested 300 flat panel back cover samples. The measurement results were compared with the standard values ​​for flat panel back covers. The equipment's judgment results for the products are shown in Tables 1 and 2. Among the 300 samples, the ratio of good products: defective products: qualified products was 27:161:102, and the equipment's judgment result was good products: defective products: qualified products = 30:162:108. The overall detection accuracy rate was 96.7%.

[0225] Table 1. Test results of 200 samples on day 1

[0226] OK NG Critical qualification equipment 24 84 92 Manual re-inspection 21 84 86 Equipment misjudgment 3 0 6

[0227] Table 2. Test results of 100 samples on the second day.

[0228] OK NG Critical qualification equipment 6 78 16 Manual re-inspection 6 77 16 Equipment misjudgment 0 1 0

[0229] Nine samples were taken, and each was tested five times. The dimensional data of different samples were obtained as follows: Figure 19As shown in the figure. The results indicate that the data fluctuation is less than 0.02 mm, and the stability is good.

[0230] Since the moving distance of the mobile system inevitably has errors, this invention has achieved error compensation for the mobile system by repeatedly acquiring the moving distance feedback from the grating ruler. The distance between the outer edges of the R-zone at locations L1 and L3 is defined as the length of the R-zone, and the distance between the outer edges of the R-zone at locations L2 and L4 is defined as the width of the R-zone. Twenty sets of flat back cover workpieces with length and width dimensions of 194.27 mm and 117.00 mm respectively were manually measured and selected. Using the algorithm of this invention and the measurement platform, the dimensions of the R-zone were measured within 6 seconds, and the measurement error was obtained by comparing it with the manually measured values. The results are as follows: Figure 20 As shown in the figure. The results show that the measurement error of the measurement system of the present invention is less than 0.03 mm.

[0231] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0232] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for precise measurement of the screen gap size of a flat panel, characterized in that, The method for precise measurement of the screen gap size of a flat panel includes the following steps: Step 1: Determine the region L to which the local image in area R belongs based on the local image acquisition location, convert the original RGB image to grayscale, and set the region of interest (ROI). Step 2: Divide the sub-blocks into k equal-distance sub-blocks according to the axis of symmetry and set statistical windows in the sub-blocks. Perform mean and standard deviation statistics on the pixels in the window regions at different positions of the sub-blocks. Step 3: Determine the midpoint of the outer edge and the segmentation threshold of the outer edge region in the k sub-blocks, coarsely locate the midpoint and angle of the outer edge and calculate the adaptive segmentation threshold; Step 4: Construct the minimum bounding rectangle of the outer edge to extract the outer edge region, and perform binary segmentation of the outer edge region using an adaptive segmentation threshold; Step 5: Extract the outer edge region after binary segmentation, detect the outer edge line using Hough transform based on the bisection method, and fuse the information of local measurement points to complete the precise measurement of the screen gap size. Based on the midpoint of the outer edge in 16 local images, calculate the physical coordinates of 16 local outer edge measurement points, measure the distance of the local outer edge according to the following formula, and take the average of multiple sets of local outer edge distance measurement results to obtain the distance of the outer edge of the R area. The precise measurement of the screen gap size is indirectly achieved based on the standard touch screen size.

2. The method for precise measurement of the screen gap size of a flat panel as described in claim 1, characterized in that, Step one, determining the region L to which the local image of area R belongs based on the local image acquisition location, includes: a. If L=1, then the local image of region R was acquired on the left side of the back cover of the flat plate; b. If L=2, then the local image of region R is acquired from the lower part of the back cover of the flat plate; c. If L=3, then the local image of region R was acquired on the right side of the back cover of the tablet; d. If L=4, then the local image of region R is acquired on the upper part of the back cover of the flat plate; Step one, converting the original RGB image to grayscale and setting the region of interest (ROI), includes: After converting the local image of the R region of the 3-channel image to grayscale, then using a fixed width d... R Extract the ROI image with a size of M×N from the center of the grayscale image; When L=1 or L=3, the ROI image size M=d R N is the number of rows in the grayscale image; When L=2 or L=4, the ROI image size is N=d. R M is the number of columns in the grayscale image; Step two, which involves dividing the scale into k sub-blocks at equal intervals based on the axis of gravity and setting the statistical windows within each sub-block, includes: Let the ROI image size be M×N, the sub-block width be d, and the statistical window width be ds; When L = 1 or L = 3, divide the vertical axis into k equally spaced sub-blocks of size M × d, with y = N / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d. s ×d; When L = 2 or L = 4, divide the horizontal direction into k equally spaced sub-blocks of size d × N, with y = M / 2 as the axis of symmetry. The size of the statistical window in each sub-block is d × d. s ; Step two involves calculating the mean and standard deviation of pixels in different locations within the window region of the sub-block, including: Set the position of the statistics window to the position of the geometric center point; When L=1 or L=3, the statistical window moves from left to right along the image x-axis and calculates the mean and standard deviation of pixels within the window region; for sub-block B i When the x-coordinate of the statistical window position is j, the image of the window region is R(j). The mean M(j) and standard deviation S(j) of the window region are calculated using the following formula: When L=2 or L=4, the statistical window moves from top to bottom along the image y-axis and calculates the mean and standard deviation of pixels within the window region; for sub-block B i When the y-coordinate of the statistical window position is j, the image of the window region is R(j), and the mean M(j) and standard deviation S(j) of the window region are calculated.

3. The method for precise measurement of the screen gap size of a flat panel as described in claim 1, characterized in that, Step three, determining the segmentation thresholds for the midpoints of the outer edges and the outer edge regions within the k sub-blocks, includes: Let's assume it's in sub-block B. i In the case where the statistical window is located at the midpoint of the outer edge, the areas on both sides of the outer edge occupy equal areas in the window, and the mean pixel value of the window area is between the mean gray values ​​of the areas on both sides of the outer edge of the window, then the standard deviation of the pixels in the window area is the maximum value. When L=1 or L=3, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates are solved according to the following formula, with M(x) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i ; When L=2 or L=4, sub-block B i Midpoint of outer edge, outer edge point Q i (x i ,y i The coordinates can be calculated similarly, using M(y) i (as sub-block B) i Segmentation threshold T for the outer and middle edge regions i ; For k sub-blocks, determine the segmentation thresholds for the midpoint of the outer edge and the outer edge region in the k sub-blocks; Step three, which involves coarsely locating the midpoint and angle of the outer edge and calculating the adaptive segmentation threshold, includes: When L = 1 or L = 3, the coordinates Q of the midpoint of the outer edge are coarsely located using equation (4). a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. a Calculate the average slope and coarsely locate the angle θ of the outer edge in the Hough polar coordinate system. a , The adaptive segmentation threshold T for the outer edge region is calculated using the following formula. a : When L=2 or L=4, the coordinates of the midpoint Q of the outer edge are similar to those for coarse positioning. a Use the midpoints of the outer edges of the k sub-blocks to represent the midpoints of the outer edges Q. a Calculate the average slope and coarsely locate the angle θ of the outer edge in the Hough polar coordinate system. a θ a ∈[π / 4,3π / 4], the adaptive segmentation threshold T of the outer edge region is calculated. a .

4. The method for precise measurement of the screen gap size of a flat panel as described in claim 1, characterized in that, Step four, which involves constructing the minimum bounding rectangle of the outer edge to extract the outer edge region, includes: Let the precise angle θ of the outer edge be θ a Within the δ neighborhood, the angular range of the outer edge in the Hough polar coordinate system is determined as [β]. l ,β r ], and the midpoint Q of the coarsely located outer edge a As the geometric center of the smallest enclosing rectangle; When L = 1 or L = 3, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(sin(β) l ))>abs(sin(β r If )), then take β. l Use the diagonal of the smallest enclosing rectangle; otherwise, take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region; When L = 2 or L = 4, the range of angles of the outer edge in the Hough polar coordinate system is [β]. l ,β r If abs(cos(β) l ))>abs(cos(β r If )), then take β. l Use the diagonal of the smallest enclosing rectangle; otherwise, take β. r Use the diagonal of the minimum bounding rectangle to extract the outer edge region; Step four, which involves binary segmenting the outer edge region using an adaptive segmentation threshold, includes: For the extracted outer edge region, an adaptive segmentation threshold T is used. a Perform binarization segmentation; When L=1 or L=3, the left and right regions are divided with the outer edge as the boundary. When L=2 or L=4, the upper and lower regions are divided with the outer edge as the boundary.

5. The method for precise measurement of the screen gap size of a flat panel as described in claim 1, characterized in that, Step five involves edge extraction of the outer edge region after binary segmentation, which includes: Edge extraction is performed on the outer edge region after binary segmentation using the Canny operator; When L=1 or L=3, extract the outer edges on the boundaries of the left and right regions. When L=2 or L=4, extract the outer edges on the boundaries of the upper and lower regions; Step five, which involves detecting outer edge lines using the Hough transform based on the bisection method, includes: (1) Set the initial search interval v l =0 and The length of the convergence interval ε, and the distance r during Hough transform discretization. h and angle θ h The detection range of the angle of the straight line [β] l ,β r ]; Set the initial value of the accumulator threshold v to v l Set the iteration flag F to true; (2) Determine whether to execute the binary search loop based on the iteration flag F. Start the loop when F is true, otherwise end the loop. (3) When v r -v l When ε > ε, let the accumulator threshold v = (v l +v r ) / 2; when v r -v l When ε <= ε, let the accumulator threshold v = v l Set F to false; (4) Use Hough transform to detect the edges extracted by Canny under the accumulator threshold v to obtain the distance and angle of H straight lines; (5) Determine based on the number of lines H: When H > 1, let the left endpoint v of the binary search interval be v. l =v; When H==0, let v be the right endpoint of the binary search interval. r =v; When H == 1, set F to false and terminate the loop; (6) The loop body returns to step (2) for judgment; (7) After the loop ends, take the final line detection result. If there are multiple approximately equal solutions (r,θ) in the detection result, then average the multiple results to obtain a unique (r,θ). (8) Find the midpoint of the outer edge of the local image based on the part L to which the local image belongs: when L = 1 or L = 3, the y-coordinate of the midpoint is N / 2; when L = 2 or L = 4, the x-coordinate of the midpoint is M / 2.

6. A precision measurement system for the screen gap size of a flat panel using the precision measurement method for the screen gap size as described in any one of claims 1 to 5, characterized in that, The precision measurement system for flat panel screen gap size includes a vision system and a motion system. The vision system uses a high-resolution camera to present a clear image of the object being measured, while the motion system uses high-precision dual linear motors to synchronously drive the vision system for precise movement and positioning. The vision system uses an MV-CA050-A0GM monochrome CCD camera, an MVL-HT-1-65 telecentric lens, and a P-RV-5080-1 ring light source mounted on the front to provide a clear image with a resolution of 2448×2048. The mobile system adopts a gantry structure and uses a Hanqu HWP220 high-precision linear motor as the drive motor. A Siemens S7-1200 PLC controls the dual motors to drive the x and y axes synchronously. The movement distance is fed back by a grating ruler to realize the positioning of the vision system in a two-dimensional plane, thus extending the working range of monocular vision to 340×340mm.

7. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the method for precise measurement of the screen gap size of a flat panel as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method for precise measurement of screen gap size of a flat panel as described in any one of claims 1 to 5.

9. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the precision measurement system for the screen gap size of the flat panel as described in claim 6.