Detection method of special miniature bearings for 5G equipment based on image recognition

Through a detection method based on image recognition, the grayscale characteristics and shape characteristics of the edge pixels of the connected domain are used to identify the scratch area of ​​the ultra-miniature bearings used in 5G equipment, which solves the problem of incomplete edge detection in the existing technology and improves the quality of bearings. Accuracy and efficiency of defect identification.

CN118314142BActive Publication Date: 2024-08-23NANTONG SK SEIKO CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739864.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-23
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing visual anomaly detection methods for micro bearings used in 5G equipment, such as Sobel bidirectional edge detection, have problems with incomplete or broken edge connections, which affects the accuracy of bearing defect identification.

Method used

Using a detection method based on image recognition, by obtaining the bearing image, it is determined that the edge pixels of the connected domain are the first probability indicators of the scratched edge pixels, and based on the shape characteristics of the suspected scratched area, it is determined whether it belongs to the bearing scratched area. Improve the accuracy of defect identification.

Benefits of technology

It improves the identification accuracy of defective areas of special micro bearings, can more effectively identify scratch areas of bearings, reduces misjudgments, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314142B
    Figure CN118314142B
Patent Text Reader

Abstract

The present application relates to the field of image recognition, and provides a special micro bearing detection method for 5G equipment based on image recognition. The method determines the connected domain in the bearing image by identifying the bearing image; determines the first probability index that the edge pixel points of the connected domain are scratch edge pixel points, and determines whether the edge pixel points of the connected domain are scratch edge pixel points based on the first probability index; if so, obtains a suspected scratch area based on the scratch edge pixel points, and determines the second probability index that the suspected scratch area belongs to the bearing scratch area based on the shape characteristics of the suspected scratch area; determines whether the suspected scratch area belongs to the bearing scratch area based on the second probability index. The method first determines the suspected scratch area, and then determines whether the suspected scratch area belongs to the bearing scratch area based on the shape characteristics of the suspected scratch area, thereby determining the defective area of ​​the bearing. The method can improve the recognition accuracy of the defective area of ​​the bearing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition, and in particular to a special micro-bearing detection method for 5G equipment based on image recognition. Background Art

[0002] Micro bearings are widely used in 5G devices. These bearings often carry rotating parts of 5G devices, such as fans, motors, etc. Their performance problems may cause unstable operation or even damage to 5G devices. Therefore, it is very important to detect micro bearings for 5G devices. In the production process of 5G devices, micro bearings are often scratched. If not discovered in time, it is likely to cause irreparable losses. Existing technologies usually use Sobel bidirectional edge detection for visual anomaly detection of micro bearings for 5G devices. However, since the Sobel operator detects edges based on the differences between local pixels, in some cases it will cause incomplete or broken edge connections, affecting the accuracy of bearing defect recognition. Summary of the invention

[0003] To solve the above problems, the present application provides a special micro-bearing detection method for 5G equipment based on image recognition, which can improve the accuracy of bearing defect identification.

[0004] The present application provides a method for detecting special micro bearings for 5G equipment based on image recognition, including:

[0005] Acquire a bearing image, and determine a connected domain in the bearing image;

[0006] Determine a first probability index of an edge pixel point of a connected domain being a scratch edge pixel point, and determine whether the edge pixel point of the connected domain is a scratch edge pixel point based on the first probability index;

[0007] If yes, a suspected scratch region is obtained based on the scratch edge pixel points, and a second probability indicator is determined that the suspected scratch region belongs to the bearing scratch region based on the shape feature of the suspected scratch region;

[0008] Based on the second probability indicator, it is determined whether the suspected scratch area belongs to the bearing scratch area.

[0009] The first probability index of determining that the edge pixel point of the connected domain is a scratch edge pixel point includes:

[0010] A neighborhood window of a preset size is established with the i-th edge pixel of the connected domain as the central pixel;

[0011] Determine a first scratch boundary based on the grayscale features of the central pixel and the pixels in the neighborhood window, and calculate the average grayscale value and variance of the pixels on the first scratch boundary; the first scratch boundary is a line connecting the central pixel and the pixels in the neighborhood window;

[0012] A first probability index that an edge pixel point of a connected domain is a scratch edge pixel point is calculated based on an average gray value and variance of pixels on the first scratch boundary, an angle between the first scratch boundary and the horizontal direction, a first reference angle between the first scratch boundary and the second scratch boundary, a second reference angle between the scratch boundary and the third scratch boundary, and an average gray value of pixels in the neighborhood window;

[0013] Among them, the second scratch boundary is the line connecting the adjacent pixel points on the left side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood; the third scratch boundary is the line connecting the adjacent pixel points on the right side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood.

