A method for extracting the outline of broken glass

Through a fragmented glass contour extraction method, images are collected using industrial cameras and pre-processed, refined and repaired break points, the problem of low manual counting efficiency in automotive glass fragment state test is solved, and the contour extraction accuracy and statistical accuracy are improved.

CN114332146BActive Publication Date: 2025-04-25FUJIAN IMPERIAL VISION INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111642829.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-04-25
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of low manual counting efficiency and error-prone in automotive glass fragment state testing, especially when the crack direction and size of the treated fragment glass cracks are random and the optical imaging effect is not ideal.

Method used

A method for extracting fragmented glass profiles is proposed, including using transparent adhesives and industrial cameras to collect glass crushed images, perform reflection removal, binarization and refinement, detect and repair crack break points, and reconstruct glass profiles.

Benefits of technology

The accuracy and statistical accuracy of the crack profile extraction and statistical accuracy of fragmented glass cracks are improved, the problems of unclear cracks and reflection interference are solved, and the dependence on imaging is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332146B_ABST
    Figure CN114332146B_ABST
Patent Text Reader

Abstract

The present invention provides a method for extracting the outline of broken glass, comprising the following steps: step S1, using a transparent adhesive to stick to the glass surface, then breaking the glass in a specific impact area, and using an industrial camera to collect a broken glass image in the broken area; step S2, pre-processing the broken glass image to remove reflective cracks, then binarizing the pre-processed image, and filtering out small black dots and small bright spots in the binarized image; step S3, extracting the outline of broken glass in the broken area; step S4, detecting and repairing the glass crack breakpoints in the broken glass outline image, and reconstructing the broken glass outline; the present invention has a simple process, can effectively solve the problems of unclear cracks caused by random crack direction and size, reflection interference, etc. in actual optical imaging, and can improve the accuracy of broken glass crack outline extraction and the accuracy of broken glass statistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, in particular to a method for extracting the outline of broken glass. Background Art

[0002] Automobile glass is an important product in the automotive industry. In the early days, ordinary glass was used for automobile glass. After a traffic accident, the glass shattered and splashed, which could easily cause secondary injuries to people. Therefore, tempered glass and laminated glass are now widely used in the field of automobile glass.

[0003] my country issued the "National Standard of the People's Republic of China GB9656-2003" on April 23, 2003, which gave a detailed description of safety performance. It includes more than a dozen mandatory standards such as thickness, light distortion, and impact resistance. The technology discussed in the present invention is applicable to the fragment state test standard. The fragment state test process includes breaking the automobile glass in a specified area and observing and analyzing the fragmented glass with the naked eye. One of the indicators needs to determine the location of the sparsest and densest fragmented glass area. Count the number of fragments in a 5cmX5cm square area. Usually there will be dozens to hundreds of glass fragments in a 5cmX5cm area. Manual counting is inefficient and prone to errors. The method of machine vision detection can effectively solve the problem of manual counting errors. The core problem of counting the number of fragments by vision is to solve the problem of fragmented glass segmentation. Using machine vision to collect fragmented glass imaging, due to the randomness of the direction and size of the cracks in the fragmented glass. Optical imaging cannot achieve very ideal results.

[0004] The method proposed in the present invention uses a camera and a light source to complete the detection process by capturing images once. At the same time, the proposed contour reconstruction method can deal with the problem of contour fracture, improve the accuracy of fracture glass crack contour extraction, and improve the accuracy of fracture glass statistics. Summary of the invention

[0005] The present invention proposes a method for extracting the contour of broken glass, which has a simple process and can effectively solve the problems of unclear cracks and reflection interference caused by random crack direction and size in actual optical imaging, and can improve the accuracy of broken glass crack contour extraction and broken glass statistical accuracy.

[0006] The present invention adopts the following technical solutions.

[0007] A method for extracting the outline of broken glass comprises the following steps:

[0008] Step S1, using a transparent adhesive to stick to the glass surface, then breaking the glass in a specific impact area, and using an industrial camera to capture a glass breakage image in the breaking area;

[0009] Step S2, pre-processing the broken glass image to remove reflective cracks, then binarizing the pre-processed image, and filtering out small black dots and small bright spots in the binarized image;

