Glass heating line mask area fragment repair method and terminal

By locating potential endpoints and fitting straight lines, glass fragments obscured by heating wires are automatically repaired, solving the error problem in tempered glass inspection and achieving efficient digital fragment analysis.

CN115239656BActive Publication Date: 2025-12-12FUJIAN DISHI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210841605.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2025-12-12
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

Existing technologies for detecting the condition of tempered glass fragments, especially in areas of the rear windshield of a car covered by heating wires, suffer from poor repair results or excessive consumption of computational resources.

Method used

A method for repairing glass fragments in areas covered by a glass heating wire is proposed. This method involves acquiring images, locating potential endpoints, fitting straight lines, and performing area repair. The CPU algorithm is then used to automatically repair the cracks in the covered glass fragments.

Benefits of technology

It enables automatic repair of covered glass shard cracks in a shorter time, reducing repair time requirements, minimizing the need for manual statistics, and improving the accuracy of digital inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239656B_ABST
    Figure CN115239656B_ABST
Patent Text Reader

Abstract

The application discloses a kind of glass heating line mask area fragment repair method and terminal, including steps: obtaining the image of glass area;Determine glass area and the area being masked;Position the potential endpoint of the area near crack;All potential endpoints are traversed, and straight line is fitted to represent endpoint gradient direction;According to potential endpoint and the straight line of fitting, region repair is carried out.It can be seen that it automatically repairs the crack of the glass fragment being masked, solves the error in the analysis of the number of glass fragments and the analysis of the attribute of glass fragments caused by the covering of fragments in the digital statistical process, and the work of measuring the quality of tempered glass by counting the fragments manually in the past, so that it advances a big step, carries out digital transformation, algorithm is completely based on CPU, does not need any training data, adopts the method of block repair when repairing, greatly reduces the time required for repair, and can achieve excellent repair effect in relatively low time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of glass fragment analysis, in particular to a glass heating line covered area fragment repair method and a terminal. BACKGROUND

[0002] The mandatory inspection system of tempered glass requires the inspection and testing of glass in buildings, cars and other scenes. When producing tempered glass on the production line, at least the first piece of glass, the middle glass and the last piece of glass produced are knocked and the fragment state of the tempered glass is strictly detected. Specifically, the fragment state of the tempered glass requires the following:

[0003] In any 50mm x 50mm square, the number of fragments is not less than 40 pieces, but not more than 400 pieces. If the thickness is not more than 3.5mm, the number of fragments is more than 40 pieces and less than 450 pieces.

[0004] In the above provisions, the fragments across the square edge shall be counted as half a piece;

[0005] The fragments within 20mm of the edge of the product are not checked, and the number of fragments within a 75mm radius of the impact point is also not checked;

[0006] Except for the parts specified in the third provision above, no fragments exceeding 3cm2 are allowed;

[0007] A small amount of long strip-shaped fragments are allowed, with a length not exceeding 75mm, and the end is not knife-shaped, and the angle formed by the long strip-shaped fragments extending to the edge of the glass and the edge is not greater than 45.

[0008] In the detection process, there is a problem that the rear windshield of the car is covered by other parts (such as heating wires), which causes errors in the fragment state detection during the tempered performance test. To solve this problem, the prior art repairs the covered glass area before detecting the fragment state. The previous repair method can be roughly divided into two categories. One is to repair the covered area by the pixels adjacent to it through the inpaint method in the opencv library, but the inpaint method cannot deal with dense glass fragment cracks, and the effect of image repair is not satisfactory.

[0009] The other is to use deep learning to globally repair the whole glass fragment image, but the deep learning model needs a large amount of training data, consumes a lot of device memory and computing power, has high procurement cost, and because the image is huge, the scanning image of the glass fragment is generally above 4k resolution, which causes the repair time to be too long. SUMMARY

[0010] The technical problems solved by the present application are to provide a glass heating line covered area fragment repair method and a terminal, which can automatically complete the repair of the fragments covered by the heating line in the image.

[0011] To solve the above technical problems, the technical scheme adopted by the present application is:

[0012] A glass heating line covered area fragment repair method comprises the following steps:

[0013] S1, acquiring an image of a glass area;

[0014] S2, determining the glass area and the covered area;

[0015] S3, positioning potential endpoints of the area near the crack;

[0016] S4, traversing all potential endpoints to fit a straight line to represent the endpoint gradient direction;

[0017] S5, performing area repair according to the potential endpoints and the fitted straight line.

[0018] To solve the above technical problems, another technical scheme adopted by the present application is:

[0019] A glass heating line covered area fragment repair terminal comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above method when executing the computer program.

[0020] The present application has the following advantages: a glass heating line covered area fragment repair method and a terminal automatically repair the covered glass fragment cracks, solve the error in the analysis of the number and properties of the glass fragments caused by the covered fragments in the digital statistical process, and the work of manually counting the fragments and calculating the quality of the tempered glass is no longer needed, which promotes a great step and realizes digital transformation. The algorithm is completely based on CPU and does not need any training data. In the repair, the block repair method is adopted, which greatly reduces the time required for repair and can achieve excellent repair effect in relatively low time. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 A flowchart of a glass heating line covered area fragment repair method according to an embodiment of the present application is shown in the figure.

[0022] Figure 2 A specific flowchart of a glass heating line covered area fragment repair method according to an embodiment of the present application is shown in the figure.

[0023] Figure 3 A glass image according to an embodiment of the present application is shown in the figure.

[0024] Figure 4 A schematic diagram of a first region to be repaired according to an embodiment of the present application;

[0025] Figure 5 A schematic diagram of a repaired first region according to an embodiment of the present application;

[0026] Figure 6 A schematic diagram of a second region to be repaired according to an embodiment of the present application;

[0027] Figure 7 A schematic diagram of a repaired second region according to an embodiment of the present application;

[0028] Figure 8 A schematic diagram of a third region to be repaired according to an embodiment of the present application;

[0029] Figure 9 A schematic diagram of a repaired third region according to an embodiment of the present application;

[0030] Figure 10 A schematic diagram of a glass heating line covered area fragment repair terminal according to an embodiment of the present application.

[0031] Label explanation:

[0032] 1. A glass heating line covered area fragment repair terminal; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0033] To explain the technical content, achieved purposes and effects of the present application in detail, the following will be explained in combination with the embodiments and the accompanying drawings.

[0034] Please refer to Figures 1 to 8 A glass heating line covered area fragment repair method, comprising the steps of:

[0035] S1. Acquiring an image of a glass region;

[0036] S2. Determining the glass region and the covered region;

[0037] S3. Locating potential endpoints of the region near the crack;

[0038] S4. Traversing all potential endpoints, fitting a straight line to represent the endpoint gradient direction;

[0039] S5. Repairing the region according to the potential endpoints and the fitted straight line.

[0040] From the above description, the beneficial effects of the present application are that: a glass heating line mask area fragment repair method and terminal, automatically repair the covered glass fragment crack, solve the error in the process of digital statistics, the number of glass fragments and the attribute analysis of glass fragments, the glass factory needs to manually count the fragments, so as to calculate the quality of the tempered glass, and promote a big step, carry out digital transformation, the algorithm is completely based on CPU, without any training data, in the repair, the block repair method is adopted, the time required for repair is greatly reduced, and excellent repair effect can be obtained in relatively low time.

[0041] Further, in the step S1, specifically, the image of the glass region captured by the line scanning camera is acquired.

[0042] From the above description, the image of the glass region is acquired.

[0043] Further, the step S2 specifically includes:

[0044] The glass region is searched by finding the maximum contour, and the covered region in the glass region is searched by Hough transformation, and the image of the glass fragments near the covered region is acquired.

[0045] From the above description, the glass region and the covered region are searched.

[0046] Further, the step S3 specifically includes:

[0047] S31, according to the number of pixel points of each crack region, all individual crack regions are classified into two categories, if the area exceeds the first area threshold area_threshold, the crack is put into the first crack array large_area, otherwise it is put into the second crack array small_area.

