Image distortion correction method for bearing bush surface defect detection
By correcting the bearing image distortion, the problem of insufficient detection accuracy caused by perspective distortion is solved, and the accurate identification and quantification of bearing defects is achieved, and the accuracy and reliability of detection is improved.
Patent Information
- Application Number
- CN202510317747.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-04
AI Technical Summary
The existing bearing surface defect detection methods fail to effectively correct perspective distortion, resulting in distortion of position and shape of defect areas and insufficient detection accuracy of length and area, affecting the accuracy and reliability of detection.
By measuring the bearing size information, the bearing image is taken, the image is preprocessed, the main body and defect area are divided, coordinate mapping is performed, the image defect area coordinates are mapped to the rectangular plane expansion diagram, and the area or length of the defect area is calculated.
It improves the accuracy and reliability of bearing defect detection, reduces detection errors, and ensures accurate identification and quantification of surface defect characteristics.
Smart Images

Figure CN120259146A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing bush detection, and particularly to an image distortion correction method for detecting surface defects of a bearing bush. Background Art
[0002] The bearing bush is an important component of engines, compressors, high-precision machine tools and other high-precision mechanical systems, mainly used to support the rotating shaft and bear the radial load. Its main function is to reduce the friction between the shaft and the bearing bush by providing a lubricating oil film, prevent direct contact and wear, thereby ensuring the smooth operation of the mechanical system. In extreme working environments such as high temperature and high pressure, its reliability and performance are crucial for the safety and efficiency of the equipment. As the bearing bush degenerates during operation, surface defects such as wear, cracks, and scratches will appear. These defects will cause the bearing capacity of the bearing bush to decrease, the friction coefficient to increase, and even lead to equipment failures. This will seriously affect the efficiency, reliability and safety of the equipment. Therefore, monitoring and evaluating the degradation state of the bearing bush surface is of great significance for extending the equipment life, reducing the fault downtime and improving the operation efficiency.
[0003] In order to achieve effective monitoring of the bearing bush, surface defect detection technology has emerged. Image analysis technology, as a non-contact, efficient and accurate surface defect detection method, can automatically detect and evaluate various defects that appear during the degradation process of the bearing bush surface, such as wear, scratches, cracks, depressions, etc., and provide support for analyzing and identifying the degradation mechanism and state of the bearing bush. This provides timely information and decision-making basis for maintenance personnel, helps predict and prevent potential failures, and thus improves production efficiency and reduces maintenance costs.
[0004] With the development of computer vision and artificial intelligence technologies, the application of model-based algorithms in surface defect detection has gradually matured. However, the semi-cylindrical three-dimensional structure of the bearing shell can cause perspective distortion in the image during the shooting process, resulting in the distortion of surface features in the image, affecting the accurate measurement of the position, area, etc. of the defect area and the accurate recognition of subsequent features. Existing image-based defect detection methods, although able to process and analyze the captured images, most methods do not fully consider the special three-dimensional structure of the bearing shell and do not correct the perspective distortion in the image, resulting in the accuracy and reliability of defect detection being affected. For example, CN118711000A proposes a bearing surface defect detection method based on improved YOLOv10, and CN118982733A proposes an image-based axial surface defect detection model. However, the above image-based patents directly process and analyze the captured photos, without considering the image perspective distortion caused by the semi-cylindrical three-dimensional structure of the bearing or bearing shell, and do not correct the results of the plane defect detection model. Some patents such as CN119152012A only correct the optical distortion of the camera lens (such as barrel distortion, pincushion distortion) to eliminate the inherent geometric distortion of the lens. Similarly, the image perspective distortion caused by the semi-cylindrical three-dimensional structure of the bearing shell is not corrected.
[0005] To solve this problem, the present invention proposes an image distortion correction method for bearing shell surface defect detection, aiming to overcome the deficiencies of the prior art, accurately correct the perspective distortion, and thus improve the accuracy and reliability of defect detection. Summary of the Invention
[0006] The purpose of the present invention is to provide an image distortion correction method for bearing shell surface defect detection to solve the problems raised in the above background technology.
[0007] To achieve the above purpose, the present invention provides the following technical solution: An image distortion correction method for bearing shell surface defect detection, and the specific steps of the image distortion correction method for bearing shell surface defect detection are as follows:
[0008] Step 1: Measure the dimensional information of the bearing shell to be measured, including the inner diameter and the axial width;
[0009] Step 2: Shoot directly at the bearing surface of the bearing shell to obtain the target bearing shell image, and the image should include the complete bearing surface;
[0010] Step 3: Perform image preprocessing on the obtained bearing shell image;
[0011] Step 4: Segment and obtain the main bearing shell area in the image;
[0012] Step 5: Obtain the pixel scale in the image according to the axial width of the bearing shell;
[0013] Step 6: Segment and obtain the defective area in the image;
[0014] Step 7: Perform coordinate mapping to map the coordinates of the defective area in the image to the coordinates in the developed view of the rectangular plane on the bearing shell surface;
[0015] Step 8: Calculate the area or length of the defective area mapped to the developed view according to the image pixel ratio.
[0016] Preferably, in step 2, the image should be taken facing the bearing shell directly, and the two side edges of the bearing shell in the bearing shell image should be in the vertical direction.
[0017] Preferably, in step 3, the image preprocessing includes histogram equalization and grayscale conversion.
[0018] Preferably, in step 4, the segmentation of the bearing shell main area needs to be accurate, and the bearing shell main area is extracted by the threshold segmentation method or the instance segmentation model.
[0019] Preferably, in step 5, since the side edges of the bearing shell are in the vertical direction in step 2, based on the bearing shell main area in step 4, calculate the number of pixel points in the vertical direction of the area, and take the maximum number of pixels Num max corresponding to the axial width value of the bearing shell, and obtain the pixel scale according to the measurement result in step 1.
[0020] Preferably, in step 6, based on the instance segmentation model, identify and segment the defective area in the bearing shell image.
[0021] Preferably, in step 7, through coordinate mapping, map the coordinates of the pixel points in the image taken from the front of the bearing shell to the coordinates of this point on the developed view of the rectangular plane on the inner surface of the bearing shell. In actual situations, since the bearing shell has an elastic tensor and is not a strictly semi-cylindrical shape, for the convenience of calculation and simplification of the steps, the bearing shell is regarded as an ideal semi-cylindrical shape.
[0022] Compared with the prior art, the beneficial effects of the present invention are:
[0023] This application solves the problems of distortion of the position and shape of the defective area on the bearing shell surface caused by perspective distortion and insufficient detection accuracy such as length and area in the existing image-based defect detection method. This method effectively corrects the perspective distortion of the three-dimensional structure of the bearing shell surface to ensure the accurate recognition and quantification of surface defect features, thereby improving the accuracy and reliability of bearing shell defect detection. Description of the Drawings
[0024] Figure 1 It is a schematic diagram of the image correction coordinate mapping method of the present invention;
[0025] Figure 2 It is a flowchart of the steps of this method.
[0026] Figure 1 Among them: (a) is a schematic diagram of imaging; (b) is the front view and top view of the bearing bush; (c) is the image of the bearing bush taken; (d) is the mapped unfolded image. Specific implementation manners
[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0028] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention.
[0029] Please refer to Figure 1-2 , the present invention provides a technical solution:
[0030] An image distortion correction method for detecting surface defects of a bearing bush. The specific steps of the image distortion correction method for detecting surface defects of a bearing bush are as follows:
[0031] Step 1: Measure the dimensional information of the bearing bush to be measured, including the inner diameter and the axial width;
[0032] Step 2: Take a photo directly facing the bearing surface of the bearing bush to obtain an image of the target bearing bush, and the image should include the complete bearing surface;
[0033] Step 3: Perform image preprocessing on the obtained bearing bush image;
[0034] Step 4: Segment and obtain the main body area of the bearing bush in the image;
[0035] Step 5: Obtain the pixel scale in the image according to the axial width of the bearing bush;
[0036] Step 6: Segment and obtain the defect area in the image;
[0037] Step 7: Perform coordinate mapping to map the coordinates of the defect area in the image to the coordinates in the rectangular plane unfolded diagram of the bearing bush surface;
[0038] Step 8: Calculate the area or length of the defect area mapped to the plane unfolded diagram according to the pixel ratio of the image.
[0039] In the second step, the image should be taken directly facing the bearing bush, and the two side edges of the bearing bush in the bearing bush image should be in the vertical direction.
[0040] In the third step, the image preprocessing includes histogram equalization and grayscale conversion.
[0041] In the fourth step, the segmentation of the bearing bush main area needs to be accurate, and the bearing bush main area is extracted by the threshold segmentation method or the instance segmentation model.
[0042] In the fifth step, since the side edges of the bearing bush are in the vertical direction in the second step, based on the bearing bush main area in the fourth step, calculate the number of pixel points in the vertical direction of the area, and take the maximum number of pixels Num at both side edges max which corresponds to the axial width value of the bearing bush, and obtain the pixel scale according to the measurement result in the first step.
[0043] In the sixth step, based on the instance segmentation model, identify and segment the defect area in the bearing bush image.
[0044] In the seventh step, map the coordinates of the pixel points in the image taken from the front of the bearing bush to the coordinates of this point on the rectangular plane development diagram of the inner surface of the bearing bush. In actual situations, there is an elastic tensor in the bearing bush, which is not a strictly semi-cylindrical shape. For the convenience of calculation and to simplify the steps, the bearing bush is regarded as an ideal semi-cylindrical shape.
[0045] The present invention stretches and unfolds the image of the bearing bush into a rectangular plane development diagram of the inner surface of the bearing bush to eliminate the distortion of the defect area caused by perspective distortion as much as possible. Hereinafter, the axial direction is referred to as the vertical direction, and the direction along the arc edge of the bearing bush is referred to as the horizontal direction.
[0046] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the image correction coordinate mapping method of the present invention, where ABCDEF are six points on the bearing bush, A'B'C'D'E'F' are the points after the coordinate transformation of the six points through the plane development, the gray area in (c) is the defect area of the bearing bush, point D is an arbitrarily selected point in the defect area of the bearing bush, point C is located in the vertical direction of point D, point A is located at the widest part of the axial width of the bearing bush in the photo, that is, the closest end of the bearing bush to the camera lens, point B is located at the narrowest part of the axial width of the bearing bush in the photo, that is, the farthest end of the bearing bush from the camera lens, ABC are located on the upper edge of the bearing bush, and EF and E'F' are the schematic points before and after the coordinate change of the defect area plane development.
[0047] (a) is a schematic diagram of the imaging of two points AB on the edge of the bearing bush, where h is the axial width of the bearing bush, AB is the axial section at points AB, D A D B is the object distance, V A V B is the image distance, h A h Bis the image height;
[0048] (b) is the front view and top view of the bearing bush, as well as the position and geometric relationship of three points A, B, and C on the bearing bush. Among them, r is the radius of the bearing bush, θ is the radian of, L AC is the distance difference between point A and point C from the lens;
[0049] (c) is the image of the bearing bush. Among them, h A h B h C is the axial width of the corresponding horizontal position points in the bearing bush image, which can also be understood as the image height in (a). L D is the distance between C and D;
[0050] (d) is the mapped unfolded image and the mapped coordinate positions of each point. After mapping, the coordinate origin is point B’, and A’B’ is the x-axis.
[0051] Observing (c) and (d), the coordinate mapping of the present invention stretches the axial width in the vertical direction of the bearing bush image to the maximum axial width in the vertical direction, and transforms the x coordinate of a certain horizontal position point D on the bearing bush image into the arc length of arc BC. The specific calculation method of the coordinate mapping is as follows:
[0052] According to the Gaussian imaging formula, there is:
[0053]
[0054] Among them, f is the focal length of the camera lens, u is the object distance, and v is the image distance.
[0055] For three points A, B, and C on the bearing bush, there is:
[0056]
[0057] D B ―D A =r#(8)
[0058] D C ―D A =L AC #(9)
[0059]
[0060] =rθ#(11)
[0061] From (2), (3), (5), and (6), there is:
[0062]
[0063] The test image is captured using the lens of a smartphone. To adapt to the thin and compact body structure of the mobile phone, the equivalent focal length of its lens group is usually in the order of millimeters, and it can be considered that the object distance >> focal length. Therefore, it is approximated as:
[0064]
[0065] Similarly:
[0066]
[0067] From (8)(9)(13)(14), we have:
[0068]
[0069] From (10)(11)(15), we have:
[0070]
[0071] The coordinates after mapping take point B' as the origin of coordinates and A'B' as the x-axis. If point D is located on the right side of point B, it is denoted as B Right , and the changed coordinate x takes the arc length of BC Conversely, if point D is located on the left side of point B, it is denoted as B Left , and the changed coordinate x takes The transformed coordinate x is as follows:
[0072]
[0073] The transformed coordinate y is as follows:
[0074]
[0075] Example 1:
[0076] The specific steps of the image distortion correction method for detecting surface defects of bearing bushes are as follows:
[0077] Step 1: Measure the dimensional information of the bearing bush to be tested, including the inner diameter and the axial width, and measure the true values of the defect areas;
[0078] It is difficult to directly measure the true value of the area or length of the defect area on the surface of the bearing bush. To accurately measure the true value of the defect area for subsequent verification, the true value of the defect area can be measured using the following method: Clamp a thin piece of paper with carbon paper and closely attach it to the surface of the bearing bush to obtain the contour of the defect area on the surface of the bearing bush by rubbing; or evenly apply a staining agent on the surface of the bearing bush and then closely attach a piece of paper to the surface of the bearing bush to color the defect area. This method can accurately measure the true value of the defect area for subsequent verification. The specific measurement process includes:
[0079] (1) Take images of the unfolded drawing of the paper with stamping (or dyeing) defect areas and the scale bar facing each other simultaneously.
[0080] (2) Obtain the pixel scale in the image according to the scale bar.
[0081] (3) Segment and extract the defect areas in the unfolded drawing.
[0082] (4) Calculate the area or length of the defect areas.
[0083] The calculation method of the area or length of the area is as follows: For area calculation, calculate the total number of pixels contained in the area, and the area is equal to the total number of pixels multiplied by the square of the pixel scale; for length calculation, if the line segment is approximately a straight line, the Hough Transform can be used to detect the straight line and calculate its length. For non-straight slender strip-shaped areas, use the cv2.ximgproc.thinning() skeletonization operation in the python openCV library to thin the area in the image into a 1-pixel-wide line and calculate the line length. The calculation result of the skeletonization operation will be slightly shorter than the actual length. To correct and compensate the result, for the endpoints of the skeletonized line, use the cv2.distanceTransform() function to calculate the distances from the start and end points of the skeletonized line to the outer edge of the defect area respectively, and compensate the local widths at both ends of the skeleton to the length of the skeletonized line:
[0084] L correct =L skeleton +width start +width end #(19)
[0085] Step 2: Point the camera at the bearing surface of the bearing shell to obtain the target bearing shell image, and the image should include the complete bearing surface.
[0086] Since subsequent coordinate mapping requires the calculation based on the main body information of the bearing shell and the imaging principle, the image needs to include the complete bearing surface, and the boundary of the bearing surface should be as clear as possible. For the convenience of subsequent segmentation of the bearing shell contour area, a solid-color and clean background should be selected as much as possible for shooting, the shooting light should be uniform and soft to avoid direct reflection on the bearing shell surface; for the convenience of subsequent coordinate mapping calculation and processing, the image should be taken facing the bearing shell directly, and the two sides of the bearing shell in the bearing shell image should be in the vertical direction.
[0087] Step 3: Perform image preprocessing on the obtained bearing shell image.
[0088] The image preprocessing includes histogram equalization and grayscale conversion. Among them, histogram equalization is to eliminate the influence of uneven illumination and facilitate subsequent image segmentation.
[0089] Step 4: Segment and obtain the main body area of the bearing shell in the image.
[0090] The division of the main area of the split bearing bush should be as accurate as possible, and the outer contour of the bearing bush is obtained through threshold segmentation; if there is noise in the shooting background, making it difficult to accurately divide the main area of the bearing bush, an instance segmentation model can be trained or the Segment Anything Model can be used to assist in extracting the main area of the bearing bush.
[0091] Step Five: Obtain the pixel scale in the image according to the maximum axial width of the bearing bush;
[0092] Here, the two side edges of the bearing bush closest to the shooting camera are used as the scale ruler. First, observe whether the main body segmentation result of the bearing bush in Step Four is accurate. Based on the segmented main area of the bearing bush, calculate the number of pixel points in the vertical direction corresponding to each horizontal coordinate in the area, that is, the axial width at each horizontal position of the bearing bush image. Take the maximum number of pixels on both sides as the axial width value of the bearing bush, and obtain the pixel scale according to the measurement result in Step One, for example, 0.1mm / Pixel.
[0093] Step Six: Segment and obtain the defect area in the image, and calculate the original value of the area or length of the defect area according to the pixel ratio;
[0094] The defect area in the bearing bush image is obtained through a pre-trained instance segmentation model, and the original value of the length or area of the defect area is measured according to the length and area measurement method in Step One and the pixel scale in Step Five.
[0095] Step Seven: Perform coordinate mapping, map the coordinates of the defect area in the image to the coordinates of the plane development drawing, and calculate the area or length of the mapped area;
[0096] To reduce the calculation amount, only the points on the contour of the defect area segmented in Step Six are subjected to coordinate mapping. The bearing bush is regarded as an ideal semi-cylindrical shape. Through the coordinate mapping method, the points on the contour of the defect area in the bearing bush image are mapped to the inner surface development plan of the bearing bush. The polygon area polygon enclosed by the mapped contour points is obtained through the Polygon function in shapely.geometry in python. Calculate the area of the mapped area according to polygon.area, or calculate the length and area according to the method in Step One. Obtain the true value of the area or length of the defect area according to the pixel scale measured in Step Five.
[0097] Step Eight: Compare the correction value, the original value, and the true value.
[0098] The comparison results are shown in the following table. It can be found that the error between the original value of the area directly measured based on the image and the true value is approximately 36.75% after calculation, while the error between the correction value obtained by the perspective distortion correction method for the bearing bush curved surface image provided by the present invention and the true value is only approximately 2.56%.
[0099] The main reasons why the error still exists after correction are as follows:
[0100] 1. The bearing is not an ideal semi-cylindrical shape, and there are errors in the approximate processing;
[0101] 2. There are errors in the image segmentation area of the bearing body and defect area;
[0102] 3. The highest accuracy of the bearing body and defective area in the image is 1 pixel, which is a discrete value rather than an accurate continuous value. The above reasons lead to accuracy errors in the coordinate mapping calculation process.
[0103] Sample 1 Sample 2 Sample 3 <![CDATA[True area value (cm 2 )]]> 5.15 6.43 4.70 <![CDATA[Area before correction (cm 2 )]]> 3.24 4.01 3.03 <![CDATA[Corrected area (cm 2 )]]> 4.96 6.20 4.72 Error before calibration (%) 37.09 37.64 35.53 Error after calibration (%) 3.69 3.58 0.42
[0104] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention; therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is limited by the attached claims rather than the above description. Therefore, it is intended to include all changes within the meaning and scope of the equivalent elements of the claims in the present invention, and any figure marks in the claims should not be regarded as limiting the claims involved.
[0105] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An image distortion correction method for detecting surface defects of a bearing shell, characterized in that, The specific steps of the image distortion correction method for detecting surface defects of the bearing shell are as follows: Step 1: Measure the dimensional information of the bearing shell to be measured, including the inner diameter and the axial width; Step 2: Take a photo directly facing the bearing surface to obtain an image of the target bearing shell, and the image should include the complete bearing surface; Step 3: Perform image preprocessing on the obtained bearing shell image; Step 4: Segment and obtain the main body area of the bearing shell in the image; Step 5: Obtain the pixel scale in the image according to the axial width of the bearing shell; Step 6: Segment and obtain the defect area in the image; Step 7: Perform coordinate mapping to map the coordinates of the defect area in the image to the coordinates in the rectangular plane expansion diagram of the bearing shell surface; Step 8: Calculate the area or length of the defect area mapped to the plane expansion diagram according to the image pixel ratio.
2. The image distortion correction method for detecting surface defects of a bearing shell according to claim 1, characterized in that: In the second step, the image should be taken directly facing the bearing shell, and the two sides of the bearing shell in the bearing shell image should be in the vertical direction.
3. An image distortion correction method for detecting surface defects of a bearing bush according to claim 1, characterized in that: In the third step, the image preprocessing includes histogram equalization and grayscale conversion.
4. An image distortion correction method for detecting surface defects of a bearing shell according to claim 1, characterized in that: In the fourth step, the segmentation of the main body area of the bearing shell needs to be accurate, and the main body area of the bearing shell is extracted by the threshold segmentation method or the instance segmentation model.
5. An image distortion correction method for detecting surface defects of a bearing shell according to claim 1, characterized in that: In the fifth step, since the sides of the bearing bush in the second step are all in the vertical direction, based on the bearing bush main body area in the fourth step, calculate the number of pixel points in the vertical direction of the calculation area, and take the maximum number of pixels Num at both side edges. max This corresponds to the axial width value of the bearing bush, and the pixel scale is obtained according to the measurement result in the first step.
6. The image distortion correction method for detecting surface defects of a bearing shell according to claim 1, wherein: In the sixth step, based on the instance segmentation model, the defect area in the bearing shell image is identified and segmented.
7. An image distortion correction method for detecting surface defects of a bearing shell according to claim 1, characterized in that: In the seventh step, the coordinates of the pixel points in the image taken directly facing the bearing shell are mapped to the coordinates of this point on the rectangular plane expansion diagram of the inner surface of the bearing shell. In actual situations, the bearing shell has an elastic tensor and is not a strictly semi-cylindrical shape. For the convenience of calculation and simplification of the steps, the bearing shell is regarded as an ideal semi-cylindrical shape.
Citation Information
Patent Citations
Bearing surface defect detection method and system based on improved YOLOv10
CN118711000A
Sliding bearing fault detection method and system based on image processing
CN118982733A
Electricity approaching safety early warning method, device and equipment for electric power construction personnel and medium
CN119152012A
Cited By
Rock sample end face flatness measuring method based on grid rubbing and visual quantization
CN120846251A