[0010] Step S3, extracting the outline of the broken glass in the broken area;

[0011] Step S4: Detect and repair the glass crack breakpoints in the broken glass contour image to reconstruct the broken glass contour.

[0012] The step S1 includes the following steps:

[0013] Step S11, placing glass on a transparent glass platform, taping the entire surface of the glass, and then using a safety glass hammer to break the glass in a preset specific impact area;

[0014] Step S12, installing a backlight source below the transparent glass platform, and installing an industrial camera above the transparent glass; the industrial camera is an area array camera or a line array camera;

[0015] Step S13: photograph the broken area with an industrial camera to collect images of broken glass.

[0016] The step S2 includes the following steps:

[0017] Step S21, remove the reflective cracks, the specific method is: calculate the average mean and standard deviation stdv of the broken glass image; execute the following formula to replace the reflective crack outlier pixel value with a dark pixel, the formula is:

[0018]

[0019] Where g(x,y) represents the pixel value at the x,y coordinate of the image;

[0020] Step S22, binarizing the image obtained in step S21, wherein the processing method includes the OTSU binarization method;

[0021] Step S23: The dust and fine glass debris on the transparent glass platform are regarded as the causes of the small black spots and small bright spots in the binary image obtained in step S22, and the small black spots and small bright spots in the binary image are removed.

[0022] In step S3, the binary image after filtering in step S2 is thinned, and the thinning algorithm used includes Zhang-Suen thinning algorithm.

[0023] In the broken area, the observation results of most of the glass fragments are approximately convex polygons;

[0024] The step S4 includes the following steps:

[0025] Step S41, disconnection detection, specifically:

[0026] The first step is to detect the breakpoints in the crack contour of the broken glass. The detection formula is:

[0027] The detection criterion is that the 8-neighborhood contains only one bright spot;

[0028] The second step is to calculate the length and direction of the broken line. To do this, you need to determine the end position of the breakpoint. The criteria for determining the end point are:

[0029]

[0030] Step S42, disconnection connection, specifically:

[0031] The first step is to connect the endpoints of the broken lines with the same direction and close distance. The calculation of the broken line direction can be calculated by gradient calculation, or determined by the vector of the head and tail points of the broken line; the distance between the starting point of the broken line must be less than a certain threshold Tdist, and the directions of the broken lines breakedge1 and breakedge2 must meet the following requirements:

[0032]

[0033] Where angle_edge represents the disconnection angle, and connect_angle represents the disconnection connection angle;

[0034] Step 2: For the disconnected wires not connected in the first step, evaluate whether to extend them. The criteria are: The disconnected wires that need to be extended must meet the following conditions:

[0035]

[0036] Among them, grad break_pt Indicates the breakpoint gradient value, length break_edge is the length of the broken line;

[0037] For broken wires that meet the extension conditions, they are extended along their direction extension lines. The extension points need to meet the following conditions:

[0038] Among them, grad ext_pt is the gradient size of the extension point, angle ext_pt is the gradient vector angle of the extension point, angle break_edge is the line breaking angle; the extension operation stops when it touches the crack line of the glass fragments;

[0039] Step 3: Save the unprocessed disconnections as a list unkonw_break_edge, filter out the unprocessed disconnections to get the result graph of this step;

[0040] Step 4: invert the result graph of step 3 in step S42 to obtain a glass fragment segmentation graph, and calculate whether each glass fragment is approximately a convex polygon; first calculate the ratio of the area of ​​each glass fragment to the area of ​​the smallest outer convex polygon edge, and if it is less than a threshold, it is a normal glass fragment;

[0041] If it is greater than the threshold, a second judgment is made to calculate the corner points of the glass fragment polygon. The edge direction change rate at the corner point is much greater than the set threshold. The formula is:

[0042] angle_diff corner_p t>T angle_diff Formula 7;

[0043] Among them, angle_diff corner_pt is the rate of change of the edge direction at the corner point, and the point with the maximum value of the rate of change is the corner point; after obtaining the approximated polygon, determine whether the polygon corner point is a convex point; the judgment standard is to calculate the minimum distance from the corner point to the smallest outer polygon edge;