[0014] Wherein, determining the first scratch boundary based on the grayscale features of the central pixel point and the pixel points in the neighborhood window includes:

[0015] Connect the central pixel point with each pixel point in the neighborhood window to obtain multiple pixel lines;

[0016] Calculate the average gray value of the pixels on each pixel line;

[0017] The straight line of pixels with the largest average gray value is determined as the first scratch boundary.

[0018] Among them, the calculation method of the first probability index of the edge pixel point of the connected domain being a scratch edge pixel point is:

[0019] ;

[0020] in, Indicates the first probability index that the i-th edge pixel point of the connected domain is a scratch edge pixel point, It represents the average gray value of the pixel points on the first scratch boundary, which is the average gray value of the pixel line with the largest average gray value. represents the gray value variance of the pixel points on the first scratch boundary, represents the angle between the first scratch boundary and the horizontal direction, represents the pixel point adjacent to the left side of the i-th edge pixel point in the first scratch boundary, represents the first reference angle between the first scratch boundary and the second scratch boundary, represents the pixel point adjacent to the right side of the i-th edge pixel point in the first scratch boundary, represents the second reference angle between the first scratch boundary and the third scratch boundary, , They represent the average grayscale values ​​of the pixels in the two areas where the neighborhood window is divided by the first scratch boundary, .

[0021] Wherein, determining whether the edge pixel point of the connected domain is a scratch edge pixel point based on the first probability index includes:

[0022] Normalizing the first probability indicator to obtain a first probability;

[0023] If the first probability is greater than a first preset value, it is determined that the edge pixel point of the connected domain is a scratch edge pixel point.

[0024] Wherein, determining the second probability index that the suspected scratch area belongs to the bearing scratch area based on the shape characteristics of the suspected scratch area includes:

[0025] Determine the circumscribed rectangle of the suspected scratch area, and divide the circumscribed rectangle into four test areas using the diagonal lines of the circumscribed rectangle;

[0026] Determine the ratio of the number of pixels in the suspected scratch area to the number of pixels in the suspected scratch area in the four test areas respectively, and use the two test areas with larger ratios as reference areas;

[0027] The second probability indicator that the suspected scratch area belongs to the bearing scratch area is calculated based on the aspect ratio of the circumscribed rectangle, the difference between the ratio of the number of pixels belonging to the suspected scratch area and the number of pixels in the suspected scratch area in the two reference areas, and the mean of the first-order differential chain code corresponding to the suspected scratch area; wherein the first-order differential chain code corresponding to the suspected scratch area is determined based on the chain code of the edge of the suspected scratch area.

[0028] The calculation method of the second probability index that the suspected scratch area belongs to the bearing scratch area is:

[0029] ;

[0030] in, The second probability indicator indicating that the suspected scratch area j belongs to the bearing scratch area, , They represent the length and width of the circumscribed rectangle of the suspected scratch area j, The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the largest ratio to the number of pixels m in the suspected scratch area j is represented by The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the second largest ratio to the number of pixels m in the suspected scratch area j, Represents the first-order difference chain code corresponding to the suspected scratch area j The kth parameter in , u represents the total number of parameters in the first-order difference chain code, Represents the mean of the first-order difference chain code corresponding to the suspected scratch area j.

[0031] Wherein, determining whether the suspected scratch area belongs to the bearing scratch area based on the second probability indicator includes:

[0032] Normalizing the second probability indicator to obtain a second probability;

[0033] If the second probability is greater than a second preset value, it is determined that the suspected scratch area belongs to a bearing scratch area.

[0034] Wherein, the method further comprises:

[0035] Determine a third probability index that the two suspected abrasion regions belonging to the bearing abrasion regions belong to the same abrasion region based on the second probability corresponding to the two suspected abrasion regions belonging to the bearing abrasion regions and the distance between the two closest pixel points in the two suspected abrasion regions belonging to the bearing abrasion regions;

[0036] The third probability index is normalized to obtain a third probability. If the third probability is greater than a third preset value, two suspected scratch areas belonging to the bearing scratch area are merged to obtain the bearing scratch area.

[0037] Wherein, obtaining a bearing image and determining a connected domain in the bearing image includes:

[0038] Acquire a bearing image, and grayscale the acquired bearing image;

[0039] De-noising the grayscale image, and performing rough extraction on the grayscale image to obtain a bearing profile image;

[0040] The Sobel bidirectional edge detection algorithm is used to process the bearing contour image and obtain the connected domain in the bearing image.

