Glue road defect detection method and device and visual detection system
By dividing the control area in the workpiece image and performing edge pixel group detection, the problem of complex glue circuit detection errors is solved, and high-precision detection of glue circuit defects is achieved to ensure product quality.
Patent Information
- Application Number
- CN202411086628.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art has the risk of error detection when detecting complex glue circuits, and the detection error is large, making it difficult to accurately identify glue circuit defects.
By dividing multiple control areas in the workpiece image and performing defect detection based on the edge pixel group of the middle line of the area, different defect detection standards are set, which are suitable for conventional and complex glue paths, and the accuracy of glue path width and glue breaking defects is achieved. Test.
It improves the accuracy and accuracy of rubber circuit defect detection, reduces detection errors, and ensures the stability of workpiece product quality.
Smart Images

Figure CN119198726A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of industrial vision technology, and in particular, relates to a method, device and visual inspection system for detecting defects in a rubber road. Background Art
[0002] In industrial production, most of the time, the robot arm is guided to glue the workpiece according to a preset path. Since the robot arm will shake during the movement, trajectory errors and abnormal glue output may occur. The glue path of the workpiece may have quality defects, and the glue path of the workpiece needs to be quality inspected.
[0003] At present, the glue path of the workpiece is generally image recognized and edge detected to identify features with low edge smoothness as glue path defects.
[0004] However, when faced with complex glue paths, the above method has the risk of misdetection and large detection errors. Summary of the invention
[0005] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, device and visual inspection system for detecting defects in a rubber road, which improves the detection accuracy and reduces the detection error.
[0006] In a first aspect, the present application provides a method for detecting adhesive path defects, the method comprising:
[0007] Acquire a workpiece image, wherein the workpiece image includes a workpiece glue path of the workpiece to be measured;
[0008] By using a plurality of glue path controls, the workpiece glue path is divided into regions in the workpiece image to obtain a plurality of control regions, and a regional midline is determined in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path;
[0009] According to the edge pixel information of the workpiece glue path, an edge pixel group of the workpiece glue path corresponding to the midline of the region is obtained;
[0010] According to the defect detection standard corresponding to the edge pixel group, defect detection is performed on the workpiece glue path in each of the control areas to determine the glue path defects of the workpiece glue path in the workpiece to be tested.
[0011] According to the glue path defect detection method of the present application, the glue path of the workpiece is divided into control areas through the glue path control, and defect detection is performed on each control area separately according to the edge pixel group corresponding to the midline of the area. Different defect detection standards can be set for each control area. It is not only suitable for conventional glue paths, but also can conveniently, quickly, timely and accurately perform glue path defect detection on special-shaped and complex glue paths, thereby ensuring the product quality of the workpiece to be tested, improving the detection accuracy and reducing the detection error.
[0012] According to an embodiment of the present application, the glue path defect includes a glue path width defect, and the defect detection is performed on the workpiece glue path in each of the control areas according to the defect detection standard corresponding to the edge pixel group, and the glue path defect of the workpiece glue path in the workpiece to be tested is determined, including:
[0013] Determining glue path width information of the glue path of the workpiece according to the edge pixel group;
[0014] Based on the defect detection standard, a defect judgment is performed on the width range corresponding to the control area and the glue path width information to determine the area width defect of each control area;
[0015] According to the area width defect, the glue path width defect of the workpiece glue path is obtained.
[0016] According to an embodiment of the present application, obtaining the glue path width defect of the workpiece glue path according to the area width defect includes:
[0017] According to the defect position information of the area width defect, the area width defect of each control area is split or merged to obtain the glue path width defect.
[0018] According to an embodiment of the present application, obtaining the edge pixel group of the workpiece glue path corresponding to the midline of the region according to the edge pixel information of the workpiece glue path includes:
[0019] The edge pixel group corresponding to each midline pixel point in the midline of the region is determined in the edge pixel information.
[0020] According to an embodiment of the present application, the glue path defect includes a glue path break defect, the control area includes a control line, the control line is determined based on the extension direction of the workpiece glue path, and the defect detection of the workpiece glue path in each of the control areas according to the defect detection standard corresponding to the edge pixel group includes:
[0021] Determine distance information from each edge pixel in the edge pixel group to the control line;
[0022] Determine the deviation correction amount of the center line in the area based on the distance information;
[0023] According to the deviation correction amount, adjusting the center line of the area;
[0024] Based on the adjusted midline of the area, the glue path break defect of the workpiece glue path in each of the control areas is detected by the defect detection standard.
[0025] According to an embodiment of the present application, based on the adjusted midline of the area, detecting the glue path break defect of the workpiece glue path in each of the control areas by the defect detection standard includes:
[0026] According to the adjusted grayscale value of each midline pixel point in the midline of the area, determine the starting and ending position information of the glue path break defect of the workpiece glue path in each control area;
[0027] The glue path break defect is determined based on the start and end position information and the defect detection standard.
[0028] According to an embodiment of the present application, determining the glue path break defect based on the start and end position information and the defect detection standard includes:
[0029] According to the start and end position information, determining the regional glue breaking defect in each of the control areas by using the defect detection standard;
[0030] Based on the positional relationship between the multiple control areas, the regional glue breaking defects are merged to obtain the glue path glue breaking defect.
[0031] According to one embodiment of the present application, the midline of the area of the glue path control is a straight line segment or an arc segment.
[0032] In a second aspect, the present application provides a device for detecting defects in a rubber road, the device comprising:
[0033] An acquisition module, used for acquiring a workpiece image, wherein the workpiece image includes a workpiece glue path of the workpiece to be measured;
[0034] A first processing module is used to divide the workpiece glue path into regions in the workpiece image by using a plurality of glue path controls to obtain a plurality of control regions, and determine a regional midline in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path;
[0035] A second processing module is used to obtain an edge pixel group of the workpiece glue path corresponding to the midline of the area according to the edge pixel information of the workpiece glue path;
[0036] The third processing module is used to perform defect detection on the workpiece glue path in each of the control areas according to the defect detection standard corresponding to the edge pixel group, and determine the glue path defects of the workpiece glue path in the workpiece to be tested.
[0037] In a third aspect, the present application provides a visual inspection system, the system comprising:
[0038] An image acquisition device, wherein the image acquisition device is used to acquire a workpiece image of the workpiece to be measured;
[0039] A data processing device, the data processing device is electrically connected to the image acquisition device, and the data processing device is used to execute the glue road defect detection method described in the first aspect above.
[0040] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for detecting glue path defects as described in the first aspect above is implemented.
[0041] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for detecting glue path defects as described in the first aspect above is implemented.
[0042] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the glue road defect detection method as described in the first aspect.
[0043] In a seventh aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the glue path defect detection method as described in the first aspect above.
[0044] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0046] Figure 1 It is one of the flow diagrams of the method for detecting adhesive road defects provided in the embodiment of the present application;
[0047] Figure 2 It is a schematic diagram of the distribution of the workpiece glue path provided in the embodiment of the present application;
[0048] Figure 3 is a schematic diagram of the distribution of the glue path area provided in the embodiment of the present application;
[0049] Figure 4 It is one of the schematic diagrams of the glue path width defect provided in the embodiments of the present application;
[0050] Figure 5 This is the second schematic diagram of the glue path width defect provided in the embodiment of the present application;
[0051] Figure 6This is the third schematic diagram of the glue path width defect provided in the embodiment of the present application;
[0052] Figure 7 This is the second flow chart of the adhesive path defect detection method provided in the embodiment of the present application;
[0053] Figure 8 is a structural schematic diagram of a glue path defect detection device provided in an embodiment of the present application;
[0054] Fig. 9 is a schematic diagram of the structure of a visual inspection system provided in an embodiment of the present application;
[0055] Fig.10 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0057] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0058] The following, in combination with the accompanying drawings, describes in detail the glue road defect detection method, glue road defect detection device, electronic device and readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0059] Among them, the glue path defect detection method can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.
[0060] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).
[0061] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.
[0062] The glue path defect detection method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the glue path defect detection method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The glue path defect detection method provided in the embodiment of the present application is described below using an electronic device as an example of the execution subject.
[0063] like Figure 1 As shown, the glue path defect detection method includes: steps 110 to 140.
[0064] Step 110 : Acquire a workpiece image, where the workpiece image includes a workpiece glue path of the workpiece to be measured.
[0065] like Figure 2 As shown, there is a workpiece glue path on the surface of the workpiece to be tested, which is used to characterize the distribution of glue. The black part is the surface of the workpiece to be tested, which serves as the background, and the white part is the workpiece glue path. The shape of the workpiece glue path may be relatively complex, and there may be different widths.
[0066] The workpiece image can be obtained by performing image acquisition or data scanning on the workpiece to be measured by an image acquisition device, and includes the appearance characteristics of the workpiece glue path.
[0067] Step 120, using a plurality of glue path controls, the workpiece glue path is divided into regions in the workpiece image to obtain a plurality of control regions, and a regional midline is determined in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path.
[0068] Among them, the glue path control can be a closed figure in the current state, represented by a box of different shapes, where two adjacent control areas are connected and the workpiece glue path is cut off, and each control area is provided with a regional midline along the extension direction of the workpiece glue path, and the regional midlines of two adjacent control areas are continuous.
[0069] It is understandable that the shape and size of the glue path control are adjustable, and the glue path control can be selected and adjusted according to the shape, size, direction and detection standard of the workpiece glue path.
[0070] For example, a glue path control may be represented as a rectangular box or a circular ring segment.
[0071] like Figure 3As shown, the solid line part is the control area divided by the glue path control, and the corresponding glue path control is in the shape of a closed circular segment. The dotted line part is the midpoint of the area. The distances from the midpoint of the area to the two arc segments of the glue path control are equal. The workpiece glue path is divided into areas by using four glue path controls to obtain four control areas. The edges of the control area determined in the extension direction of the workpiece glue path are parallel arc segments.
[0072] In actual implementation, multiple glue path controls of corresponding shapes and numbers are selected according to the shape, size, direction and detection standard of the workpiece glue path, and each glue path control is mapped to the corresponding position of the workpiece glue path based on positioning algorithms such as geometric positioning. The workpiece glue path is divided into a corresponding number of control areas, and the area midline is set along the extension direction of the workpiece glue path in the control area. Each glue path control can independently set the detection width, glue break length, glue deviation and other defect detection conditions that meet the detection standards for the control area, so as to perform defect detection with different defect standards on the workpiece glue path in the control area.
[0073] Step 130 , obtaining an edge pixel group of the workpiece glue path corresponding to the midline of the region according to the edge pixel information of the workpiece glue path.
[0074] The edge pixel information includes the pixel position coordinates and quantity of edge pixel points of the edge contour of the workpiece glue path, which can be obtained by performing edge detection on the workpiece glue path.
[0075] It can be understood that the regional midline may correspond to multiple edge pixel groups, each edge pixel group includes 2 edge pixel points, and the line connecting the 2 edge pixel points in each edge pixel group intersects with the regional midline, for example, intersects vertically.
[0076] In actual implementation, in each control area, according to the edge pixel information in the control area, a plurality of corresponding edge pixel groups are sequentially determined along the extension direction of the midline of the area.
[0077] Step 140: perform defect detection on the workpiece glue path in each control area according to the defect detection standard corresponding to the edge pixel group, and determine the glue path defects of the workpiece glue path in the workpiece to be tested.
[0078] It can be understood that a plurality of edge pixel groups can characterize the contour features of the glue path of the workpiece, and the defect types of the glue path defects can include at least one of defects such as insufficient glue, excessive glue, glue breakage and glue deviation.
[0079] It should be noted that each control area is equipped with an independent defect detection standard for the workpiece glue path. The defect detection standard corresponds to a defect detection condition. Through the defect detection condition, it is possible to judge whether the glue path in the control area meets the defect detection standard and determine the defect type of the glue path defect.
[0080] In actual implementation, according to the defect detection conditions corresponding to the defect detection standards corresponding to each control area, the edge pixel groups of each control area are traversed respectively, the edge pixel groups that do not meet the defect detection standards of the workpiece glue path are screened out, and the corresponding defect types are determined. The combination of pixel position coordinates, number and defect type of the edge pixel groups that do not meet the defect detection standards in each control area are taken as the glue path defects of the workpiece glue path.
[0081] It should be noted that for irregularly shaped workpiece glue paths, the width of each section and the width compliance standards may be different, but if the glue paths that belong to qualified workpieces are inspected for defects as a whole, false detections are likely to occur.
[0082] According to the glue path defect detection method provided in the embodiment of the present application, the glue path of the workpiece is divided into control areas through the glue path control, and defect detection is performed on each control area separately according to the edge pixel group corresponding to the midline of the area. Different defect detection standards can be set for each control area. It is not only suitable for conventional glue paths, but also can conveniently, quickly, timely and accurately perform glue path defect detection on special-shaped and complex glue paths, thereby ensuring the product quality of the workpiece to be tested, improving the detection accuracy and reducing the detection error.
[0083] In some embodiments, the glue path defect includes a glue path width defect, and defect detection is performed on the workpiece glue path in each control area according to the defect detection standard corresponding to the edge pixel group, and the glue path defect of the workpiece glue path in the workpiece to be tested is determined, including:
[0084] Determine the glue path width information of the workpiece glue path according to the edge pixel group;
[0085] Based on the defect detection standard, the width range corresponding to the control area and the defect detection standard corresponding to the glue path width information are used to determine the area width defect of each control area;
[0086] According to the area width defect, the glue path width defect of the workpiece glue path is obtained.
[0087] Among them, the glue path width defect includes the situation that the glue path width of the entire workpiece is not within the width range, which can include the glue path being too narrow or too wide.
[0088] The glue path width information may be equal to the distance between two edge pixel points in the edge pixel group, and may be calculated through the pixel position coordinates of the two edge pixel points.
[0089] The width range can be limited by upper and lower limits, and the width range of each control area can be set separately and differently.
[0090] The defect detection standard may include: determining that the situation where the width of the glue path of the workpiece in a single control area is not within the width range is a regional width defect.
[0091] In actual execution, the glue path width information is determined according to the distance between two edge pixel points in each edge pixel group, and the glue path width information corresponding to the control area is analyzed according to the width range in the control area corresponding to the edge pixel group. According to the glue path width information, it is determined that the distance between the two edge pixel points is within the width range, and the area of the workpiece glue path corresponding to the edge pixel group has no width defect. When it is greater than the upper limit value of the width range, the area of the workpiece glue path corresponding to the edge pixel group has the defect of the glue path being too wide. When it is less than the lower limit value of the width range, the area of the workpiece glue path corresponding to the edge pixel group has the defect of the glue path being too narrow.
[0092] In this embodiment, by setting the width range in segments in each control area, the width defects of the glue path width information are detected in each control area respectively, so that the glue path width defects of multiple width ranges of the workpiece glue path segmentation can be obtained.
[0093] In some embodiments, obtaining a glue path width defect of a glue path of a workpiece according to a region width defect includes:
[0094] According to the defect position information of the area width defect, the area width defect of each control area is split or merged to obtain the glue path width defect.
[0095] The defect position information may include pixel position coordinates and pixel range of the area width defect in the glue path area.
[0096] It can be understood that when dividing the control area, by setting the connection between two adjacent control areas, the defects in the adjacent control areas can be merged.
[0097] like Figure 4 As shown, the black part is the background, the white part is the workpiece glue path, the dotted line is the center line of the area, and the boxes on the left and the right may be the area width defects of the glue path being too narrow detected in the two adjacent control areas. Taking the box on the left as an example, the arrow in the X direction points to the extension direction of the workpiece glue path, and the arrow in the Y direction points to the direction perpendicular to the extension direction of the workpiece glue path.
[0098] like Figure 5As shown, the black part is the background, the white part is the workpiece glue path, the edge pixel point on the lower side of the workpiece glue path is used as the reference line, and when the width ranges of the two control areas are equal, the lower limit of the width range is used as the reference value, and the rectangular box is calculated upward from the reference line. The left and right sides of the rectangular box are used to mark the range of the area width defect. The lower edge of the rectangular box coincides with the edge of the control area, and the distance between the upper edge of the rectangular box and the reference line is equal to the reference value. The area of the rectangular box is the missing glue path area of the part where the glue path is too narrow. Since the glue path width defects of the two adjacent control areas are both due to the glue path being too narrow, and the missing glue path area is continuous, the glue path width defects of the two control areas can be merged into one, and then the glue path width defect of the entire workpiece glue path is obtained.
[0099] like Figure 6 As shown, the black part is the background, and the white part is the glue path of the workpiece. Figure 4 When the width ranges corresponding to the left and right boxes are not equal, two rectangular boxes are determined to mark the missing glue path areas where the glue path is too narrow, so as to split the regional width defects.
[0100] It should be noted that the reference line is determined in the following way:
[0101] In the process of dividing the control area, the division starts from one end of the workpiece glue path and then to the other end. Along the division direction of the control area, the starting point (startPoint), midpoint (midPoint) and end point (endPoint) of the area midline of each control area can be determined. The pixel position coordinates are (x start ,y start )、(x mid ,y mid ) and (x end ,y end ), calculate the directional index dMul of the midline in each region:
[0102] dMul=(x mid -x start )*(y end -y mid )-(y mid -y start )*(x end -x mid )
[0103] Among them, if dMul<0, the midpoint of the region is counterclockwise, otherwise it is clockwise.
[0104] like Figure 4 As shown, if the division starts from the lower end of the workpiece glue path upward, dMul≥0, which is clockwise, and the edge pixel point on the right side along the clockwise direction can be used as a reference line.
[0105] In addition, without dividing the workpiece glue path according to the control area, the starting point (startPoint), end point (endPoint) and area number of the midline of each area can be determined. The area number is determined according to the division order of the control area.
[0106] In the related art, when performing defect detection on a complex glue path, the workpiece glue path is divided into zones and defect detection is performed on each zone separately. This is not only cumbersome and complicated to operate, but may also cause different parts of a defect to be divided into two areas and identified as two defects, resulting in inaccurate defect detection.
[0107] In this embodiment, by splitting or merging the area width defects, a more accurate glue path width defect can be obtained, thereby reducing the risk of misidentification and improving the accuracy of defect detection.
[0108] In some embodiments, according to the edge pixel information of the workpiece glue path, obtaining the edge pixel group of the workpiece glue path corresponding to the midline of the region includes:
[0109] The edge pixel group corresponding to each midline pixel point in the midline of the region is determined in the edge pixel information.
[0110] The center line pixel point may be a set of pixel points obtained by dividing the center line of the region according to unit pixels.
[0111] In actual implementation, each pixel point on the midline of the area can be used as a centerline pixel point, and a vertical line can be drawn for each centerline pixel point. The combination of two edge pixel points located on the vertical line can be used as an edge pixel group, which can characterize the glue path width of the workpiece glue path at the location of the centerline pixel point.
[0112] In this embodiment, the edge pixel group representing the glue path width of the workpiece is obtained through the center line pixel point, which can provide a basis for the accurate detection of glue path width defects.
[0113] In some embodiments, the glue path defect includes a glue path break defect, the control area includes a control line, the control line is determined based on the extension direction of the workpiece glue path, and according to the defect detection standard corresponding to the edge pixel group, the workpiece glue path in each control area is subjected to defect detection, including:
[0114] Determine the distance information from each edge pixel in the edge pixel group to the control line;
[0115] Based on the distance information, determine the correction amount for the center line in the area;
[0116] Adjust the center line of the area according to the correction amount;
[0117] Based on the adjusted area midline, the glue path break defect of the workpiece glue path in each control area is detected by the defect detection standard.
[0118] Among them, the glue path break defect includes the situation where the glue path of the workpiece is discontinuous. The defect detection standard can set the defect detection conditions for the glue path break defect. For example, the defect detection condition is that the center line of the area is within the range of the glue path of the workpiece. The defect detection standard may include: treating the part where the center line of the area is not within the range of the glue path of the workpiece as a glue path break defect.
[0119] The direction of the control line is along the extension direction of the workpiece glue path and does not intersect with the workpiece glue path. It can be used to frame the area where the workpiece glue path is located to assist in defect detection of the workpiece glue path.
[0120] like Figure 4 As shown, the control line can be two arc segments arranged in parallel, and the center line of the region is arranged in parallel with the control line.
[0121] The deviation correction value can be used to characterize the offset distance and direction of the center line of the area relative to the workpiece glue path.
[0122] In this embodiment, the correction amount dCorrect is calculated as follows:
[0123]
[0124] Among them, widthR is the distance from the edge pixel point on the right side of the edge pixel group to the control line on the right side, widthL is the distance from the edge pixel point on the left side of the edge pixel group to the control line on the left side, and nRegionLength is the pixel length of the midline of the region.
[0125] According to the positive and negative values of the deviation correction amount, the deviation direction of the center line of the area is determined, and according to the value of the deviation correction amount, the deviation distance of the center line of the area is determined, and the center line of the area is adjusted and corrected;
[0126] The adjusted area centerline will pass through the workpiece glue path, and the position and range corresponding to all area centerlines passing through the workpiece glue path are determined as glue path break defects.
[0127] In this embodiment, since the center line of the zone may be greatly offset from the center line of the workpiece glue path, or may not even intersect with the workpiece glue path, the accuracy and robustness of glue path break defect detection are improved by automatically adjusting the position and correcting the center line of the zone.
[0128] In some embodiments, based on the adjusted regional midline, detecting the glue path break defect of the workpiece glue path in each control area by using a defect detection standard includes:
[0129] According to the gray value of each midline pixel point in the adjusted area midline, the starting and ending position information of the glue path break defect of the workpiece glue path is determined in each control area;
[0130] Determine the glue path break defect based on the start and end position information and defect detection standards.
[0131] The start and end position information includes the start and end points of the glue path break defect. Correspondingly, the defect detection standard may include: taking the position where the midline of each control area is interrupted as the glue break defect.
[0132] In actual execution, in each control area, the midline pixel points in the midline of the adjusted area are traversed, and the binary image is segmented for each midline pixel point to obtain the grayscale value of each midline pixel point. When the grayscale value changes from 255 to 0, the midline pixel point is used as the starting point of the glue path break defect. When the grayscale value changes from 0 to 255, the midline pixel point is used as the end point of the glue path break defect. According to the defect detection standard, the starting point and end point of the glue path break defect in all control areas are respectively used as the glue path break defect.
[0133] In this embodiment, the glue path break defect is detected for each control area through the adjusted regional midline, so that the glue path break defect can be detected quickly and accurately.
[0134] In some embodiments, determining the glue path break defect based on the start and end position information and the defect detection standard includes:
[0135] According to the start and end position information, the regional glue breaking defect in each control area is determined by the defect detection standard;
[0136] Based on the positional relationship between multiple control areas, the regional glue breaking defects are merged to obtain the glue path glue breaking defect.
[0137] The positional relationship may be represented as an area serial number of the control area.
[0138] In actual implementation, according to the defect detection standard, the position where the regional midline of each control area is interrupted is taken as the regional glue break defect. When a regional glue break defect is located in two adjacent control areas at the same time, the starting point (startPoint), end point (endPoint) and regional sequence number of the midline of each area are used to determine whether the two control areas are adjacent, so as to determine whether the end point of the previous regional glue break defect is the starting point of the next regional glue break defect along the extension direction of the workpiece glue path. If so, the two regional glue break defects are merged as a glue path glue break defect, and the combination of the starting point and end point of the regional glue break defects in all control areas is taken as the glue path glue break defect.
[0139] In this embodiment, by merging regional glue breaking defects, more accurate glue path glue breaking defects can be obtained, thereby reducing the risk of misidentification and improving the accuracy of defect detection.
[0140] In some embodiments, the centerline of the area of the glue path control is a straight line segment or an arc segment.
[0141] In this embodiment, by setting the midpoint of the area of the straight line segment corresponding to the rectangular control area, or setting the midpoint of the area of the arc segment corresponding to the circular segment, the extension direction of the workpiece glue path can be accurately marked, thereby improving the accuracy of defect detection.
[0142] A specific embodiment is described below.
[0143] like Figure 7 As shown, according to the workpiece glue path on the workpiece image, set the corresponding glue path control.
[0144] In this step, multiple glue path controls of corresponding shapes and numbers are selected according to the shape, size, direction and detection standard of the glue path of the workpiece.
[0145] The glue path control is used to divide the workpiece glue path into multiple control areas.
[0146] In this step, based on positioning algorithms such as geometric positioning, each glue path control is mapped to the corresponding position of the workpiece glue path, the workpiece glue path is divided into a corresponding number of control areas, and the regional midline is set in the control area along the extension direction of the workpiece glue path.
[0147] Determine the edge pixel group corresponding to the midline in the region.
[0148] In this step, in each control area, according to the edge pixel information in the control area, a plurality of corresponding edge pixel groups are sequentially determined along the extension direction of the midline of the area.
[0149] Combine the control area and edge pixel group to perform glue path defect detection.
[0150] In this step, according to the defect detection conditions corresponding to the defect detection standards of each control area, the edge pixel groups of each control area are traversed respectively, the edge pixel groups that do not meet the defect detection conditions of the detection standards of the workpiece glue path are screened out, and the corresponding defect types are determined, and the combination of pixel position coordinates, number and defect type of the edge pixel groups that do not meet the defect detection conditions in each control area are taken as the glue path defects of the workpiece glue path.
[0151] In this embodiment, the workpiece glue path is divided into control areas through the glue path control, and defect detection is performed on each control area according to the edge pixel group corresponding to the midline of the area. Different defect detection standards can be set for each control area. This is not only suitable for conventional glue paths, but also can conveniently, quickly, timely and accurately perform glue path defect detection on special-shaped and complex glue paths, thereby ensuring the product quality of the workpiece to be tested, improving detection accuracy and reducing detection errors.
[0152] The glue road defect detection method provided in the embodiment of the present application can be executed by a glue road defect detection device. In the embodiment of the present application, the glue road defect detection device executing the glue road defect detection method is taken as an example to illustrate the glue road defect detection device provided in the embodiment of the present application.
[0153] The embodiment of the present application also provides a glue path defect detection device.
[0154] like Figure 8 As shown, the glue road defect detection device includes: an acquisition module 810, a first processing module 820, a second processing module 830 and a third processing module 840.
[0155] An acquisition module 810 is used to acquire a workpiece image, wherein the workpiece image includes a workpiece glue path of the workpiece to be measured;
[0156] The first processing module 820 is used to divide the workpiece glue path into regions in the workpiece image by using a plurality of glue path controls to obtain a plurality of control regions, and determine a regional midline in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path;
[0157] The second processing module 830 is used to obtain the edge pixel group of the workpiece glue path corresponding to the midline of the area according to the edge pixel information of the workpiece glue path;
[0158] The third processing module 840 is used to perform defect detection on the workpiece glue path in each control area according to the defect detection standard corresponding to the edge pixel group, and determine the glue path defects of the workpiece glue path in the workpiece to be tested.
[0159] According to the glue path defect detection device provided in the embodiment of the present application, the glue path of the workpiece is divided into control areas through the glue path control, and defect detection is performed on each control area separately according to the edge pixel group corresponding to the midline of the area. Different defect detection standards can be set for each control area. It is not only suitable for conventional glue paths, but also can conveniently, quickly, timely and accurately perform glue path defect detection on special-shaped and complex glue paths, thereby ensuring the product quality of the workpiece to be tested, improving the detection accuracy and reducing the detection error.
[0160] In some embodiments, the glue path defect includes a glue path width defect, and the third processing module 840 is further configured to:
[0161] Determine the glue path width information of the workpiece glue path according to the edge pixel group;
[0162] Based on the defect detection standard, the width range and glue path width information corresponding to the control area are judged to determine the area width defect of each control area;
[0163] According to the area width defect, the glue path width defect of the workpiece glue path is obtained.
[0164] In some embodiments, the third processing module 840 is further configured to:
[0165] According to the defect position information of the area width defect, the area width defect of each control area is split or merged to obtain the glue path width defect.
[0166] In some embodiments, the second processing module 830 is further configured to:
[0167] The edge pixel group corresponding to each midline pixel point in the midline of the region is determined in the edge pixel information.
[0168] In some embodiments, the glue path defect includes a glue path break defect, the control area includes a control line, and the control line is determined based on the extension direction of the workpiece glue path. The third processing module 840 is further used to:
[0169] Determine the distance information from each edge pixel in the edge pixel group to the control line;
[0170] Based on the distance information, determine the correction amount for the center line in the area;
[0171] Adjust the center line of the area according to the correction amount;
[0172] Based on the adjusted area midline, the glue path break defect of the workpiece glue path in each control area is detected by the defect detection standard.
[0173] In some embodiments, the third processing module 840 is further configured to:
[0174] According to the gray value of each midline pixel point in the adjusted area midline, the starting and ending position information of the glue breaking defect of the workpiece glue path is determined in each control area;
[0175] Determine the glue path break defect based on the start and end position information and defect detection standards.
[0176] In some embodiments, the third processing module 840 is further configured to:
[0177] According to the start and end position information, the regional glue breaking defect in each control area is determined by the defect detection standard;
[0178] Based on the positional relationship between multiple control areas, the regional glue breaking defects are merged to obtain the glue path glue breaking defect.
[0179] In some embodiments, the centerline of the area of the glue path control is a straight line segment or an arc segment.
[0180] The adhesive road defect detection device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0181] The adhesive path defect detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0182] The adhesive path defect detection device provided in the embodiment of the present application can achieve Figures 1 to 7 To avoid repetition, the various processes implemented in the embodiment of the glue road defect detection method are not described here.
[0183] In some embodiments, Fig. 9 As shown, the embodiment of the present application also provides a visual inspection system, including:
[0184] An image acquisition device 910, the image acquisition device 910 is used to acquire a workpiece image of the workpiece to be measured;
[0185] The data processing device 920 is electrically connected to the image acquisition device 910. The data processing device 920 is used to implement each process of the above-mentioned glue road defect detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0186] The data processing device 920 may be a chip, CPU or other device into which the algorithm program of the glue road defect detection method is written.
[0187] In some embodiments, Fig.10 As shown, an embodiment of the present application also provides an electronic device 1000, including a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When the program is executed by the processor 1001, each process of the above-mentioned glue road defect detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0188] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0189] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned glue road defect detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0190] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0191] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned glue path defect detection method when executed by a processor.
[0192] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0193] An embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned glue road defect detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0194] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0195] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0196] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the glue road defect detection method of each embodiment of the present application.
[0197] In the description of this application, "first feature" or "second feature" may include one or more of the features.
[0198] In the description of the present application, “plurality” means two or more.
[0199] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0200] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0201] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for detecting adhesive road defects, characterized in that: include: Acquire a workpiece image, wherein the workpiece image includes a workpiece glue path of the workpiece to be measured; By using a plurality of glue path controls, the workpiece glue path is divided into regions in the workpiece image to obtain a plurality of control regions, and a regional midline is determined in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path; According to the edge pixel information of the workpiece glue path, an edge pixel group of the workpiece glue path corresponding to the midline of the region is obtained; According to the defect detection standard corresponding to the edge pixel group, defect detection is performed on the workpiece glue path in each of the control areas to determine the glue path defects of the workpiece glue path in the workpiece to be tested.
2. The method for detecting adhesive road defects according to claim 1, characterized in that: The glue path defect includes a glue path width defect, and the defect detection is performed on the workpiece glue path in each of the control areas according to the defect detection standard corresponding to the edge pixel group, and the glue path defect of the workpiece glue path in the workpiece to be tested is determined, including: Determining glue path width information of the glue path of the workpiece according to the edge pixel group; Based on the defect detection standard, a defect judgment is performed on the width range corresponding to the control area and the glue path width information to determine the area width defect of each control area; According to the area width defect, the glue path width defect of the workpiece glue path is obtained.
3. The method for detecting adhesive road defects according to claim 2, characterized in that: The step of obtaining the glue path width defect of the glue path of the workpiece according to the area width defect comprises: According to the defect position information of the area width defect, the area width defect of each control area is split or merged to obtain the glue path width defect.
4. The method for detecting adhesive road defects according to claim 1, characterized in that: The step of obtaining the edge pixel group of the workpiece glue path corresponding to the midline of the region according to the edge pixel information of the workpiece glue path comprises: The edge pixel group corresponding to each midline pixel point in the midline of the region is determined in the edge pixel information.
5. The method for detecting adhesive road defects according to claim 1, characterized in that: The glue path defect includes a glue path break defect, the control area includes a control line, and the control line is determined based on the extension direction of the workpiece glue path. The defect detection of the workpiece glue path in each control area according to the defect detection standard corresponding to the edge pixel group includes: Determine distance information from each edge pixel in the edge pixel group to the control line; Based on the distance information, determine the correction amount of the center line in the area; According to the deviation correction amount, adjusting the center line of the area; Based on the adjusted midline of the area, the glue path break defect of the workpiece glue path in each of the control areas is detected by the defect detection standard.
6. The method for detecting adhesive road defects according to claim 5, characterized in that: The step of detecting the glue path break defect of the workpiece glue path in each of the control areas based on the adjusted area midpoint by using the defect detection standard includes: According to the adjusted grayscale value of each midline pixel point in the midline of the area, determine the starting and ending position information of the glue path break defect of the workpiece glue path in each control area; The glue path break defect is determined based on the start and end position information and the defect detection standard.
7. The method for detecting adhesive road defects according to claim 6, characterized in that: The determining the glue path break defect based on the start and end position information and the defect detection standard includes: According to the start and end position information, determining the regional glue breaking defect in each of the control areas by using the defect detection standard; Based on the positional relationship between the multiple control areas, the regional glue breaking defects are merged to obtain the glue path glue breaking defect.
8. The method for detecting adhesive road defects according to any one of claims 1 to 7, characterized in that: The midline of the area of the glue path control is a straight line segment or an arc segment.
9. A device for detecting defects in a rubber road, characterized in that: include: An acquisition module, used for acquiring a workpiece image, wherein the workpiece image includes a workpiece glue path of the workpiece to be measured; A first processing module is used to divide the workpiece glue path into regions in the workpiece image by using a plurality of glue path controls to obtain a plurality of control regions, and determine a regional midline in the plurality of control regions, wherein the regional midline is determined based on an extension direction of the workpiece glue path; A second processing module is used to obtain an edge pixel group of the workpiece glue path corresponding to the midline of the area according to the edge pixel information of the workpiece glue path; The third processing module is used to perform defect detection on the workpiece glue path in each of the control areas according to the defect detection standard corresponding to the edge pixel group, and determine the glue path defects of the workpiece glue path in the workpiece to be tested.
10. A visual inspection system, characterized in that: include: An image acquisition device, wherein the image acquisition device is used to acquire a workpiece image of the workpiece to be measured; A data processing device, the data processing device is electrically connected to the image acquisition device, and the data processing device is used to execute the glue road defect detection method according to any one of claims 1-8.
Citation Information
Cited By
Rubber road defect detection method based on deep learning and contour analysis
CN121258900A