[0044] If the calculated distance is greater than the predetermined threshold, it is determined to be a concave point; then the liis saved in the third step is traversed tunkonw_break_edge , check whether the concave point is on the broken line. If it is, extend the broken line in the second step and adjust the extension point judgment standard to be more relaxed;

[0045] When the particle contours of all glass fragments are traversed, step S4 is completed.

[0046] In step S1, the glass breakage image of the breaking area is a square area of ​​5 cm×5 cm.

[0047] The advantages of the present invention are: a contour reconstruction process is proposed for the segmentation of broken glass, which specifically includes technologies such as line reconnection and concave corner point judgment. The advantage of this method is that it reduces the dependence on the imaging link, so that the problem of missed segmentation caused by the difficulty of optical imaging due to the random size and direction of glass fragments is effectively improved. It can provide a useful technical reference for promoting the implementation of equipment into industrial applications.

[0048] The method proposed in the present invention uses a camera and a light source to complete the detection process by capturing images once. At the same time, the proposed contour reconstruction method can deal with the problem of contour fracture, improve the accuracy of fracture glass crack contour extraction, and improve the accuracy of fracture glass statistics.

[0049] The present invention provides a method for extracting the outline of cracks in broken glass based on image processing technology, which can effectively solve the problems of unclear cracks and reflection interference caused by random crack direction and size in actual optical imaging. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0051] Attached Figure 1 A schematic diagram of original camera acquisition according to an embodiment of the present invention;

[0052] Attached Figure 2 This is a binary diagram after preprocessing according to an embodiment of the present invention;

[0053] Attached Figure 3 It is a schematic diagram of the refinement effect of an embodiment of the present invention;

[0054] Attached Figure 4 A schematic diagram of breakpoint positions in an embodiment of the present invention;

[0055] Attached Figure 5 Schematic diagram of the positions of the starting point and the ending point of the line break in an embodiment of the present invention (the circle box is the starting point of the line break, and the square box is the ending point);

[0056] Attached Figure 6 A schematic diagram of a disconnection connection effect according to an embodiment of the present invention;

[0057] Attached Figure 7 It is a schematic diagram of the final effect of an embodiment of the present invention. DETAILED DESCRIPTION

[0058] As shown in the figure, a method for extracting the outline of broken glass includes the following steps:

[0059] Step S1, using a transparent adhesive to stick to the glass surface, then breaking the glass in a specific impact area, and using an industrial camera to capture a glass breakage image in the breaking area;

[0060] Step S2, pre-processing the broken glass image to remove reflective cracks, then binarizing the pre-processed image, and filtering out small black dots and small bright spots in the binarized image;

[0061] Step S3, extracting the outline of the broken glass in the broken area;

[0062] Step S4: Detect and repair the glass crack breakpoints in the broken glass contour image to reconstruct the broken glass contour.

[0063] The step S1 includes the following steps:

[0064] Step S11, placing glass on a transparent glass platform, taping the entire surface of the glass, and then using a safety glass hammer to break the glass in a preset specific impact area;

[0065] Step S12, installing a backlight source below the transparent glass platform, and installing an industrial camera above the transparent glass; the industrial camera is an area array camera or a line array camera;

[0066] Step S13: Use an industrial camera to capture the broken area and collect images of broken glass. Figure 1 As shown (5cmX5cm area is sampled).

[0067] The step S2 includes the following steps:

[0068] Step S21, remove the reflective cracks, the specific method is: calculate the average mean and standard deviation stdv of the broken glass image; execute the following formula to replace the reflective crack outlier pixel value with a dark pixel, the formula is:

[0069]

[0070] Where g(x,y) represents the pixel value at the x,y coordinate of the image;

[0071] Step S22, binarizing the image obtained in step S21, wherein the processing method includes the OTSU binarization method;

[0072] Step S23: The dust and fine glass debris on the transparent glass platform are regarded as the cause of the small black spots and small bright spots in the binary image obtained in step S22, and the small black spots and small bright spots in the binary image are removed. The effect after removal is as follows: Figure 2 shown.

