Bearing defect detection method and system based on computer vision

Through gradient operator and double threshold detection technology, combined with edge curvature and texture feature analysis, the bearing defect index is generated, which solves the problem of misjudgment in bearing detection in the existing technology, improves the accuracy and reliability of detection, and is suitable for complex bearing surfaces Defect detection.

CN118799706AActive Publication Date: 2024-10-18CHANGSHU INSTITUTE OF TECHNOLOGY

Patent Information

Application Number
CN202411286882.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-10-18
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Existing bearing defect detection methods based on computer vision are easily affected by noise, uneven illumination and background interference during the image refinement and threshold detection processes, resulting in incomplete contours or misjudgments, making it impossible to accurately determine bearing damage.

Method used

The gradient operator is used to calculate the gray value gradient component of the bearing surface image, and non-maximum suppression and double threshold detection are performed. Combined with edge curvature and texture feature analysis, a bearing defect index is generated to evaluate bearing defects.

Benefits of technology

Through precise edge detection and comprehensive feature analysis, the accuracy and reliability of bearing defect detection are improved, the impact of noise and uneven lighting is reduced, complex bearing surface images can be better processed, and detailed evaluation indicators are provided to help for quality control and fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799706A_ABST
    Figure CN118799706A_ABST
Patent Text Reader

Abstract

The invention provides a bearing defect detection method and system based on computer vision, and relates to the technical field of bearing defect detection.The bearing defect detection method comprises the steps that a bearing surface image is collected, graying and denoising processing is carried out, an identification image is obtained, a gradient operator is used for calculating the gray gradient in the horizontal direction and the gray gradient in the vertical direction, and non-maximum suppression is carried out; edge pixel points are obtained; edge strength is calculated, double threshold detection is set, strong edges and weak edges are combined to form a continuous edge curve, and the continuous edge curve is divided into a defect area and a non-defect area; collecting a defect edge curve length, calculating an edge curvature, evaluating a shape feature coefficient, and generating a texture feature coefficient by using a local binary pattern; calculating the gray variance of the defect area, and comprehensively generating a bearing defect index; and comparing the bearing defect index with a threshold value, and judging whether the bearing has defects or not. The bearing defect index is generated through image processing and feature analysis and compared with the threshold value, and accurate detection of the bearing defects is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bearing defect detection, and in particular to a bearing defect detection method and system based on computer vision. Background Art

[0002] With the development of industrialization, bearings, as an indispensable component in mechanical equipment, play a key role in supporting and transmitting power in various mechanical equipment, and can reduce friction between mechanical parts, which can greatly improve the reliability and stability of equipment. As a key mechanical transmission component, the outer ring side and the inner ring side of the bearing play a major transmission role. However, during the operation of the machinery, the rolling elements and raceways of the bearings are constantly rubbing against each other during long-term use, resulting in material fatigue damage. When fatigue gradually accumulates to a certain extent, it may cause microscopic deformation or unevenness of the inner and outer sides of the bearings. Therefore, the side health of the bearing is directly related to the safety, reliability and economy of the equipment. Therefore, regular inspection and maintenance of bearings and timely handling of bearing defects are essential to ensure long-term stable operation of equipment and improve production efficiency.

[0003] In the prior art, publication number CN115147407A discloses a bearing quality detection method based on computer vision, which uses image refinement operation to obtain single-pixel contour lines, divides each single-pixel contour line equally, and obtains the minimum circumscribed rectangle as the ring line segment detection area; calculates the linearity of the ring line segment detection area, and judges the damage of the bearing ring by comparing the linearity with a set threshold and comparing the direction angle mean of the contour line with a set threshold.

[0004] Insufficient existing technology: When collecting images for refinement, the noise, uneven lighting and background interference in the image may affect the clarity of the contour and the accuracy of refinement, resulting in incomplete contours or redundant details, and selecting the minimum enclosing rectangle as the ring detection. When the contour shape is complex or has overlapping parts, it is necessary to ensure that the selected enclosing rectangle can accurately surround the ring and not misjudge the non-ring area.

[0005] When setting the thresholds for linearity and angular orientation, it is necessary to fully consider the characteristic differences of different parts of the bearing and possible noise and interference factors. Bearings of different types and specifications may have different geometric shapes and surface features. The straightness of the line segments and the smoothness of the edges must be considered, which is crucial for the accuracy of judging damage. The single threshold detection method may result in misjudgment, resulting in the inability to complete the quality inspection of the bearing.