[0041] The beneficial effects of the present application are as follows: the present application provides a special micro-bearing detection method for 5G equipment based on image recognition. The method first determines the suspected scratch area based on the first probability index that the edge pixel points of the connected domain are the scratch edge pixel points, and then determines whether the suspected scratch area belongs to the bearing scratch area according to the shape characteristics of the suspected scratch area, thereby determining the defective area of ​​the bearing. This method can improve the recognition accuracy of the bearing defective area. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0043] Figure 1 It is a flow chart of the first embodiment of the method for detecting special micro bearings for 5G equipment based on image recognition of the present invention;

[0044] Figure 2 A schematic diagram of a bearing profile image provided by an embodiment of the present invention;

[0045] Figure 3 for Figure 1 A schematic flow chart of an embodiment of step S12;

[0046] Figure 4 A binary image provided by an embodiment of the present invention;

[0047] Figure 5 for Figure 1 A schematic flow chart of an embodiment of step S13;

[0048] Figure 6 A schematic diagram of a circumscribed rectangle provided by an embodiment of the present invention;

[0049] Figure 7 This is a flow chart of the second embodiment of the special micro-bearing detection method for 5G equipment based on image recognition of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] In the production process of special micro bearings for 5G equipment, if the processing technology is unreasonable or the operation is improper, it may cause wear and scratches on the bearing surface. If there are impurities or contaminants in the bearing parts or lubricants, these particles may also cause increased friction and cause scratches. Or in the assembly process of the bearing, if the assembly force is uneven or inappropriate, scratches on the bearing surface may also occur. The present invention uses computer vision technology to perform feature analysis on the acquired images according to the characteristics of the scratch area of ​​the special micro bearings for 5G equipment, judge the possibility that each area belongs to the scratch area, and thus improve the identification of the scratch area. Specifically, based on the Sobel bidirectional edge detection, according to the angle change between the pixels of the scratched edge of the 5G special micro bearing and the distribution characteristics of the grayscale values ​​on both sides of the edge of the scratched area, the possibility of the edge pixel points belonging to the scratched area is calculated, normalized, and expansion and corrosion operations are performed, and then the suspected scratched area is extracted, and then the possibility of the suspected scratched area belonging to the scratched area is calculated based on whether the suspected scratched area is funnel-shaped, whether the circumscribed rectangle of the suspected scratched area is a long strip shape, and whether the edge of the suspected scratched area is regular, and then the final scratched area of ​​the special micro bearing for 5G equipment is extracted. The invention, based on the combination of an automatic image acquisition device, can spontaneously identify whether the special micro bearing for 5G equipment has a scratch problem, thereby improving work efficiency. The technical solution of this application is described in detail below.

[0052] See also Figure 1 , which is a flow chart of the first embodiment of the 5G device special micro bearing detection method based on image recognition of the present invention, specifically including:

[0053] Step S11: Acquire a bearing image, and determine a connected domain in the bearing image.

[0054] Nowadays, in most 5G devices, miniature bearings are indispensable parts. Common bearings are mainly divided into rolling bearings and sliding bearings. Deep groove ball bearings are the most common type of rolling bearings. Compared with other types of bearings, deep groove ball bearings have the advantages of simple structure and low manufacturing cost. Therefore, deep groove ball bearings are widely used in 5G devices. This application takes deep groove ball bearings as an example for explanation.

[0055] In order to realize the visual detection of special miniature bearings used in 5G equipment, this application first needs to add corresponding devices, including bearing transmission lines, manipulators for picking up bearings, CCD cameras for photographing bearings, upper and lower computers for processing the photographed images, some sensors and control circuits, etc.

[0056] In practical applications, a camera is used to capture an image of a bearing to obtain a bearing image, and the obtained bearing image is grayed to obtain a grayed image. The grayed image is subjected to denoising, such as smoothing and image enhancement, to achieve denoising operations. The grayed image is further subjected to coarse extraction to obtain a bearing contour image. Since the background has a great influence on image recognition, coarse extraction of the grayed image can eliminate the interference of the background area and reduce the amount of computer calculations, thereby improving efficiency. In a specific embodiment, an ROI algorithm can be used for coarse extraction to obtain a bearing contour image, such as Figure 2 As shown. Using Sobel bidirectional edge detection algorithm Figure 2 The bearing contour image shown is processed to obtain the connected domain in the bearing image.

[0057] Bearings are generally made of metal. Since metal is ductile, it is difficult to form scratches in the direction of metal extension. Figure 2 The connection between the surface (shown) and the round surface (the round surface of the bearing) is prone to scratches. The scratches start from the connection and extend in the direction perpendicular to the extension of the metal. The closer to the middle position, the harder it is to form scratches. It should be noted that the extension direction of the metal is the x direction, that is, the scratches start from the connection and extend in the y direction. Figure 2 shown.