[0073] In step S3, the binary image after filtering in step S2 is thinned, and the thinning algorithm used includes Zhang-Suen thinning algorithm. The effect after thinning is as follows Figure 3 shown.

[0074] In the broken area, the observation results of most of the glass fragments are approximately convex polygons;

[0075] The step S4 includes the following steps:

[0076] Step S41, disconnection detection, specifically:

[0077] The first step is to detect the breakpoints in the crack contour of the broken glass. The detection formula is:

[0078] The detection criterion is that the 8-neighborhood contains only one bright spot;

[0079] The detected breakpoints are as follows Figure 4 shown.

[0080] The second step is to calculate the length and direction of the broken line. To do this, you need to determine the end position of the breakpoint. The criteria for determining the end point are:

[0081]

[0082] Step S42, disconnection connection, specifically:

[0083] The first step is to connect the endpoints of the broken lines with the same direction and close distance. The calculation of the broken line direction can be calculated by gradient calculation, or by using the vector of the beginning and end points of the broken line; the distance between the starting point of the broken line must be less than a certain threshold T dist , the directions of breakedge1 and breakedge2 need to satisfy:

[0084]

[0085] Where angle_edge represents the disconnection angle, and connect_angle represents the disconnection connection angle;

[0086] Step 2: For the disconnected wires not connected in the first step, evaluate whether to extend them. The criteria are: The disconnected wires that need to be extended must meet the following conditions:

[0087]

[0088] Among them, grad break_pt Indicates the breakpoint gradient value, length break_edge is the length of the broken line;

[0089] For broken wires that meet the extension conditions, they are extended along their direction extension lines. The extension points need to meet the following conditions:

[0090] Among them, grad ext_pt is the gradient size of the extension point, angle ext_pt is the gradient vector angle of the extension point, angle break_edge is the line breaking angle; the extension operation stops when it touches the crack line of the glass fragments;

[0091] Step 3: Save the unprocessed disconnections as a list unkonw_break_edge , filter out the unprocessed disconnections to get the result graph of this step; Figure 6 shown.

[0092] Step 4: invert the result graph of step 3 in step S42 to obtain a glass fragment segmentation graph, and calculate whether each glass fragment is approximately a convex polygon; first calculate the ratio of the area of ​​each glass fragment to the area of ​​the smallest outer convex polygon edge, and if it is less than a threshold, it is a normal glass fragment;

[0093] If it is greater than the threshold, a second judgment is made to calculate the corner points of the glass fragment polygon. The edge direction change rate at the corner point is much greater than the set threshold. The formula is:

[0094] angle_diff corner_pt >T angle-diff Formula 7;

[0095] Among them, angle_diff corner_pt is the rate of change of the edge direction at the corner point, and the point with the maximum value of the rate of change is the corner point; after obtaining the approximated polygon, determine whether the polygon corner point is a convex point; the judgment standard is to calculate the minimum distance from the corner point to the smallest outer polygon edge;

[0096] If the calculated distance is greater than the predetermined threshold, it is determined to be a concave point; then the list saved in the third step is traversed unkonw_break_edge , check whether the concave point is on the broken line. If it is, extend the broken line in the second step and adjust the extension point judgment standard to be more relaxed;

[0097] When all the particle contours of the glass fragments are traversed, step S4 is completed. The final processing effect is as follows: Figure 7 .

[0098] In step S1, the glass breakage image of the breaking area is a square area of ​​5 cm×5 cm.

Claims