[0006] Therefore, it is necessary to provide a bearing defect detection method and system based on computer vision to solve the above problems.

[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0008] The purpose of the present invention is to provide a bearing defect detection method and system based on computer vision to solve the problems raised in the above background technology.

[0009] To achieve the above object, the present invention provides the following technical solutions: A bearing defect detection method based on computer vision, the specific steps include: Step 1: Collect the surface image of the side of the bearing to be evaluated, grayscale the collected surface image and perform denoising to obtain the first recognition image of the inner surface of the bearing, apply the gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal and vertical directions of the first recognition image, perform non-maximum suppression in the two types of gradient directions, and obtain edge pixel points; Step 2: Calculate the edge strength of each edge pixel, and set up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combine adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, and segment the first recognition image into defect areas and non-defect areas; Step 3: Collect the length of the edge curve of the defect area and calculate the edge curvature corresponding to each edge pixel point. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the shape of the defect area is characterized by the smoothness. The gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel through the local binary pattern to generate a coding number, and the coding number is converted into a texture feature coefficient after the base conversion. Step 4: Traverse the grayscale values ​​of all pixels inside the defect area, calculate the grayscale variance of the pixels inside the defect area, and synthesize the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance to generate the bearing defect index; Step 5: Compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects. Otherwise, the bearing has defects.

[0010] Furthermore, in step 1, a first recognition image of the inner surface of the bearing is obtained according to the method: In the bearing surface image, the image area with sparse pixel distribution is smoothed by applying a Gaussian kernel on the image. The radius of the Gaussian kernel is larger than the radius of the pixel in the surface image. When using Gaussian blur, the smoothness of the plane image is retained while removing noise. In the image area with dense pixel distribution, the edge-preserving filter is used to process the image area with dense pixel distribution, remove noise and adjust the smoothness. The density of the image area is judged based on the difference between the grayscale values ​​of the pixels in the horizontal and vertical directions. The formula is: ; ; ; in, Indicates the image at pixel points The gray gradient at Indicates the image Row, No. Grayscale value of column pixels, that is, grayscale value in the horizontal direction; Indicates the image Row, No. The grayscale value of the column pixel, that is, the grayscale value in the vertical direction, Represents the grayscale threshold.

[0011] Furthermore, in step 2, the edge strength of each edge pixel is calculated according to the following method: use The operator is applied to each pixel of the image, where the center of the operator is aligned with the current pixel, and then the corresponding elements are multiplied to obtain the new pixel grayscale value. The direction of each pixel is determined by calculating the edge direction, and the grayscale values ​​of adjacent pixels in the gradient direction are compared. If the pixel is not the local maximum in this direction, its grayscale value is set to 0 to suppress non-edges. The logic is: ; ; ; ; in, Represents the grayscale amplitude of the pixel in the horizontal direction after operator convolution. Represents the grayscale amplitude of the pixel in the vertical direction after operator convolution. is the gray value of the pixel in the horizontal direction, is the gray value of the pixel in the vertical direction, Indicates the edge strength of the pixel. Indicates the edge direction of the pixel. All are positive integers.

[0012] Furthermore, in step 2, the image is segmented into defect areas and non-defect areas according to the following method: A dual-threshold detection is established, that is, two gradient thresholds are established to distinguish strong edge pixels from weak edge pixels. The high gradient component threshold is used to mark strong edge pixels, and pixels exceeding this threshold are marked as strong edge pixels; the low gradient component threshold is used to mark weak edge pixels, and pixels below this threshold are marked as weak edge pixels; pixels between the two are marked as non-edge pixels. Starting from the strong edge pixels, the edge tracking technology is used to combine the adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, which is used as a dividing line to distinguish the defect area from the non-defect area, and the detected defect area is classified and identified. The logic is as follows: ; in, , Respectively represent the high gradient component threshold and the low gradient component threshold, , , They represent strong edge pixels, non-edge pixels, and weak edge pixels respectively.