[0048] S32, locate the potential end points of the crack near region and put them into the first end point array endPoints, for the regions in the first crack array large_area, use the goodFeaturesToTrack function in opencv to automatically find the candidate end points, for the regions in the second crack array small_area, traverse each pixel point in the region to judge whether it is a potential crack end point.

[0049] From the above description, the searching of the end points and the division of the crack regions are realized.

[0050] Further, the step S3 further includes:

[0051] S33, filtering all the found candidate endpoints, removing the endpoints which are not close to the hidden region, less than three pixels away from other endpoints, and less than four valid pixels nearby from the first endpoint array endPoints.

[0052] As described above, the invalid points are removed.

[0053] Further, the step S4 specifically comprises:

[0054] If the endpoint belongs to the region of the first crack array large_area, the region contour point set is obtained by using the findcontours function, the index position of the endpoint in the contour point set is located, five contour points are obtained respectively in front and back, and two straight lines are fitted to represent the two possible directions of the endpoint; if the endpoint belongs to the region of the second crack array small_area, at least four and at most eight points are selected according to the pixel values near the endpoint to fit a straight line.

[0055] As described above, the fitting straight line is constructed.

[0056] Further, the step S5 specifically comprises:

[0057] S51, traversing all the endpoints in the first endpoint array endPoints, connecting two endpoints located on both sides of the hidden region, having similar fitting straight line gradients, and having similar gradients of the connecting straight line and the endpoint;

[0058] S52, traversing the connected repair lines, checking the intersection of each repair line with the remaining repair lines, if the number of intersection lines is greater than two, removing the repair lines in turn according to the length from long to short, until the number of intersection lines is equal to 2.

[0059] As described above, the hidden region is repaired.

[0060] Further, the step S5 further comprises:

[0061] S53, traversing the endpoints in the first endpoint array endPoints which are not connected and belong to the region of the second crack array small_area, extending the fitting straight line of each endpoint, if the extended line passes through the hidden region and intersects with another valid region, connecting the intersection point and the endpoint, and the valid region is specifically a region including a connected domain greater than five pixels or a valid repair line.

[0062] S54, traversing all the endpoints in the first endpoint array endPoints which are not connected, if the distance between two endpoints is less than one time of the width of the hidden region, and the two endpoints are located on both sides of the hidden region, connecting the two endpoints.

[0063] S55, traverse all unconnected endpoints in the first endpoint array endPoints, if the extension line of the fitting straight line of the endpoint crosses the hidden region and compared with another repair line, and the intersection angle is within the set angle range, then connect the intersection point of the extension line and the repair line and the endpoint.

[0064] S56, traverse all unconnected endpoints belonging to the second crack array small_area, if there are two endpoints on both sides of the hidden region, the two endpoints are the closest endpoints to each other, and the fitting straight lines of the two endpoints intersect, then connect the two endpoints to the intersection point of the intersection.

[0065] S57, traverse all unconnected endpoints of the region with only two or fewer endpoints in the first crack array large_area, extend the fitting straight line of each endpoint, if the extension line crosses the hidden region and intersects with another valid region, then connect the intersection point and the endpoint, the valid region is specifically a region including a connected domain greater than five pixels or a valid repair line.

[0066] S58, traverse all unconnected endpoints of the region with only two or fewer endpoints in the first crack array large_area, if the distance between two endpoints is less than one times the width of the hidden region, and the two endpoints are located on both sides of the hidden region, then connect the two endpoints.

[0067] S59, traverse all unconnected endpoints of the region with only two or fewer endpoints in the first crack array large_area, if the extension line of the fitting straight line of the endpoint crosses the hidden region and compared with another repair line, and the intersection angle is within the set angle range, then connect the intersection point of the extension line and the repair line and the endpoint.

[0068] S510, traverse all unconnected endpoints of the region with only two or fewer endpoints in the first crack array large_area, if there are two endpoints on both sides of the hidden region, the two endpoints are the closest endpoints to each other, and the fitting straight lines of the two endpoints intersect, then connect the two endpoints to the intersection point of the intersection.