1. A method for extracting the outline of broken glass, characterized in that: The steps include: Step S1, using a transparent adhesive to stick to the glass surface, then breaking the glass in a specific impact area, and using an industrial camera to capture a glass breaking image in the breaking area; Step S2, pre-processing the broken glass image to remove reflective cracks, then binarizing the pre-processed image, and filtering out small black dots and small bright spots in the binarized image; Step S3, extracting the outline of the broken glass in the broken area; Step S4, detecting and repairing the glass crack breakpoints in the broken glass contour image, and reconstructing the broken glass contour; The step S4 includes the following steps: Step S41, disconnection detection, specifically: The first step is to detect the breakpoints in the crack contour of the broken glass. The detection formula is: The detection criterion is that the 8-neighborhood contains only one bright spot; The second step is to calculate the length and direction of the broken line. To do this, you need to determine the end position of the breakpoint. The criteria for determining the end point are: Step S42, disconnection connection, specifically: The first step is to connect the endpoints of the broken lines with the same direction and close distance. The calculation of the broken line direction can be calculated by gradient calculation, or determined by the vector of the head and tail points of the broken line. The distance between the starting point of the broken line must be less than a certain threshold T. dist , the directions of breakedge1 and breakedge2 need to satisfy: Where angle_edge represents the disconnection angle, and connect_angle represents the disconnection connection angle; Step 2: For the disconnected wires not connected in the first step, evaluate whether to extend them. The criteria are: The disconnected wires that need to be extended must meet the following conditions: Among them, grad break_pt Indicates the breakpoint gradient value, length break_edge is the length of the broken line; For broken wires that meet the extension conditions, they are extended along their direction extension lines. The extension points need to meet the following conditions: Among them, grad ext_pt is the gradient size of the extension point, angle ext_pt is the gradient vector angle of the extension point, angle break_edge is the line breaking angle; the extension operation stops when it touches the crack line of the glass fragments; Step 3: Save the unprocessed disconnections as a list unkonw_break_edge , filter out the unprocessed disconnections to get the result graph of this step; Step 4: invert the result graph of step 3 in step S42 to obtain a glass fragment segmentation graph, and calculate whether each glass fragment is approximately a convex polygon; first calculate the ratio of the area of ​​each glass fragment to the area of ​​the smallest outer convex polygon edge, and if it is less than a threshold, it is a normal glass fragment; If it is greater than the threshold, a second judgment is made to calculate the corner points of the glass fragment polygon. The edge direction change rate at the corner point is much greater than the set threshold. The formula is angle_diff corner_pt >T angle_diff Formula 7; Among them, angle_diff corner_pt is the rate of change of the edge direction at the corner point, and the point with the maximum value of the rate of change is the corner point; after obtaining the approximated polygon, determine whether the polygon corner point is a convex point; the judgment standard is to calculate the minimum distance from the corner point to the smallest outer polygon edge; If the calculated distance is greater than the predetermined threshold, it is determined to be a concave point; then the list saved in the third step is traversed unkonw_break_edge , check whether the concave point is on the broken line; if it is, extend the broken line in the second step and adjust the judgment standard of the extension point to be more relaxed; When the particle contours of all glass fragments are traversed, step S4 is completed.

2. The method for extracting the outline of broken glass according to claim 1, characterized in that: The step S1 includes the following steps: Step S11, placing glass on a transparent glass platform, taping the entire surface of the glass, and then using a safety glass hammer to break the glass in a preset specific impact area; Step S12, installing a backlight source below the transparent glass platform, and installing an industrial camera above the transparent glass; the industrial camera is an area array camera or a line array camera; Step S13: photograph the broken area with an industrial camera to collect images of broken glass.

3. The method for extracting the outline of broken glass according to claim 1, characterized in that: The step S2 includes the following steps: Step S21, remove the reflective cracks, the specific method is: calculate the average mean and standard deviation stdv of the broken glass image; execute the following formula to replace the reflective crack outlier pixel value with a dark pixel, the formula is: Where g(x,y) represents the pixel value at the x,y coordinate of the image; Step S22, binarizing the image obtained in step S21, wherein the processing method includes the OTSU binarization method; Step S23: The dust and fine glass debris on the transparent glass platform are regarded as the causes of the small black spots and small bright spots in the binary image obtained in step S22, and the small black spots and small bright spots in the binary image are removed.

4. The method for extracting the outline of broken glass according to claim 1, characterized in that: In step S3, the binary image after filtering in step S2 is thinned, and the thinning algorithm used includes Zhang-Suen thinning algorithm.

5. The method for extracting the outline of broken glass according to claim 1, characterized in that: In the broken area, the observation results of most of the glass fragments are approximately convex polygons.

6. The method for extracting the outline of broken glass according to claim 1, characterized in that: In step S1, the glass breakage image of the breaking area is a square area of ​​5 cm×5 cm.