[0013] Furthermore, in step 3, the length of the edge curve of the defect area is collected and the edge curvature corresponding to each edge pixel point is calculated. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the defect area shape characterized by the smoothness is specifically based on the logic that: ; ; in, Indicates that the length of the curve is calculated using a discrete set of points. represents the total number of discrete points on the edge curve, It is expressed as the minimum angle between three adjacent points. Represents the edge curve The horizontal coordinate of the point, Represents the edge curve The vertical coordinate of the point , Represents the coordinates of two adjacent points. Indicates The edge curvature of the edge pixels, represents the shape characteristic coefficient characterized by smoothness, Take a positive integer, 1, 2, 3 , Indicates the total number of pixels on the edge curve.

[0014] Furthermore, in step 3, a code number is generated by a local binary pattern, and the code number is converted into a texture feature coefficient, according to the method: The neighborhood is defined as the area formed by the cycloid with the central pixel as the center and the neighborhood radius as the cycloid. Eight neighborhood pixels are selected to compare with the gray value of the central pixel. If the neighborhood pixel value is greater than or equal to the gray value of the central pixel, the binary bit at the corresponding position is set to 1, otherwise it is set to 0. The obtained binary string is combined into a binary number in a clockwise direction. After decimal conversion, the texture feature coefficient of the defect area is characterized. The logic is as follows: ; in, Indicates The gray value of the neighboring pixels, The values ​​are 1-8. Represents the gray value of the center pixel, represents the texture feature coefficient, Indicates The judgment value of the grayscale size of the neighboring pixels is When The gray value of the neighboring pixel is greater than the gray value of the central pixel; When The gray value of the neighboring pixels is smaller than the gray value of the central pixel.

[0015] Furthermore, in step 4, the grayscale variance of the pixels inside the defective area is calculated, and the bearing defect index is comprehensively generated using the grayscale variance, defect feature coefficient and texture feature coefficient. The logic is as follows: ; ; ; in, Represents the mean value of the pixel grayscale points in the defect area, represents the variance of pixel grayscale in the defect area, Indicates the defect area The gray value of the pixel gray point, represents the bearing defect index, Indicates the total number of pixels in the defect area. Take a positive integer, 1, 2, 3 , Indicates the texture coefficient eigenvalue obtained after the binary number is converted to decimal.

[0016] Further, in step 5, the generated bearing defect index is compared with a threshold value, according to the method: The bearing defect threshold is established by analyzing the historical data of normal bearings and bearings known to have defects. If the defect index is less than the threshold, the bearing is considered to have no defects. If the defect index is greater than or equal to the threshold, it indicates that the bearing has defects and needs further inspection or replacement.

[0017] The present invention further provides a bearing defect detection system based on computer vision, wherein the detection system is used to execute the above-mentioned bearing defect detection method, comprising: A bearing image acquisition module, wherein the bearing image acquisition module is used to acquire a surface image of the side surface of the bearing to be evaluated, grayscale the acquired surface image and perform denoising to obtain a first identification image of the inner surface of the bearing, apply a gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal direction and the vertical direction of the first identification image, perform non-maximum suppression in two types of gradient directions, and obtain edge pixel points; An edge detection module, wherein the edge detection module calculates the edge strength of each edge pixel point, and sets up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combines adjacent strong edge pixels with weak edge pixels connected to them to form a continuous edge curve, and divides the first recognition image into defective areas and non-defective areas; An image feature extraction module, wherein the image feature extraction module collects the length of the edge curve of the defect area and calculates the edge curvature corresponding to each edge pixel point, evaluates the smoothness by calculating the average value of the curvature, and characterizes the shape feature coefficient of the shape of the defect area by the smoothness. By using a local binary pattern, the gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel to generate a coding number, and the coding number is converted into a texture feature coefficient after base conversion; A bearing defect assessment module, which is used to traverse the grayscale values ​​of all pixels in the defect area, calculate the grayscale variance of the pixels in the defect area, and comprehensively generate a bearing defect index by combining the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance; The bearing defect determination module is used to compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects, otherwise, the bearing has defects.