[0069] From the above description, further repair of the hidden region is achieved, and the repair effect is improved.

[0070] Further, it further includes the steps executed after step S2 and before step S3:

[0071] S21, find the edges in the image near the hidden region using the Laplace operator, threshold the found edge image output, remove the small noise points found by mistake, and overlap and add the image output with the original image.

[0072] From the above description, the false noise is removed before repairing, and the calculation efficiency and the repairing effect are improved.

[0073] A glass heating line covered area fragment repairing terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method described above when executing the computer program.

[0074] The present application is applied to the repair of the covered area in the tempered glass test.

[0075] Please refer to Figures 1 to 2 , the first embodiment of the present application is:

[0076] A glass heating line covered area fragment repairing method comprises the following steps:

[0077] S1, acquire the image of the glass area.

[0078] For the tempered glass to be tested, a transparent film is first used to adhere to the glass area on one side, and then a special hammer is used to break the tempered glass, and with the cooperation of the light source and the camera, the line scanning camera captures the image of the glass area as shown in the figure. Figure 3

[0079] S2, determine the glass area and the covered area.

[0080] First, separate the glass area from the background, and in this embodiment, the glass area is found by finding the largest contour. Then, the Hough transform is used to find the heating line area covering the crack in the glass area, such as the black solid line in the figure. Figure 3

[0081] S21, use the Laplace operator to find the edges in the image near the covered area, threshold the output of the found edge image, remove the small noise found by mistake, and overlap and add the image output to the original image.

[0082] Thus, the effect of enhancing the imaging of the glass crack can be achieved.

[0083] S3, locate the potential endpoints of the area near the crack.

[0084] S31, according to the number of pixel points of each crack area, classify all individual crack areas into two categories.

[0085] Specifically, if the area of the crack exceeds the first area threshold area_threshold, the crack is placed in the first crack array large_area, otherwise it is placed in the second crack array small_area.

[0086] ​​S32, locate potential endpoints of the region near the crack and put them into the first endpoint array endPoints, for the region in the first crack array large area, use the function goodFeaturesToTrack in opencv to find the candidate endpoints automatically, for the region in the second crack array small area, traverse each pixel in the region to judge whether it is a potential crack endpoint,

[0087] S33, filter all the candidate endpoints, remove the endpoints which are not near the masked region, less than three pixels away from other endpoints, and less than four valid pixels near them from the first endpoint array endPoints.

[0088] S4, traverse all the potential endpoints, fit a straight line to represent the endpoint gradient direction.

[0089] Specifically, if the endpoint belongs to the region in the first crack array large area, use the function findcontours to get the contour point set of the region, locate the index position of the endpoint in the contour point set, get five contour points forward and backward respectively and fit two straight lines to represent the two possible directions of the endpoint; if the endpoint belongs to the region in the second crack array small area, select at least four and at most eight points near the endpoint to fit a straight line according to the pixel values.

[0090] S5, region inpainting according to the potential endpoints and the fitted straight lines.

[0091] Specifically, it includes the following steps:

[0092] S51, traverse all the endpoints in the first endpoint array endPoints, connect two endpoints which are located on both sides of the masked region, have similar fitted straight line gradients, and have similar gradients of the connecting straight line and the endpoint.

[0093] S52, traverse the connected repair lines, check the intersection of each repair line with the remaining repair lines, if the number of intersection lines is greater than two, remove the repair lines in turn from long to short according to the length of the repair lines until the number of intersection lines is equal to 2.

[0094] S53, traverse the endpoints in the first endpoint array endPoints which are not connected and belong to the region in the second crack array small area, extend the fitted straight line of each endpoint, if the extended line crosses the masked region and intersects with another valid region, connect the intersection point and the endpoint, the valid region is specifically a region including a connected domain greater than five pixels or a valid repair line.

[0095] S54, traverse all the unconnected endpoints in the first endpoint array endPoints, if the distance between two endpoints is less than one point of the width of the occluded region and they are located on the two sides of the occluded region, then connect the two endpoints.