[0058] Step S12: determining a first probability index of whether an edge pixel point of a connected domain is a scratched edge pixel point, and determining whether an edge pixel point of a connected domain is a scratched edge pixel point based on the first probability index.

[0059] When the bearing has a scratch area, the grayscale value of the edge pixel of the scratch area is high, and the grayscale value does not change significantly. The angle between the edge pixels of adjacent scratch areas changes greatly. Because the grayscale values ​​of the scratch area and other areas are significantly different, the grayscale value difference on both sides of the scratch area boundary is more obvious. One side is dark gray or even black, and the grayscale value mean is close to 0, while the other side is light gray, and the grayscale value mean is not close to 0, and the angle between the edge of the scratch area and the x direction is large.

[0060] Based on the above analysis logic, further determine whether the edge pixel points of the connected domain in the bearing image are scratch edge pixels, specifically calculate the first probability index of the edge pixel points of the connected domain being scratch edge pixels, and determine whether the edge pixel points of the connected domain are scratch edge pixels based on the first probability index. Figure 3 , step S12 comprises:

[0061] Step S31: establishing a neighborhood window of a preset size with the i-th edge pixel point of the connected domain as the central pixel point.

[0062] First, the i-th edge pixel of the connected domain is taken as the center pixel, and a preset size is established. The neighborhood window of .

[0063] Step S32: Determine the first scratch boundary based on the grayscale features of the central pixel and the pixels in the neighborhood window, and calculate the average grayscale value and variance of the pixels on the first scratch boundary; the first scratch boundary is the line connecting the central pixel and the pixels in its neighborhood window.

[0064] Specifically, the central pixel point is connected with each pixel point in the neighborhood window to obtain a plurality of pixel lines; the average gray value of the pixel points on each pixel line is calculated; and the pixel line with the largest average gray value is determined as the first scratch boundary.

[0065] In a specific embodiment, the pixel straight line between the ith edge pixel point and each pixel point in the neighborhood window is used as the direction of the pixel sequence in the neighborhood, and the total number of directions of the pixel sequence is recorded as , and then calculate the average gray value of the pixel line in each direction and record it as , the pixel line with the largest average gray value is assumed to be the first scratch boundary, and the first scratch boundary is recorded as , the average gray value of the pixel on the first scratch boundary is recorded as , the variance is recorded as .

[0066] Step S33: Based on the average grayscale value and variance of the pixels on the first scratch boundary, the angle between the first scratch boundary and the horizontal direction, the first reference angle between the first scratch boundary and the second scratch boundary, the second reference angle between the scratch boundary and the third scratch boundary, and the average grayscale value of the pixels in the neighborhood window, a first probability indicator is calculated that the edge pixel of the connected domain is a scratch edge pixel.

[0067] The second scratch boundary is the line connecting the adjacent pixel points on the left side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood; the third scratch boundary is the line connecting the adjacent pixel points on the right side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood. Specifically, on the first scratch boundary, the adjacent pixel points on the left side of the i-th edge pixel point (i.e., the central pixel point) are respectively recorded as , the pixel points adjacent to the side of the i-th edge pixel point are . and Center point, select The neighborhood window of the center point is used to calculate the mean of the pixel sequence on the line connecting each pixel point in the neighborhood window. The pixel sequence with the largest mean is taken as the scratch boundary. The two scratch boundaries are recorded as the second scratch boundary and the second scratch boundary. , the third scratch boundary The grayscale averages of the second scratch boundary and the third scratch boundary are recorded as , , the second scratch boundary The first reference angle between the first scratch boundary is recorded as , the third scratch boundary The second reference angle between the first scratch boundary and , the first scratch boundary and the horizontal direction Figure 2 The angle in the x direction is .

[0068] Furthermore, the first scratch boundary divides the neighborhood window with the i-th edge pixel as the center pixel into two regions, which are respectively and , and The average grayscale of the pixels in the two regions are recorded as and .

[0069] Based on the above parameters, the first probability index of the edge pixel point of the connected domain being a scratch edge pixel point is calculated using the following formula:

[0070] ;