[0018] Compared with the prior art, the present invention has the following beneficial effects: The present invention can effectively detect the edge of the bearing surface and segment the image into defective areas and non-defective areas by calculating the gradient and suppressing non-maximum values ​​in two types of gradient directions, combined with dual threshold detection and edge connection. This precise edge detection helps to accurately locate defects in a complex bearing surface environment and avoids the misjudgment problem that may occur in a single threshold method. The present invention can also comprehensively generate a bearing defect index by calculating edge curvature, aspect ratio, texture feature coefficient and pixel grayscale variance. These features not only take into account the diversity of bearing shapes and surface features, but also take into account the grayscale changes and texture information of the image, thereby improving the comprehensive evaluation capability of bearing defects. This comprehensive feature analysis method can effectively reduce the impact of noise and uneven illumination on the detection results, and improve the accuracy and reliability of quality detection. The present invention can better process complex bearing surface images, accurately detect defects, and provide detailed evaluation indicators, which is helpful for quality control and fault diagnosis in the manufacturing industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the overall method flow of the present invention.

[0020] Figure 2 It is a schematic diagram of the system module flow of the present invention. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0022] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0023] Example: See also Figure 1 , a bearing defect detection method based on computer vision, the specific steps include: Step 1: Collect the surface image of the side of the bearing to be evaluated, grayscale the collected surface image and perform denoising to obtain the first recognition image of the inner surface of the bearing, apply the gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal and vertical directions of the first recognition image, perform non-maximum suppression in the two types of gradient directions, and obtain edge pixel points; Step 2: Calculate the edge strength of each edge pixel, and set up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combine adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, and segment the first recognition image into defect areas and non-defect areas; Step 3: Collect the length of the edge curve of the defect area and calculate the edge curvature corresponding to each edge pixel point. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the shape of the defect area is characterized by the smoothness. The gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel through the local binary pattern to generate a coding number, and the coding number is converted into a texture feature coefficient after the base conversion. Step 4: Traverse the grayscale values ​​of all pixels inside the defect area, calculate the grayscale variance of the pixels inside the defect area, and synthesize the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance to generate the bearing defect index; Step 5: Compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects. Otherwise, the bearing has defects.

[0024] It should be noted that the side surface of the bearing usually refers to the end surface of the outer ring of the bearing and the end surface of the inner ring of the bearing. If the side surface of the bearing is not flat, the alignment of the inner ring, outer ring and axial component cannot be ensured during installation, which may cause uneven force on the bearing, resulting in skewness and tilt. The uneven side surface of the bearing may cause uneven preload or clearance during installation, affecting the running accuracy of the bearing and causing early wear or jamming. Therefore, the flatness of the side surface of the bearing is very important. Maintaining the flatness of the bearing mounting surface and contact surface can not only extend the service life of the bearing, but also ensure the stability and safety of the equipment.

[0025] Therefore, it is necessary to obtain a first recognition image of the inner surface of the bearing, and the method is as follows: In the bearing surface image, the image area with sparse pixel distribution is smoothed by applying a Gaussian kernel on the image. The radius of the Gaussian kernel is larger than the radius of the pixel in the surface image. When using Gaussian blur, the smoothness of the plane image is retained while removing noise. In the image area with dense pixel distribution, the edge-preserving filter is used to process the image area with dense pixel distribution, remove noise and adjust the smoothness. The density of the image area is judged based on the difference between the grayscale values ​​of the pixels in the horizontal and vertical directions. The formula is: ; ; ; in, Indicates the image at pixel points The gray gradient at Indicates the image Row, No. Grayscale value of column pixels, that is, grayscale value in the horizontal direction; Indicates the image Row, No. The grayscale value of the column pixel, that is, the grayscale value in the vertical direction, Represents the grayscale threshold; in the above formula, , Respectively represent the absolute value of the grayscale difference between two adjacent pixels in the vertical direction and the horizontal direction. The larger the difference, the greater the pixel change in that direction, and the more obvious the details of the image in that direction.

[0026] It should be noted that if you want to intuitively and clearly detect the area where the grayscale changes most dramatically in the bearing image, you need to use a suitable gradient operator to calculate two types of directional gradients. This precise gradient calculation helps to accurately locate the edge lines of the bearing surface, thereby improving the accuracy of subsequent defect detection and segmentation. Non-maximum suppression is a commonly used technique for refining the detected edge lines. It ensures that only true edge pixels are retained and removes redundant responses in the gradient image. This prevents the edges from being over-enhanced or breaks on the detected edges, thereby ensuring the accuracy and continuity of the edge detection results.