[0096] S55, traverse all the unconnected endpoints in the first endpoint array endPoints, if the extension of the fitting straight line of an endpoint passes through the occluded region and the intersection angle between the extension and another repair line is within the set angle range, then connect the intersection point of the extension and the repair line and the endpoint.

[0097] S56, traverse all the unconnected endpoints belonging to the second crack array small_area, if there are two endpoints located on the two sides of the occluded region, the two endpoints are the closest endpoints to each other, and the fitting straight lines of the two endpoints intersect, then connect the two endpoints to the intersection point.

[0098] S57, traverse all the unconnected endpoints of the region with two or fewer endpoints in the first crack array large_area, extend the fitting straight line of each endpoint, if the extension passes through the occluded region and intersects with another valid region, then connect the intersection point and the endpoint, the valid region is specifically a region including a connected domain with more than five pixels or a valid repair line.

[0099] S58, traverse all the unconnected endpoints of the region with two or fewer endpoints in the first crack array large_area, if the distance between two endpoints is less than one point of the width of the occluded region and they are located on the two sides of the occluded region, then connect the two endpoints.

[0100] S59, traverse all the unconnected endpoints of the region with two or fewer endpoints in the first crack array large_area, if the extension of the fitting straight line of an endpoint passes through the occluded region and the intersection angle between the extension and another repair line is within the set angle range, then connect the intersection point of the extension and the repair line and the endpoint.

[0101] S510, traverse all the unconnected endpoints of the region with two or fewer endpoints in the first crack array large_area, if there are two endpoints located on the two sides of the occluded region, the two endpoints are the closest endpoints to each other, and the fitting straight lines of the two endpoints intersect, then connect the two endpoints to the intersection point.

[0102] Please refer to Figure 4 , 6 , 8, which is the image before repair, and the image after repair please refer to Figure 5 , 7 , 9.

[0103] Please refer toFigure 10 Embodiment two of the present application is:

[0104] A glass heating line mask area fragment repair terminal 1 comprises a memory 3, a processor 2 and a computer program stored on the memory 3 and executable on the processor 2, and the processor 2 implements the steps of the above-mentioned embodiment one when executing the computer program.

[0105] In summary, the present application provides a glass heating line mask area fragment repair method and terminal, which automatically repairs the covered glass fragment cracks, solves the errors in the analysis of the number and properties of the glass fragments caused by the covered fragments in the digital statistical process, and promotes the work of the glass factory to manually count the fragments to measure the quality of the tempered glass, which is a big step forward in digital transformation. The algorithm is completely based on CPU and does not require any training data. In the repair process, the block repair method is adopted, which greatly reduces the time required for repair and can achieve excellent repair effect in relatively low time.

[0106] The above-mentioned is only an embodiment of the present application, and does not limit the patent range of the present application. Any equivalent transformation or direct or indirect application in the related technical field based on the content of the present application specification and drawings is also included in the patent protection range of the present application.

Claims