[0071] in, Indicates the first probability index that the i-th edge pixel point of the connected domain is a scratch edge pixel point, It represents the average gray value of the pixel points on the first scratch boundary, which is the average gray value of the pixel line with the largest average gray value. represents the gray value variance of the pixel points on the first scratch boundary, represents the angle between the first scratch boundary and the horizontal direction, represents the pixel point adjacent to the left side of the i-th edge pixel point in the first scratch boundary, represents the first reference angle between the first scratch boundary and the second scratch boundary, represents the pixel point adjacent to the right side of the i-th edge pixel point in the first scratch boundary, represents the second reference angle between the first scratch boundary and the third scratch boundary, , They represent the average grayscale values ​​of the pixels in the two areas where the neighborhood window is divided by the first scratch boundary, .

[0072] In the above formula, Indicates the ratio of the average grayscale value of the upper pixel of the first scratch boundary to the maximum grayscale value 255. The larger the ratio, the higher the variance. The smaller it is, the brighter the first scratch boundary is. The greater the possibility that the first scratch boundary is a scratch boundary, the higher the probability that the i-th edge pixel belongs to the first probability index of the scratch edge pixel. The bigger. , The larger the value is, the more irregular the boundary of the suspected scratch area is. The i-th edge pixel is the first probability index of the scratch edge pixel. The bigger it is, the smaller it is. The larger the value is, the more likely it is that the first scratch boundary is a light spot, and the smaller the possibility that the first scratch boundary is a scratch boundary. The smaller it is, the greater the possibility that the first scratch boundary is a scratch boundary, and the first probability index of the i-th edge pixel point is a scratch edge pixel point big. express and The difference in the average grayscale value of the pixels in the two regions is greater. The greater the difference, the more it conforms to the characteristics of the scratched area. The i-th edge pixel is the first probability index of the scratched edge pixel. The bigger.

[0073] The first probability index of each edge pixel point in the connected domain being a scratched edge pixel point is calculated by the above method, and whether the edge pixel point in the connected domain is a scratched edge pixel point is determined based on the first probability index. Normalize and map the value to the interval [0,1] to get the first probability ; If the first probability If the value is greater than the first preset value, the edge pixel point of the connected domain is determined to be a scratch edge pixel point. In a specific embodiment, the first preset value can be set to 0.8.

[0074] Step S13: If yes, obtain a suspected scratch area based on the scratch edge pixel points, and determine a second probability indicator that the suspected scratch area belongs to the bearing scratch area based on the shape characteristics of the suspected scratch area.

[0075] Through the above step S12, it is determined whether the edge pixel points of the connected domain are scratch edge pixels. If the edge pixel points of the connected domain are scratch edge pixels, the suspected scratch area is further obtained based on the scratch edge pixels. Specifically, the suspected scratch area is obtained by performing expansion and corrosion operations. It can be understood that the area surrounded by all the scratch edge pixels is the suspected scratch area. The grayscale value of the pixel points in the suspected scratch area is set to 255, and the grayscale values ​​of other pixels are set to 0, and the image is converted into a binary image, such as Figure 4 A second probability indicator that the suspected scratch area belongs to the bearing scratch area is further determined based on the shape feature of the suspected scratch area.

[0076] In one embodiment, please combine Figure 5 , step S13 specifically includes:

[0077] Step S51: determine the circumscribed rectangle of the suspected scratch area, and divide the circumscribed rectangle into four areas to be tested using the diagonal lines of the circumscribed rectangle.

[0078] Since the connection between the side and the round surface of the micro bearing is easy to form scratches, the closer to the center, the more difficult it is to form scratches, so the overall scratch area is triangular or inverted triangle, such as Figure 4 Theoretically, the circumscribed rectangle of the scratch area is close to a square, but both the triangle and the inverted triangle meet certain common characteristics, that is, the diagonal lines of the smallest circumscribed rectangle of the suspected scratch area are connected to form four test areas, in which the number of pixels in the suspected scratch area in one of the test areas is much higher than that in the other three test areas, and the edge of the scratch area is irregular.

[0079] Based on the above analysis, taking any suspected scratch area j as an example, determine the circumscribed rectangle of the suspected scratch area j (the circumscribed rectangle is the minimum circumscribed rectangle), and use the diagonal of the circumscribed rectangle to divide the circumscribed rectangle into 4 test areas, of which the upper and lower test areas are recorded as and , the two test areas on the left and right are recorded as and , such as Figure 6 shown.

[0080] Step S52: respectively determine the ratio of the number of pixels in the suspected scratch area to the number of pixels in the suspected scratch area in the four test areas, and use the two test areas with the ratio as reference areas.

[0081] Specifically, remember 4 areas to be tested The number of pixels belonging to the suspected scratch area j in , the number of pixels in the suspected scratch area j is m. Calculate the number of pixels in the four test areas belonging to the suspected scratch area j The ratio of the number of pixels m in the suspected scratch area j is, that is, the maximum ratio is , the next largest ratio is , and the two tested areas corresponding to the two ratios are used as reference areas.