[0027] Therefore, it is necessary to calculate the edge strength of each edge pixel, and the method is based on: use The operator is applied to each pixel of the image, where the center of the operator is aligned with the current pixel, and then the corresponding elements are multiplied to obtain the new pixel grayscale value. The direction of each pixel is determined by calculating the edge direction, and the grayscale values ​​of adjacent pixels in the gradient direction are compared. If the pixel is not the local maximum in this direction, its grayscale value is set to 0 to suppress non-edges. The logic is: ; ; ; ; in, Represents the grayscale amplitude of the pixel in the horizontal direction after operator convolution. Represents the grayscale amplitude of the pixel in the vertical direction after operator convolution. is the gray value of the pixel in the horizontal direction, is the gray value of the pixel in the vertical direction, Indicates the edge strength of the pixel. Indicates the edge direction of the pixel. All are positive integers; It should be noted that dual threshold detection converts the gradient image into two categories: strong edge pixels and weak edge pixels, which is a key step in edge connection. Strong edge pixels usually represent higher grayscale changes, while weak edge pixels represent lower grayscale changes but may be part of the real edge. In this way, it is possible to better distinguish between actual defects and noise or subtle changes on the bearing surface.

[0028] Therefore, it is necessary to segment the image into defect areas and non-defect areas, based on the following method: A dual-threshold detection is established, that is, two gradient thresholds are established to distinguish strong edge pixels from weak edge pixels. The high gradient component threshold is used to mark strong edge pixels, and pixels exceeding this threshold are marked as strong edge pixels; the low gradient component threshold is used to mark weak edge pixels, and pixels below this threshold are marked as weak edge pixels; pixels between the two are marked as non-edge pixels. Starting from the strong edge pixels, the edge tracking technology is used to combine the adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, which is used as a dividing line to distinguish the defect area from the non-defect area, and the detected defect area is classified and identified. The logic is as follows: ; in, , Respectively represent the high gradient component threshold and the low gradient component threshold, , , They represent strong edge pixels, non-edge pixels, and weak edge pixels respectively.

[0029] It should be noted that the edge curve length and smoothness reflect the shape complexity and curve complexity of the defect area. By accurately measuring the length of the edge curve, the size of the defect and the complexity of the shape can be evaluated. Smoothness characterizes the smoothness of the edge curve, which is particularly important for surface defect detection of precision parts such as bearings. Smooth edges usually reflect a healthier surface state.

[0030] Therefore, it is necessary to collect the length of the edge curve of the defect area and calculate the edge curvature of each edge pixel point. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the defect area shape characterized by smoothness is specifically based on the following logic: ; ; in, Indicates that the length of the curve is calculated using a discrete set of points. represents the total number of discrete points on the edge curve, It is expressed as the minimum angle between three adjacent points. Represents the edge curve The horizontal coordinate of the point, Represents the edge curve The vertical coordinate of the point , Represents the coordinates of two adjacent points. Indicates The edge curvature of the edge pixels, It means that the smoothness is used to characterize the shape characteristic coefficient. Take a positive integer, 1, 2, 3 , Indicates the total number of pixels on the edge curve.

[0031] It should be noted that the texture features of the defect area reflect the subtle structure and appearance characteristics of the surface, which are very helpful for distinguishing different defect types and assessing their severity, especially in complex industrial environments where there may be a variety of surface defects. In the automated defect detection system, the texture feature coefficient can be used as an important basis for defect classification.

[0032] Therefore, it is necessary to generate a code number through a local binary pattern, and convert the code number into a texture feature coefficient after base conversion. The method is as follows: The neighborhood is defined as the area formed by the cycloid with the central pixel as the center and the neighborhood radius as the cycloid. Eight neighborhood pixels are selected to compare with the gray value of the central pixel. If the gray value of the neighborhood pixel is greater than or equal to the gray value of the central pixel, the binary bit at the corresponding position is set to 1, otherwise it is set to 0. The obtained binary string is combined into a binary number in a clockwise direction. After decimal conversion, it represents the texture feature coefficient of the defect area. The logic is as follows: ; in, Indicates The gray value of the neighboring pixels, The values ​​are 1-8. Represents the gray value of the center pixel, represents the texture feature coefficient, Indicates The judgment value of the grayscale size of the neighboring pixels is When The gray value of the neighboring pixel is greater than the gray value of the central pixel; When The grayscale value of the neighboring pixels is less than the grayscale value of the central pixel; in the above logic, a binary number is formed through binarization processing. If the binary number contains more 1s, the texture of the area is rougher and the texture feature coefficient is larger; if the binary number contains more 0s, the texture of the area is smoother and the texture feature coefficient is smaller.