1. A method of repairing a glass heating wire masked area breakage, the method comprising: The method comprises the steps of: S1, acquiring an image of a glass region; S2, determining a glass region and a covered region; S3, locating potential end points of a region near a crack; The step S3 specifically comprises: S31, according to the number of pixel points of each crack region, classifying all individual crack regions into two categories, if the area of a crack exceeds a first area threshold, the crack is placed into a first crack array, otherwise, the crack is placed into a second crack array; S32, locating potential end points of a region near a crack and placing the potential end points into a first end point array, for the regions in the first crack array, using a goodFeaturesToTrack function in opencv to automatically find candidate end points, for the regions in the second crack array, traversing each pixel point in the region to determine whether the pixel point is a potential crack end point; S4, traversing all potential end points to fit a straight line to represent a gradient direction of the end point; S5, performing region repair according to the potential end points and the fitted straight line; The step S5 specifically comprises: S51, traversing all end points in the first end point array, connecting two end points located on two sides of the covered region, having similar gradient directions of the fitted straight lines, and having similar gradients of the connected straight lines and the end points; S52, traversing the connected repair lines, checking intersection conditions of each repair line with the remaining repair lines, if the number of intersection lines is greater than two, removing the repair lines in turn from long to short according to the lengths of the repair lines, until the number of intersection lines is equal to two; S53, traversing the end points in the first end point array which are not connected and belong to the regions of the second crack array, extending the fitted straight line of each end point, if the extended line passes through the covered region and intersects with another effective region, connecting the intersection point and the end point, the effective region specifically being a region including a connected domain with more than five pixels or an effective repair line; S54, traversing all end points in the first end point array which are not connected, if the distance between two end points is less than one time of the width of the covered region and the two end points are located on two sides of the covered region, connecting the two end points; S55, traversing all end points in the first end point array which are not connected, if the extended line of the fitted straight line of the end point passes through the covered region and intersects with another repair line, and the intersection angle is within a set angle range, connecting the intersection point of the extended line and the repair line and the end point; S56, traversing the end points which belong to the regions of the second crack array and are not connected, if there are two end points located on two sides of the covered region, the two end points are the closest end points to each other, and the fitted straight lines of the two end points intersect, connecting the two end points to the intersection point of the intersection; S57, traversing the end points of the regions in the first crack array which have only two or fewer end points and are not connected, extending the fitted straight line of each end point, if the extended line passes through the covered region and intersects with another effective region, connecting the intersection point and the end point, the effective region specifically being a region including a connected domain with more than five pixels or an effective repair line; S58, traversing the end points of the regions in the first crack array which have only two or fewer end points and are not connected, if the distance between two end points is less than one time of the width of the covered region and the two end points are located on two sides of the covered region, connecting the two end points. S59, traversing the unconnected endpoints of the regions in the first crack array that only have two or fewer endpoints, if the extension of the fitting straight line of the endpoints crosses the hidden region and intersects with another repair line, and the intersection angle is within the set angle range, connecting the intersection point of the extension and the repair line and the endpoint; S510, traversing the unconnected endpoints of the regions in the first crack array that only have two or fewer endpoints, if there are two endpoints on both sides of the hidden region, the two endpoints are the closest endpoints to each other, and the fitting straight lines of the two endpoints intersect, connecting the two endpoints to the intersection point of the intersection.

2. The method of claim 1, wherein the glass heating wire masked area breakage repair method is characterized by, The step S1 specifically comprises: Obtaining an image of the glass region captured by the line scan camera.

3. The method of claim 1, wherein the glass heating wire masked area breakage repair method is characterized by, The step S2 specifically comprises: Finding the glass region by finding the maximum contour, and finding the hidden region of the hidden crack in the glass region by Hough transformation, and obtaining the image of the glass fragments near the hidden region.

4. The method of claim 1, wherein the glass heating line mask area break repair method is characterized by, The step S3 further comprises: S33, filtering all the found candidate endpoints, and removing the endpoints that are not close to the hidden region, less than three pixels away from other endpoints, and have less than four valid pixels near them from the first endpoint array.

5. The glass heating line hidden region fragment repair method according to claim 1, wherein The step S4 specifically comprises: If the endpoint belongs to the region of the first crack array, obtaining a set of region contour points by using the findcontours function, locating the index position of the endpoint in the contour point set, and obtaining five contour points forward and backward respectively and fitting two straight lines to represent the two possible directions of the endpoint; if the endpoint belongs to the region of the second crack array, selecting at least four and at most eight points near the endpoint to fit a straight line according to the pixel values.

6. The method of claim 1, wherein the glass heating line mask area break repair method is characterized by, The step S2 and the step S3 further comprise a step: S21, finding the edges in the image near the hidden region by using the Laplacian operator, thresholding the found edge image output to remove small noise points that are misfound, and overlapping and adding the image output to the original image.

7. A glass heating wire masked area breakage repair terminal comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Method for restoring bridge crack image based on generative adversarial network

    CN108305239A

  • Mechanical part corrosion crack detection method based on artificial intelligence

    CN113706423A