[0082] Step S53: A second probability indicator that the suspected scratch area belongs to the bearing scratch area is calculated based on the aspect ratio of the circumscribed rectangle, the difference between the ratio of the number of pixels belonging to the suspected scratch area and the number of pixels in the suspected scratch area in the two reference areas, and the mean of the first-order differential chain code corresponding to the suspected scratch area; wherein the first-order differential chain code corresponding to the suspected scratch area is determined based on the chain code of the edge of the suspected scratch area.

[0083] The length and width of the circumscribed rectangle of the suspected scratch area j are respectively and , calculate the ratio of length to width, and thus determine whether the suspected scratch area j is a square.

[0084] Furthermore, the chain code of the edge of the suspected scratch area is obtained. Specifically, the 8-chain code can be used. The first-order difference chain code corresponding to the suspected scratch area is further calculated based on the chain code of the edge of the suspected scratch area, which is recorded as .

[0085] Based on the above parameters, the second probability index of the suspected scratch area belonging to the bearing scratch area is calculated using the following formula:

[0086] ;

[0087] in, The second probability indicator indicating that the suspected scratch area j belongs to the bearing scratch area, , They represent the length and width of the circumscribed rectangle of the suspected scratch area j, The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the largest ratio to the number of pixels m in the suspected scratch area j is represented by The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the second largest ratio to the number of pixels m in the suspected scratch area j, Represents the first-order difference chain code corresponding to the suspected scratch area j The kth parameter in , and u represents the total number of parameters in the first-order difference chain code.

[0088] In the above formula, the aspect ratio of the circumscribed rectangle of the suspected scratch area j is The closer it is to 1, the closer the suspected scratch area j is to a square, and the more it conforms to the characteristics of the scratch area, so the suspected scratch area j belongs to the second probability index of the bearing scratch area. The larger the aspect ratio The further away from 1, the closer the suspected scratch area j is to a long strip, which does not meet the characteristics of the scratch area. The second probability indicator that the suspected scratch area j belongs to the bearing scratch area The smaller.

[0089] The second probability index represents the difference between the ratio of the number of pixels n belonging to the suspected scratch area j and the number of pixels m in the suspected scratch area j in the two reference areas. The larger the difference, the more the suspected scratch area j conforms to the characteristics of a triangle or an inverted triangle, and the suspected scratch area j belongs to the bearing scratch area. On the contrary, the second probability indicator that the suspected scratch area j belongs to the bearing scratch area The smaller.

[0090] The mean of the first-order differential chain code of the edge pixel sequence of the suspected scratch area j, that is, the mean of the first-order differential chain code corresponding to the suspected scratch area j. The larger the mean, the more irregular the suspected scratch area j is, which conforms to the characteristics of the scratch area. Therefore, the suspected scratch area j belongs to the second probability indicator of the bearing scratch area. The bigger.

[0091] Step S14: determining whether the suspected scratch area belongs to a bearing scratch area based on the second probability indicator.

[0092] In the above step S13, a second probability index can be determined that the suspected scratch area belongs to the bearing scratch area, and whether the suspected scratch area belongs to the bearing scratch area is determined based on the second probability index. Specifically, the second probability index is normalized and the value is mapped to the interval [0,1] to obtain the second probability index. ; If the second probability If the value is greater than the second preset value, it is determined that the suspected scratch area belongs to the bearing scratch area. In this embodiment, the second preset value can be set to 0.8.

[0093] In the present application, the defect area of ​​the micro bearing for 5G equipment (i.e., the bearing scratch area) can be determined in the above manner.

[0094] In the present invention, the image to be tested is first obtained by computer vision technology, and ROI rough extraction is first performed to eliminate the interference of the background area. Then, Sobel bidirectional edge detection is used to calculate the first probability index of the connected domain pixel points belonging to the scratch edge pixel points according to the angle change between the pixels of the scratch edge of the 5G special micro bearing and the distribution characteristics of the grayscale values ​​on both sides of the edge of the scratch area, and normalize it, and perform expansion and corrosion operations to form a complete suspected scratch area. Then, according to whether the suspected scratch area is funnel-shaped, whether the circumscribed rectangle of the suspected scratch area is a long strip shape, and whether the edge of the suspected scratch area is regular, the second probability index of the suspected scratch area belonging to the bearing scratch area is calculated, and based on the second probability index, it is determined that the suspected scratch area belongs to the on-axis scratch area, thereby determining the defective area of ​​the special micro bearing for 5G equipment.