[0033] It should be noted that the comprehensive use of shape feature coefficients, texture feature coefficients and pixel grayscale variance can comprehensively describe and analyze the defects on the bearing surface. The shape feature coefficient can tell the geometric shape and size characteristics of the defect, the texture feature coefficient reflects the surface texture and structural characteristics of the defect area, and the pixel grayscale variance describes the severity of the grayscale change in the image. Considering these characteristics, the nature and severity of the defects can be more comprehensively understood and analyzed.

[0034] Therefore, it is necessary to calculate the grayscale variance of the pixels inside the defect area, and use the grayscale variance, defect feature coefficient and texture feature coefficient to comprehensively generate the bearing defect index. The logic is as follows: ; ; ; in, Represents the mean value of the pixel grayscale points in the defect area, represents the variance of pixel grayscale in the defect area, Indicates The gray value of the pixel gray point, represents the bearing defect index, Indicates the total number of pixels in the defect area. Take a positive integer, 1, 2, 3 , Indicates the texture coefficient eigenvalue obtained after the binary number is converted to decimal.

[0035] It should be noted that by comparing the bearing defect index with the set threshold, the equipment status can be better monitored, the maintenance strategy can be optimized, downtime and maintenance costs can be reduced, and the safety and reliability of the equipment can be improved, making the equipment operation more predictable and reducing the potential risks caused by bearing failures.

[0036] Therefore, the generated bearing defect index needs to be compared with a threshold value, based on the following method: The bearing defect threshold is established by analyzing the historical data of normal bearings and bearings known to have defects. If the defect index is less than the threshold, the bearing is considered to have no defects. If the defect index is greater than or equal to the threshold, it indicates that the bearing has defects and needs further inspection or replacement.

[0037] See also Figure 2 The present invention also provides a bearing defect detection system based on computer vision, the detection system is used to perform the above-mentioned bearing defect detection method, including: A bearing image acquisition module, wherein the bearing image acquisition module is used to acquire a surface image of the side surface of the bearing to be evaluated, grayscale the acquired surface image and perform denoising to obtain a first identification image of the inner surface of the bearing, apply a gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal direction and the vertical direction of the first identification image, perform non-maximum suppression in two types of gradient directions, and obtain edge pixel points; An edge detection module, wherein the edge detection module calculates the edge strength of each edge pixel point, and sets up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combines adjacent strong edge pixels with weak edge pixels connected to them to form a continuous edge curve, and divides the first recognition image into defective areas and non-defective areas; An image feature extraction module, wherein the image feature extraction module collects the length of the edge curve of the defect area and calculates the edge curvature corresponding to each edge pixel point, evaluates the smoothness by calculating the average value of the curvature, and characterizes the shape feature coefficient of the shape of the defect area by the smoothness. By using a local binary pattern, the gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel to generate a coding number, and the coding number is converted into a texture feature coefficient after base conversion; A bearing defect assessment module, which is used to traverse the grayscale values ​​of all pixels in the defect area, calculate the grayscale variance of the pixels in the defect area, and comprehensively generate a bearing defect index by combining the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance; The bearing defect determination module is used to compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects, otherwise, the bearing has defects.

[0038] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0039] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.

[0040] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0041] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A bearing defect detection method based on computer vision, characterized in that: The specific steps include: Step 1: Collect the surface image of the side of the bearing to be evaluated, grayscale the collected surface image and perform denoising to obtain the first recognition image of the inner surface of the bearing, apply the gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal and vertical directions of the first recognition image, perform non-maximum suppression in the two types of gradient directions, and obtain edge pixel points; Step 2: Calculate the edge strength of each edge pixel, and set up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combine adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, and segment the first recognition image into defect areas and non-defect areas; Step 3: Collect the length of the edge curve of the defect area and calculate the edge curvature corresponding to each edge pixel point. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the shape of the defect area is characterized by the smoothness. The gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel through the local binary pattern to generate a coding number, and the coding number is converted into a texture feature coefficient after the base conversion. Step 4: Traverse the grayscale values ​​of all pixels inside the defect area, calculate the grayscale variance of the pixels inside the defect area, and synthesize the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance to generate the bearing defect index; Step 5: Compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects. Otherwise, the bearing has defects.