[0095] For further information, see Figure 7 , Figure 7 FIG. 1 is a flow chart of a second embodiment of a method for detecting special micro bearings for 5G equipment based on image recognition according to the present invention. Figure 1 The first embodiment shown, after step S14, further includes:

[0096] Step S15: Determine a third probability indicator that two suspected scratch areas belonging to the bearing scratch area belong to the same scratch area based on the second probability corresponding to the two suspected scratch areas belonging to the bearing scratch area and the distance between the two nearest pixel points in the two suspected scratch areas belonging to the bearing scratch area.

[0097] In practice, the scratched area is more obvious near the boundary and less obvious in the center, so it is difficult to identify the scratched area in the center, which may result in the same scratched area being identified as multiple suspected scratched areas when extracting the connected domain. Figure 2 In the y direction shown, the upper and lower suspected scratch areas both belong to the same scratch area, the two are very close to each other, and the probabilities that the upper and lower suspected scratch areas belong to the scratch area are highly similar.

[0098] Note two suspected scratch areas belonging to the bearing scratch area and The second probability of belonging to the bearing scratch area is , the distance between the two closest pixels in the two suspected scratch areas belonging to the bearing scratch area is , then the third probability index of the two suspected scratch areas belonging to the bearing scratch area belonging to the same scratch area is:

[0099] ;

[0100] In the formula, The third probability indicator indicating that two suspected scratch areas belonging to the bearing scratch area belong to the same scratch area, It represents the difference in the second probability that two suspected scratch areas belonging to the bearing scratch area belong to the bearing scratch area. The greater the difference, the smaller the third probability index that the two suspected scratch areas belong to the same scratch area. The smaller the difference, the larger the third probability index that the two suspected scratch areas belong to the same scratch area. It represents the distance between the two nearest pixel points in two suspected abrasion areas. The closer the distance is, the more likely it is that the two suspected abrasion areas are in the same vertical direction. The greater the third probability index that the two suspected abrasion areas belong to the same abrasion area, the smaller the possibility is.

[0101] Step S16: normalize the third probability index to obtain a third probability. If the third probability is greater than a third preset value, merge two suspected scratch areas belonging to the bearing scratch area to obtain a bearing scratch area.

[0102] For the third probability index Normalize it and map it to the interval [0,1], and the corresponding third probability is recorded as , if the third probability is greater than the third preset value, the third preset value may be 0.9, such as , then the two suspected scratch areas are considered to belong to the same scratch area, and the closest pair of pixel points in the two suspected scratch areas are connected and merged into the same area, thereby obtaining the bearing scratch area.

[0103] Specifically, the merged area is expanded, and the probability that the expanded area belongs to the scratch area is the conjugate of the second probability that the two suspected scratch areas belong to the bearing scratch area, which is specifically expressed as:

[0104] ;

[0105] in, represents the conjugate of the second probability that the two suspected scratch areas belong to the bearing scratch area. When it is greater than 0.9, it is marked as a bearing scratch area, i.e. a defective area.

[0106] The above are only implementation methods of the present application, and are not intended to limit the scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the protection scope of the present application.

Claims