2. A bearing defect detection method based on computer vision according to claim 1, characterized in that: The first recognition image of the inner surface of the bearing is obtained according to the method: In the bearing surface image, the image area with sparse pixel distribution is smoothed by applying a Gaussian kernel on the image. The radius of the Gaussian kernel is larger than the radius of the pixel in the surface image. When using Gaussian blur, the smoothness of the plane image is retained while removing noise. In the image area with dense pixel distribution, the edge-preserving filter is used to process the image area with dense pixel distribution, remove noise and adjust the smoothness. The density of the image area is judged based on the difference between the grayscale values ​​of the pixels in the horizontal and vertical directions. The formula is: ; ; ; in, Indicates the image at pixel points The gray gradient at Indicates the image Row, No. Grayscale value of column pixels, that is, grayscale value in the horizontal direction; Indicates the image Row, No. The grayscale value of the column pixel, that is, the grayscale value in the vertical direction, Represents the grayscale threshold.

3. The method for bearing defect detection based on computer vision according to claim 1, characterized in that: The edge strength of each edge pixel is calculated based on the following method: use The operator is applied to each pixel of the image, where the center of the operator is aligned with the current pixel, and then the corresponding elements are multiplied to obtain the new pixel grayscale value. The direction of each pixel is determined by calculating the edge direction, and the grayscale values ​​of adjacent pixels in the gradient direction are compared. If the pixel is not the local maximum in this direction, its grayscale value is set to 0 to suppress non-edges. The logic is: ; ; ; ; in, Represents the grayscale amplitude of the pixel in the horizontal direction after operator convolution. Represents the grayscale amplitude of the pixel in the vertical direction after operator convolution. is the gray value of the pixel in the horizontal direction, is the gray value of the pixel in the vertical direction, Indicates the edge strength of the pixel. Indicates the edge direction of the pixel. All are positive integers.

4. A bearing defect detection method based on computer vision according to claim 3, characterized in that: The image is segmented into defective and non-defective areas based on the following method: A dual-threshold detection is established, that is, two gradient thresholds are established to distinguish strong edge pixels from weak edge pixels. The high gradient component threshold is used to mark strong edge pixels, and pixels exceeding this threshold are marked as strong edge pixels; the low gradient component threshold is used to mark weak edge pixels, and pixels below this threshold are marked as weak edge pixels; pixels between the two are marked as non-edge pixels. Starting from the strong edge pixels, the edge tracking technology is used to combine the adjacent strong edge pixels with the weak edge pixels connected to them to form a continuous edge curve, which is used as a dividing line to distinguish the defect area from the non-defect area, and the detected defect area is classified and identified. The logic is as follows: ; in, , Respectively represent the high gradient component threshold and the low gradient component threshold, , , They represent strong edge pixels, non-edge pixels, and weak edge pixels respectively.

5. The method for bearing defect detection based on computer vision according to claim 1, characterized in that: The length of the edge curve of the defect area is collected and the edge curvature corresponding to each edge pixel is calculated. The smoothness is evaluated by calculating the average value of the curvature. The shape characteristic coefficient of the defect area shape characterized by smoothness is specifically based on the following logic: ; ; in, Indicates that the length of the curve is calculated using a discrete set of points. represents the total number of discrete points on the edge curve, It is expressed as the minimum angle between three adjacent points. Represents the edge curve The horizontal coordinate of the point, Represents the edge curve The vertical coordinate of the point , Represents the coordinates of two adjacent points. Indicates The edge curvature of the edge pixels, represents the shape characteristic coefficient characterized by smoothness, Take a positive integer, 1, 2, 3 , Indicates the total number of pixels on the edge curve.

6. A bearing defect detection method based on computer vision according to claim 5, characterized in that: The coding number is generated through the local binary pattern, and the coding number is converted into a texture feature coefficient. The method is based on: The neighborhood is defined as the area formed by the cycloid with the central pixel as the center and the neighborhood radius as the cycloid. Eight neighborhood pixels are selected to compare with the gray value of the central pixel. If the neighborhood pixel value is greater than or equal to the gray value of the central pixel, the binary bit at the corresponding position is set to 1, otherwise it is set to 0. The obtained binary string is combined into a binary number in a clockwise direction. After decimal conversion, the texture feature coefficient of the defect area is characterized. The logic is as follows: ; in, Indicates The gray value of the neighboring pixels, The values ​​are 1-8. Represents the gray value of the center pixel, represents the texture feature coefficient, Indicates The judgment value of the grayscale size of the neighboring pixels is When The gray value of the neighboring pixel is greater than the gray value of the central pixel; When , it means the neighborhood The gray value of each pixel is smaller than the gray value of the center pixel.

7. The method for bearing defect detection based on computer vision according to claim 5, characterized in that: The grayscale variance of the pixels inside the defect area is calculated, and the bearing defect index is generated by using the grayscale variance, defect feature coefficient and texture feature coefficient. The logic is as follows: ; ; ; in, Represents the mean value of the pixel grayscale points in the defect area, represents the variance of pixel grayscale in the defect area, Indicates the defect area The gray value of the pixel gray point, represents the bearing defect index, Indicates the total number of pixels in the defect area. Take a positive integer, 1, 2, 3 , Indicates the texture coefficient eigenvalue obtained after the binary number is converted to decimal.

8. The method for detecting bearing defects based on computer vision according to claim 1, characterized in that: The resulting bearing defect index is compared to a threshold value based on the following method: The bearing defect threshold is established by analyzing the historical data of normal bearings and bearings known to have defects. If the defect index is less than the threshold, the bearing is considered to have no defects. If the defect index is greater than or equal to the threshold, it indicates that the bearing has defects and needs further inspection or replacement.

9. A bearing defect detection system based on computer vision, the detection system being used to execute the bearing defect detection method according to any one of claims 1 to 8, comprising: A bearing image acquisition module, wherein the bearing image acquisition module is used to acquire a surface image of the side surface of the bearing to be evaluated, grayscale the acquired surface image and perform denoising to obtain a first identification image of the inner surface of the bearing, apply a gradient operator to calculate the gradient component amplitude of the grayscale value in the horizontal direction and the vertical direction of the first identification image, perform non-maximum suppression in two types of gradient directions, and obtain edge pixel points; An edge detection module, wherein the edge detection module calculates the edge strength of each edge pixel point, and sets up a double threshold detection to differentiate strong edge pixels and weak edge pixels, combines adjacent strong edge pixels with weak edge pixels connected to them to form a continuous edge curve, and divides the first recognition image into defective areas and non-defective areas; An image feature extraction module, wherein the image feature extraction module collects the length of the edge curve of the defect area and calculates the edge curvature corresponding to each edge pixel point, evaluates the smoothness by calculating the average value of the curvature, and characterizes the shape feature coefficient of the shape of the defect area by the smoothness. By using a local binary pattern, the gray value of the central pixel in the defect area is compared with the gray value of each neighboring pixel to generate a coding number, and the coding number is converted into a texture feature coefficient after base conversion; A bearing defect assessment module, which is used to traverse the grayscale values ​​of all pixels in the defect area, calculate the grayscale variance of the pixels in the defect area, and comprehensively generate a bearing defect index by combining the obtained shape feature coefficient, texture feature coefficient and pixel grayscale variance; The bearing defect determination module is used to compare the generated bearing defect index with the bearing defect threshold. If the bearing defect index is less than the threshold, it indicates that the bearing has no defects, otherwise, the bearing has defects.

Citation Information

Patent Citations

  • Machine vision detection device and method for steel rail surface discrete defects

    CN107618533A

  • Food packaging defect sample generation method based on custom algorithm

    CN114820556A

  • Axle defect detection method based on image processing

    CN114998356A

  • Visual inspection method for defects of three-axis turntable

    CN118196094A

  • Method of visualizing defect using design data and defect detection method

    US20190026881A1

Cited By

  • Defect detection method and device based on panoramic image of inner wall of drainage pipeline

    CN119205776A

  • Wind power bearing ring wear detection method

    CN119478566A

  • Cable production detection method and system based on machine vision

    CN119516254A

  • A comprehensive evaluation method and system for welding quality

    CN119672025B

  • Real-time data acquisition method and system

    CN119722446A