1. A method for detecting special micro bearings for 5G equipment based on image recognition, characterized in that: include: Acquire a bearing image, and determine a connected domain in the bearing image; Determine a first probability index of an edge pixel point of a connected domain being a scratch edge pixel point, and determine whether the edge pixel point of the connected domain is a scratch edge pixel point based on the first probability index; If yes, a suspected scratch area is obtained based on the scratch edge pixel points, and a second probability indicator is determined that the suspected scratch area belongs to the bearing scratch area based on the shape characteristics of the suspected scratch area; Determining whether the suspected scratch area belongs to the bearing scratch area based on the second probability indicator; Determining the first probability index of the edge pixel point of the connected domain as the scratch edge pixel point includes: A neighborhood window of a preset size is established with the i-th edge pixel of the connected domain as the central pixel; Determine a first scratch boundary based on the grayscale features of the central pixel and the pixels in the neighborhood window, and calculate the average grayscale value and variance of the pixels on the first scratch boundary; the first scratch boundary is a line connecting the central pixel and the pixels in the neighborhood window; A first probability index that an edge pixel point of a connected domain is a scratch edge pixel point is calculated based on an average gray value and variance of pixels on the first scratch boundary, an angle between the first scratch boundary and the horizontal direction, a first reference angle between the first scratch boundary and the second scratch boundary, a second reference angle between the scratch boundary and the third scratch boundary, and an average gray value of pixels in the neighborhood window; The second scratch boundary is a line connecting the pixel points adjacent to the left side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood; the third scratch boundary is a line connecting the pixel points adjacent to the right side of the central pixel point in the first scratch boundary and the pixel points in its neighborhood; Determining the first scratch boundary based on the grayscale features of the central pixel and the pixels in the neighborhood window includes: Connect the central pixel point with each pixel point in the neighborhood window to obtain multiple pixel lines; Calculate the average gray value of the pixels on each pixel line; Determine the pixel straight line with the largest average gray value as the first scratch boundary; The calculation method of the first probability index of the edge pixel point of the connected domain being a scratch edge pixel point is: ; in, Indicates the first probability index that the i-th edge pixel point of the connected domain is a scratch edge pixel point, It represents the average gray value of the pixel points on the first scratch boundary, which is the average gray value of the pixel line with the largest average gray value. represents the gray value variance of the pixel points on the first scratch boundary, represents the angle between the first scratch boundary and the horizontal direction, represents the pixel point adjacent to the left side of the i-th edge pixel point in the first scratch boundary, represents the first reference angle between the first scratch boundary and the second scratch boundary, represents the pixel point adjacent to the right side of the i-th edge pixel point in the first scratch boundary, represents the second reference angle between the first scratch boundary and the third scratch boundary, , They represent the average grayscale values ​​of the pixels in the two areas where the neighborhood window is divided by the first scratch boundary, ; Determining a second probability indicator that the suspected scratch area belongs to the bearing scratch area based on the shape feature of the suspected scratch area includes: Determine the circumscribed rectangle of the suspected scratch area, and divide the circumscribed rectangle into four test areas using the diagonal lines of the circumscribed rectangle; Determine the ratio of the number of pixels in the suspected scratch area to the number of pixels in the suspected scratch area in the four test areas respectively, and use the two test areas with larger ratios as reference areas; The second probability index that the suspected scratch area belongs to the bearing scratch area is calculated based on the aspect ratio of the circumscribed rectangle, the difference between the ratio of the number of pixels belonging to the suspected scratch area and the number of pixels in the suspected scratch area in the two reference areas, and the mean of the first-order differential chain code corresponding to the suspected scratch area; wherein the first-order differential chain code corresponding to the suspected scratch area is determined based on the chain code of the edge of the suspected scratch area; The second probability indicator that the suspected scratch area belongs to the bearing scratch area is calculated as follows: ; in, The second probability indicator indicating that the suspected scratch area j belongs to the bearing scratch area, , They represent the length and width of the circumscribed rectangle of the suspected scratch area j, The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the largest ratio to the number of pixels m in the suspected scratch area j is represented by The ratio of the number of pixels n belonging to the suspected scratch area j in the reference area with the second largest ratio to the number of pixels m in the suspected scratch area j, Represents the first-order difference chain code corresponding to the suspected scratch area j The kth parameter in , u represents the total number of parameters in the first-order difference chain code, Represents the mean of the first-order difference chain code corresponding to the suspected scratch area j.

2. The method for detecting special micro bearings for 5G equipment based on image recognition according to claim 1 is characterized in that: Determining whether an edge pixel point of a connected domain is a scratch edge pixel point based on the first probability index includes: Normalizing the first probability indicator to obtain a first probability; If the first probability is greater than a first preset value, it is determined that the edge pixel point of the connected domain is a scratch edge pixel point.

3. The method for detecting special micro bearings for 5G equipment based on image recognition according to claim 1 is characterized in that: Determining whether the suspected scratch area belongs to the bearing scratch area based on the second probability indicator includes: Normalizing the second probability indicator to obtain a second probability; If the second probability is greater than a second preset value, it is determined that the suspected scratch area belongs to a bearing scratch area.

4. The method for detecting special micro bearings for 5G equipment based on image recognition according to claim 3 is characterized in that: The method further comprises: Determine a third probability index that the two suspected abrasion regions belonging to the bearing abrasion regions belong to the same abrasion region based on the second probability corresponding to the two suspected abrasion regions belonging to the bearing abrasion regions and the distance between the two closest pixel points in the two suspected abrasion regions belonging to the bearing abrasion regions; The third probability index is normalized to obtain a third probability. If the third probability is greater than a third preset value, two suspected scratch areas belonging to the bearing scratch area are merged to obtain the bearing scratch area.

5. The method for detecting special micro bearings for 5G equipment based on image recognition according to claim 1 is characterized in that: Acquiring a bearing image and determining a connected domain in the bearing image includes: Acquire a bearing image, and grayscale the acquired bearing image; De-noising the grayscale image, and performing rough extraction on the grayscale image to obtain a bearing profile image; The Sobel bidirectional edge detection algorithm is used to process the bearing contour image and obtain the connected domain in the bearing image.