Bearing raceway defect detection method and system based on image processing

CN123015427APending Publication Date: 2026-10-30QUZHOU COLLEGE OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611152901.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本发明提出的基于图像处理的轴承滚道缺陷检测方法及系统,以解决上述现有技术中提到的现有轴承滚道缺陷检测效率低、光照干扰下准确率差、场景适配成本高的问题

Benefits of technology

本发明通过构建杂光隔离的标准化成像环境,配合从序列图像采集、预处理、缺陷识别到质量判定的全流程自动化图像处理链路,实现轴承滚道缺陷的无接触式全流程检测,检测过程无需涂覆磁粉、渗透液等额外检测介质,无需人工参与目视判定环节,有效解决了现有技术中人工及传统无损检测模式效率偏低、检测结果受人员状态与经验影响一致性差、检测介质残留易引发轴承工作面二次污染的缺陷,可适配自动化生产线快节拍全检需求,消除人工长时间作业疲劳、判定标准不统一带来的漏检、误判问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015427A_ABST
    Figure CN123015427A_ABST
Patent Text Reader

Abstract

The application discloses a bearing raceway defect detection method and system based on image processing, and relates to the field of bearing raceway defect detection based on image processing. A coaxial ring-shaped combined light source, a three-jaw clamping table with a rotating trigger function, a fixed-focus industrial camera and an edge computing unit are carried in a closed darkroom environment. The whole sequence of raceway images can be triggered and collected at fixed angle intervals during the uniform rotation of the bearing. Image distortion correction, raceway region of interest positioning, pixel-by-pixel light correction and texture consistency denoising are automatically completed. A defect response map is generated through multi-scale feature fusion. After adaptive threshold segmentation, the suspected defect area is extracted. The application can complete non-contact detection without coating detection medium, can eliminate the recognition interference caused by uneven illumination of high-reflective cylindrical light and local overexposure, can detect defects of different sizes, and can effectively solve the problems of poor consistency and low efficiency in manual detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bearing raceway defect detection technology based on image processing, and particularly to a bearing raceway defect detection method and system based on image processing. Background Technology

[0002] Bearings are the most widely used core rotating support components in high-end equipment, rail transportation, new energy wind power, and general machinery. As the core working surface of the bearing that bears the rolling elements, defects such as cracks, pitting, indentations, and scratches that occur on the surface during machining or service can directly lead to increased bearing vibration and shortened fatigue life. In severe cases, this can cause the entire equipment to shut down or even result in a safety accident. With the continuous improvement of equipment reliability requirements in downstream sectors, the industry has placed higher demands on the coverage, accuracy, and efficiency of bearing raceway defect detection. Traditional small-scale sampling inspection methods are no longer sufficient to cover the quality control needs throughout the entire lifecycle.

[0003] Currently, there are two main types of testing solutions in the industry, each with significant limitations. The first type combines manual visual inspection with traditional non-destructive testing methods such as magnetic particle testing and penetrant testing. This mainly relies on inspectors directly observing the raceway surface under strong light or marking defect locations through magnetic particle accumulation and penetrant color development. This type of solution has been in use the longest and has a low equipment investment threshold. It is intuitive for judging large, visually visible defects, but it is greatly affected by personnel visual fatigue and differences in experience levels, resulting in poor consistency of test results. It has a high rate of missing micron-level early fatigue micro-defects. Furthermore, magnetic particle testing and penetrant testing require multiple processes such as coating, magnetization, cleaning, and demagnetization, resulting in low testing efficiency. Residual test media may cause secondary contamination of the bearing assembly surface, making it unsuitable for the high-speed, full-inspection requirements of automated production lines.

[0004] The second category is traditional fixed-parameter machine vision inspection solutions. These solutions acquire raceway images using industrial cameras and employ traditional image processing algorithms such as global fixed threshold segmentation and single-scale edge detection to extract defect areas. This enables non-contact automated inspection, significantly improving inspection speed compared to manual methods. However, these solutions fail to consider the imaging characteristics of the bearing raceway as a highly reflective metallic cylindrical structure. Under coaxial light source illumination, a gradient illumination distribution is formed, with the center bright and the edges dark. Defects in the dark areas at the raceway edges have low contrast and are easily missed. Overexposed highlight areas formed by local specular reflection are easily misjudged as crack-like defects. At the same time, single-scale feature extraction cannot simultaneously cover defects ranging from micron-level pitting to millimeter-level scratches, easily misjudging normal grinding textures and service wear textures as defects. Furthermore, the algorithm parameters are fixed, requiring repeated manual adjustment of threshold parameters when changing bearing models or processing batches, resulting in insufficient adaptability and a persistently high false detection rate in in-service bearing maintenance and repair scenarios.

[0005] With the development of flexible bearing manufacturing and intelligent operation and maintenance, the accuracy, stability and adaptability of existing testing solutions are no longer sufficient to cover the diverse needs of mass production final inspection of newly manufactured bearings and maintenance and repair inspection of in-service bearings. The industry urgently needs a more universal and robust raceway defect detection technology to achieve automated full inspection while ensuring detection accuracy and reducing operation and maintenance commissioning costs. Summary of the Invention

[0006] The present invention proposes an image processing-based method and system for detecting bearing raceway defects to solve the problems mentioned in the prior art, such as low efficiency, poor accuracy under illumination interference, and high cost of scene adaptation.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: a bearing raceway defect detection method based on image processing, comprising the following steps: First, a sequence of images covering the entire raceway surface of the bearing to be inspected is acquired using a coaxial ring light source in a darkroom environment and a high-resolution industrial camera. The sequence of images is then preprocessed with denoising and distortion correction. The inner and outer circle boundaries of the raceway are located using Hough circle transform, and the region of interest to be inspected, which contains only the raceway surface, is then cropped. Subsequently, an adaptive illumination correction model matching the curvature parameters of the raceway is constructed. The illumination compensation amount is calculated pixel by pixel for the image within the region of interest. The gradient illumination deviation caused by the reflection of the cylindrical raceway, which results in a bright center area and a dark edge area, is corrected. Overexposed and saturated pixels in the image are located simultaneously. The texture restoration of the saturated area is completed based on the neighborhood grayscale distribution, resulting in a uniformly illuminated raceway texture reference image. Then, based on the multi-scale Gaussian difference operator, convolution operation is performed on the roller texture reference image to generate texture feature maps at different response scales. These maps are then fused to obtain a full-scale defect response map. A local adaptive threshold segmentation algorithm is used to extract all suspected defect connected components from the full-scale defect response map and filter out pseudo-defect regions whose connected component size is smaller than the minimum processing texture period. Then, extract the geometric morphological features, gray-scale distribution features, and edge gradient features of each retained suspected defect connected region, input the feature vector into the pre-trained lightweight defect classification network, and output the defect type judgment result corresponding to each suspected region to identify four common raceway defects: cracks, pitting, scratches, and indentations. Finally, by combining the model and specification parameters of the bearing to be inspected, the location coordinates and size information of the defects, and matching the preset bearing quality evaluation rules, an inspection report containing the distribution, type and grade of defects is generated, thus completing the defect inspection process of the bearing raceway.

[0008] Furthermore, the construction process of the adaptive illumination correction model is as follows: A reference image of a standard, defect-free bearing raceway with the same curvature parameters under rated illumination parameters is pre-acquired. The average gray value is statistically analyzed column by column along the radial direction of the raceway. An illumination attenuation curve is fitted to obtain the gray value as a function of the radial pixel position. Based on the illumination attenuation curve, the illumination compensation coefficient corresponding to each pixel position is calculated. The pixel gray value in the region of interest is adjusted pixel by pixel to correct the gray mean of the entire raceway image to a unified reference range.

[0009] Furthermore, the process of locating and repairing overexposed and saturated pixels is as follows: Traverse the pixels within the region of interest, mark pixels whose grayscale values ​​reach the camera's quantization limit as saturated pixels, select a neighborhood window of a preset size centered on each saturated pixel, remove other saturated pixels within the window, calculate the grayscale weighted average of the effective pixels in the neighborhood, and use this average to replace the grayscale value of the corresponding saturated pixel to complete the texture restoration of the highlight coverage area.

[0010] Furthermore, the convolution operation process of the multi-scale Gaussian difference operator is as follows: three two-dimensional Gaussian kernels with different standard deviations are selected, and smooth convolution is performed on the roller texture reference image to obtain three base texture images with different smoothness. The difference between the three base texture images is calculated pairwise to obtain the difference response maps of the three scales. According to the response sensitivity of different scales to defects of various sizes, corresponding fusion weights are set, and weighted fusion is performed to obtain the full-scale defect response map, covering the full-size defect response range from micron-level pitting to millimeter-level scratches.

[0011] Furthermore, the execution process of the local adaptive threshold segmentation algorithm is as follows: taking each pixel in the full-scale defect response map as the center, a sliding window matching the cycle of the roller processing texture is selected, the mean and standard deviation of the response values ​​within the window are calculated, and the sum of the mean and k times the standard deviation is used as the segmentation threshold for the pixel position. Pixels with response values ​​higher than the threshold are marked as suspected defect pixels. Connected component marking is performed on adjacent suspected defect pixels, and pseudo-defect regions with connected component areas smaller than the area of ​​a single processing texture unit are removed.

[0012] Furthermore, the training process of the lightweight defect classification network is as follows: Collect raceway defect samples of bearings from different processing batches and of different specifications, perform data augmentation processing such as random rotation, grayscale fine adjustment, and noise injection on the samples, adopt a knowledge distillation training strategy, use a high-precision residual network as the teacher network, transfer the defect feature knowledge extracted by the teacher network to the lightweight student network after channel number pruning, and use the trained student network as the defect classification network for deployment.

[0013] Furthermore, the defect level assessment process is as follows: For each identified defect, the maximum radial extension dimension, axial extension length, and minimum distance from the defect edge to the effective bearing surface of the raceway are calculated. Combined with the quality impact weight corresponding to the defect type, the quality acceptance standard of the corresponding bearing model is matched, and the bearing test results are divided into three levels: qualified, reworkable, and scrapped. The specific location and size parameters of each defect are marked in the test report to support quality traceability in subsequent production processes.

[0014] Furthermore, an image processing-based bearing raceway defect detection system, used to implement the aforementioned defect detection method, includes: The sealed dark box acquisition module is equipped with a coaxial ring light source, a high-resolution industrial camera and an adjustable bearing clamping stage. It provides an imaging environment free from ambient stray light interference for bearing raceway image acquisition, acquires high-definition sequential images covering the entire raceway and transmits them to the edge computing processing module. The edge computing processing module is used to execute the steps of the image processing-based bearing raceway defect detection method, and complete the entire process of raceway image preprocessing, illumination correction, suspected defect extraction, defect classification and grade evaluation. The human-machine interaction module is used to set detection parameters, display real-time detection results, and export standardized detection reports. It also interfaces with the automatic sorting equipment on the production line and outputs corresponding sorting control signals based on the detection results.

[0015] Furthermore, the adjustable bearing clamping platform is equipped with a high-precision servo rotation mechanism and a three-jaw self-centering chuck. The clamping stroke of the chuck can be adjusted according to the inner and outer diameters of the bearing to be tested, driving the bearing to rotate at a constant angular velocity. Combined with the fixed frame rate trigger acquisition of the industrial camera, it ensures that the raceway area of ​​adjacent frame images has a set proportion of overlap, realizing no blind spots and no repeated acquisition of the entire raceway.

[0016] Furthermore, the edge computing processing module is also equipped with a model self-updating unit, which is used to store false detection and missed detection samples that have been manually reviewed and corrected during the detection process. When the cumulative sample size reaches a set threshold, the incremental fine-tuning training of the defect classification network is automatically started, and the updated model parameters replace the original inference model.

[0017] Compared with existing technologies, the beneficial effects of this invention are: This invention constructs a standardized imaging environment isolated from stray light, and combines it with a fully automated image processing chain from sequential image acquisition, preprocessing, defect identification to quality judgment, to achieve non-contact, full-process detection of bearing raceway defects. The detection process does not require the application of magnetic powder, penetrant, or other additional detection media, and there is no need for manual visual judgment. It effectively solves the shortcomings of existing technologies, such as low efficiency of manual and traditional non-destructive testing modes, poor consistency of detection results due to the influence of personnel condition and experience, and the risk of secondary contamination of the bearing working surface due to residual detection media. It can be adapted to the high-speed full inspection requirements of automated production lines and eliminates the problems of missed detection and misjudgment caused by fatigue from long-term manual operation and inconsistent judgment standards.

[0018] This invention constructs an adaptive illumination correction model that matches the curvature parameters of the raceway, and combines it with texture restoration of overexposed saturated pixels and defect response logic based on multi-scale Gaussian difference operator weighted fusion. This can eliminate the radial illumination gradient difference that is common in the imaging of highly reflective cylindrical raceways, where the center is bright and the edges are dark. It can also repair the texture of overexposed areas formed by local specular reflection. At the same time, it covers the feature response range of defects of different sizes. This invention effectively solves the defects in the prior art, such as the missed detection of small defects in dark areas at the raceway edges due to uneven illumination, the easy misjudgment of bright areas as cracks, and the inability of single-scale feature extraction to cover full-size defect identification. It significantly improves the detection capability of weak early defects and reduces the probability of false defects triggered by normal processing textures.

[0019] This invention employs a lightweight defect classification network trained with knowledge distillation, combined with locally adaptive threshold segmentation logic that can dynamically match texture periods and a model self-updating unit that supports automatic iteration of false and missed detection sample accumulation. This allows it to adapt to bearing raceway texture features of different specifications, different processing batches, and different service conditions without requiring professional technicians to repeatedly manually adjust threshold parameters. It effectively solves the defects of existing technologies, such as fixed algorithm parameters, high cost of model change and debugging, and the tendency of in-service bearing wear texture to cause a large number of false alarms. It reduces the manual cost of system deployment and maintenance and has stronger algorithm robustness in complex industrial scenarios. Attached Figure Description

[0020] Figure 1 This is an overall flowchart of the bearing raceway defect detection method based on image processing proposed in this invention; Figure 2 This is a flowchart of the adaptive illumination correction and specular texture restoration process of the present invention; Figure 3 This is a flowchart of the multi-scale defect response and adaptive segmentation process of the present invention; Figure 4 This is a flowchart of the defect classification network training and quality level evaluation process of the present invention. Figure 5 This is a flowchart illustrating the architecture and collaborative control process of the bearing raceway defect detection system of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Reference Figures 1 to 5 This invention discloses a method and system for detecting bearing raceway defects based on image processing, comprising the following steps: First, a closed imaging environment was set up to acquire images of the raceway. The inner wall of the closed space was covered with a matte black light-absorbing coating to isolate the interference of stray light from the external environment. A coaxial ring light source and a high-resolution global shutter industrial camera were set up inside. The light source's output direction was at an angle of 30 to 45 degrees to the camera's optical axis to adapt to the high reflectivity of the bearing steel surface and avoid specular reflection light from directly entering the lens and causing large-area overexposure. The camera was equipped with a fixed-focus industrial lens to ensure that the imaging resolution of the raceway surface was no less than 5 micrometers per pixel, meeting the requirements for the identification of micrometer-level defects. During the acquisition process, the bearing to be tested is driven to rotate at a constant speed by a rotatable stage, and the camera is triggered to capture images at a fixed frame rate to obtain a sequence of images covering the entire raceway surface.

[0023] The acquired sequence of images is preprocessed frame by frame. First, a nonlocal mean filtering algorithm is used to filter out salt-and-pepper noise and Gaussian noise mixed in during the image acquisition process. During the filtering process, the fine texture and defect edges of the raceway surface are preserved, avoiding the blurring of defect contours by traditional smoothing algorithms, which may lead to the missed detection of small defects. Then, the in-camera distortion coefficients, which were obtained in advance through a checkerboard calibration board, were used to correct the barrel distortion and tangential distortion in the image frame by frame, ensuring that the geometric dimensions of the image corresponded linearly to the actual physical dimensions. After calibration, the inner and outer circle boundaries of the raceway are located using Hough circle transform. During the positioning process, the search range of inner and outer circle radii is preset in combination with the model parameters of the bearing to be tested to reduce the amount of invalid computation of Hough transform. After positioning, the region of interest to be tested, which only contains the effective bearing surface of the raceway, is cropped. Invalid pixels of non-working surfaces of the inner and outer rings of the bearing are removed to compress the data scale of subsequent calculations.

[0024] Then, an adaptive illumination correction model matching the curvature parameters of the raceway is constructed. The illumination compensation amount is calculated pixel by pixel for the image within the region of interest. The gradient illumination deviation caused by the reflection of the cylindrical raceway surface, which results in a bright center area and a dark edge area, is corrected. The overexposed and saturated pixels are located simultaneously by traversing the image. The texture restoration of the saturated area is completed based on the neighborhood grayscale distribution. The interference of local specular reflection on defect identification is eliminated, and a raceway texture reference image with uniform illumination is obtained.

[0025] Subsequently, the roller texture reference image is convolved based on the multi-scale Gaussian difference operator to generate texture feature maps at different response scales. The full-scale defect response map is then obtained by fusing the maps according to preset weights, covering the response range of defects of different sizes. A local adaptive threshold segmentation algorithm is used to extract all suspected defect connected regions from the full-scale defect response map, filter out pseudo-defect regions whose connected region size is smaller than the minimum processing texture period, and eliminate false responses caused by noise and surface dust.

[0026] Then, the geometric morphological features, gray-level distribution features, and edge gradient features of each retained suspected defect connected region are extracted. The features specifically include parameters such as the aspect ratio, area, circularity, internal gray-level mean, gray-level variance, and edge gradient magnitude mean of the connected region. The multi-dimensional feature vector is input into the pre-trained lightweight defect classification network, and the defect type judgment result corresponding to each suspected region is output, identifying the four most common raceway defects in industrial scenarios: cracks, pitting, scratches, and indentations.

[0027] Finally, by combining the model and specification parameters of the bearing to be tested, the location coordinates and size information of the defects, and matching the preset bearing quality evaluation rules, the bearing test results are divided into corresponding quality levels, and a standardized test report containing the distribution, type and level of defects is generated, thus completing the full-process defect detection of the bearing raceway.

[0028] In this invention, the construction process of the adaptive illumination correction model is also disclosed. A standard defect-free bearing with the same curvature parameters is selected in advance as the correction benchmark. The standard bearing is manually verified by the metrology department to confirm that there are no visible defects on the surface. When collecting the benchmark image, the light source brightness, camera exposure parameters and shooting distance are completely consistent with the formal test to ensure that the imaging conditions are not deviated from the actual test scene. The average grayscale value of the reference image is statistically analyzed column by column along the radial direction of the roller track. During the statistical process, abnormal pixel values ​​such as dust and noise that occasionally appear in the image are removed. A continuous illumination attenuation curve of grayscale value changing with radial pixel position is obtained by fitting a cubic polynomial. Based on the illumination attenuation curve, the illumination compensation coefficient corresponding to each pixel position is calculated. The pixel grayscale value of the region of interest is adjusted pixel by pixel to correct the grayscale mean of the entire roller track image to a unified reference range. During the correction process, the pixel grayscale value is simultaneously limited to not exceed the quantization limit of the camera to avoid over-compensation and the creation of new overexposed areas.

[0029] This invention also discloses the process of locating and repairing overexposed saturated pixels. It traverses all pixels in the region of interest and marks pixels whose grayscale values ​​reach the quantization limit of the corresponding bit depth camera as saturated pixels. The quantization limit for an 8-bit depth camera is 255, and the quantization limit for a 12-bit depth camera is 4095. A neighborhood window of a preset size is selected centered on each saturated pixel. The window size is set to cover the largest single highlight area observed in the scene. After removing other marked saturated pixels within the window, the Gaussian weighted average of the remaining effective pixels in the neighborhood is calculated. The weight is determined based on the Euclidean distance between the pixel and the central saturated pixel. The closer the distance, the higher the weight. The total weight is 1. The gray value of the corresponding saturated pixel is replaced with the calculated weighted average. The repair process ensures that the repaired area transitions naturally with the surrounding grinding texture without obvious block effects, thus completing the texture repair of the highlight coverage area and eliminating the false crack response formed by the highlight edge.

[0030] This invention also discloses the convolution operation process of the multi-scale Gaussian difference operator. Combining the raceway grinding texture period corresponding to the current bearing model, four two-dimensional Gaussian kernels with different standard deviations are selected. The four standard deviations correspond to one texture period, two texture periods, four texture periods and eight texture periods, respectively. The raceway texture reference image is smoothed by convolution to obtain four basic texture images with different smoothness. The smoothness gradually increases with the increase of the standard deviation. The difference between adjacent layers of the four basic texture images is used to obtain differential response maps at three scales. The small-scale differential map has high response sensitivity to small-sized defects, while the large-scale differential map can suppress fine texture noise and highlight large-sized defects. According to the response sensitivity of different scales to defects of different sizes, the corresponding fusion weights are set. The weight value of the small-scale response map is appropriately increased to enhance the response to weak small defects, and the weight of the large-scale response map is appropriately reduced to avoid over-response caused by large-area texture fluctuations. The weighted fusion is used to obtain a full-scale defect response map, covering the full range of defect responses from micron-level pitting to millimeter-level scratches.

[0031] This invention also discloses the execution process of a local adaptive threshold segmentation algorithm. Centered on each pixel in the full-scale defect response map, a sliding window matching the texture period of the roller processing is selected. The window size is set to twice the texture period length to ensure that the window contains sufficient normal texture samples to statistically define the local response benchmark. The mean and standard deviation of the response values ​​within the window are calculated. The sum of the mean and k times the standard deviation is used as the segmentation threshold for that pixel position. The value of k is determined through debugging using pre-collected validation set samples, ranging from 2 to 3, to balance the recall and precision of defect segmentation. Pixels with response values ​​higher than the threshold are marked as suspected defect pixels. An 8-neighborhood connectivity rule is used to mark the connectivity of adjacent suspected defect pixels, i.e., each pixel performs connectivity determination with its neighboring pixels in eight directions, avoiding missed detections of slender cracks that are segmented into multiple scattered regions due to pixel discontinuities. The area of ​​each connected component is calculated, and pseudo-defect regions whose area is smaller than that of a single texture unit are eliminated to reduce the computational load of subsequent classification steps.

[0032] This invention also discloses the training process of a lightweight defect classification network, which continuously collects bearing raceway defect samples from different processing batches, different specifications, and different heat treatment processes to build a sample library. The sample library covers the typical forms of four types of defects: cracks, pitting, scratches, and indentations. At the same time, negative samples that are easily misjudged as defects, such as normal grinding texture, machining vibration marks, cutting fluid residue traces, and surface dust, are also included, and the total number of samples meets the scale requirements for model training. Before training, the samples are augmented with data augmentation techniques including random rotation from 0 to 360 degrees, fine-tuning of gray values ​​within a range of ±10%, and injection of low-intensity Gaussian noise. The distribution of the augmented samples is consistent with the distribution of images collected on-site, and no virtual samples that do not conform to the real scene are generated. A knowledge distillation training strategy is adopted, using a 101-layer high-precision residual network as the teacher network. Pre-training is completed on the full set of labeled samples to achieve high classification accuracy. A lightweight network with pruned channel count is used as the student network. The student network uses depthwise separable convolution instead of ordinary convolution, which significantly reduces the number of computational parameters. During training, soft labels output by the teacher network are used to supervise the learning of the student network. The defect feature knowledge extracted by the teacher network is transferred to the student network. The trained student network is used as the defect classification network for deployment, and the inference speed meets the requirements of real-time detection in industrial fields.

[0033] This invention also discloses a defect level assessment and inspection report generation process. For each identified defect, based on the pixel equivalent calibrated in advance by standard gauge blocks, the pixel size in the image is converted into the actual physical size. The maximum radial extension size, axial extension length, and minimum distance from the defect edge to the effective bearing surface boundary of the raceway are calculated. Combined with the quality influence weight corresponding to the defect type, the quality acceptance standard of the corresponding bearing model is matched, and the bearing inspection results are divided into three levels: qualified, reworkable, and scrapped. Among them, crack-type defects can directly cause the risk of bearing breakage. In high-precision application scenarios, once they are found, they are judged to be scrapped. If defects such as micro-pitting and shallow scratches are located in non-core load-bearing areas and their size does not exceed the threshold, they are judged to be reworkable and repairable. If the defect size exceeds the rework threshold, it is judged to be scrapped. The inspection report marks the specific location and size parameters of each defect. The report format is adapted to the data interface requirements of the factory's manufacturing execution system. It supports automatic uploading of inspection data and is linked to the production batch, processing equipment, and operator information corresponding to the bearing, supporting quality traceability and process optimization in subsequent production processes.

[0034] This invention also discloses a bearing raceway defect detection system based on image processing, including a sealed dark box acquisition module, an edge computing processing module, and a human-computer interaction module. The sealed dark box acquisition module is a closed box with an automatic opening and closing safety door. Inside, there is a coaxial ring light source, a high-resolution industrial camera, and an adjustable bearing clamping platform. The box is connected to the automatic feeding mechanism of the production line, which can realize the automatic feeding and unloading of bearings. It provides a stable imaging environment without environmental stray light interference for bearing raceway image acquisition, and acquires high-definition sequence images covering the entire raceway and transmits them to the edge computing processing module. The coaxial ring light source uses a continuously adjustable LED cold light source. It does not have a significant temperature rise during long-term operation and will not cause changes in the surface temperature of the bearing. The brightness of the light source can be flexibly adjusted according to the surface reflective characteristics of different bearings. The edge computing processing module adopts an industrial-grade fanless edge computing box, equipped with a graphics processing unit adapted to deep learning inference. It can adapt to the wide temperature, dust and vibration environment of the industrial site and is used to execute all the steps of the aforementioned image processing-based bearing raceway defect detection method. It completes the entire process of raceway image preprocessing, illumination correction, suspected defect extraction, defect classification and level evaluation. The detection time of a single bearing meets the production line cycle requirements. The human-machine interface module uses an industrial-grade touch screen and sets hierarchical operation permissions. Administrators can adjust detection parameters, while ordinary operators can only view the detection results. The module is used to set detection parameters, display real-time detection results, and export standardized detection reports. It also connects to the automatic sorting equipment on the production line and outputs corresponding sorting control signals based on the detection results to drive the sorting mechanism to send bearings of different grades into the corresponding material channels, realizing fully automated detection.

[0035] This invention also discloses the structure and function of an adjustable bearing clamping platform. The platform is equipped with a high-precision servo rotation mechanism and a three-jaw self-centering chuck. The jaws of the three-jaw chuck are covered with a polyurethane anti-slip protective layer, which will not damage the metal processing surface of the bearing when clamping it. The clamping stroke of the jaws is adjusted by a servo motor, which can adapt to bearings with different inner and outer diameter specifications within a certain size range, covering the size requirements of commonly used bearings in the industrial field. The angular resolution of the high-precision servo rotation mechanism meets the requirements of high-precision rotation positioning, drives the bearing to rotate at a constant angular velocity, and maintains a high degree of coaxiality between the rotation axis and the bearing center to avoid eccentric wobbling of the bearing during rotation. The rotating mechanism is equipped with a high-precision rotary encoder. When the bearing rotates to a preset angle, the encoder outputs a hardware trigger signal to the industrial camera. In conjunction with the camera's fixed frame rate trigger acquisition, it ensures that the raceway area of ​​adjacent frames has a set proportion of overlap. Subsequently, the overlapping area of ​​adjacent frames can be registered using the phase correlation method, and the panoramic image of the entire raceway can be stitched together to achieve blind spot-free and non-repeated acquisition of the entire raceway.

[0036] In this invention, a model self-updating unit set in the edge computing processing module is also disclosed, which is used to store falsely detected and missed samples that have been manually reviewed and corrected during the detection process. When the on-site quality inspectors find that there is a deviation in the detection results, they can select the corresponding image area through the human-computer interaction interface, mark the correct defect type and level, and the marked sample is automatically stored in the sample library of the model self-updating unit. The sample library is classified and stored according to defect type and texture type. When the cumulative number of false detections or false negatives of a certain type reaches the set threshold, the system automatically starts incremental fine-tuning training of the defect classification network. During training, a small learning rate is used to update the weights based on the original model parameters to avoid destroying the general defect features that the model has already learned and to prevent the model from catastrophic forgetting. After incremental training is completed, the system automatically verifies the classification accuracy of the new model on an independent test set. Only when the accuracy of the new model is better than that of the original deployed model will the original inference model be automatically replaced. The update process runs automatically in the background without interrupting the normal detection process, continuously improving the system's ability to adapt to the texture of bearings in different processing batches and reducing the workload of manual parameter tuning.

[0037] Example 1

[0038] Application scenario description: A bearing manufacturer produces 6204 deep groove ball bearings and supplies them to customers in the home appliance and general machinery industries. The original final inspection process used a combination of manual visual inspection and sampling magnetic particle inspection. Workers visually observed the raceway surface under strong light. After working for a long time, visual fatigue led to an increase in the missed inspection rate. The sampling inspection mode could not cover all products, and there were instances where defective parts were leaked, causing customer complaints. The traditional machine vision inspection solution previously introduced had significant problems with the large curvature of the raceway of this type of bearing, uneven lighting on the cylindrical surface, high rate of missed detection of small pitting corrosion in dark areas, and the need to readjust threshold parameters each time the production batch was changed due to changes in grinding texture. The single changeover and debugging took a long time and could not meet the requirements of flexible production.

[0039] After deploying this system, the clamping stroke of the three-jaw chuck was adjusted to match the 20mm inner diameter according to the dimensional parameters of the 6204 bearing. The light emission angle of the coaxial ring light source was adjusted to 35 degrees, and the camera exposure time was set to 2 milliseconds. First, images of the raceway of a defect-free 6204 standard bearing, confirmed by measurement, were acquired. The average gray value of each radial position was statistically analyzed to fit the illumination attenuation curve. In the illumination correction stage, the compensated gray value was calculated pixel by pixel. The calculation process followed the following relationship: During the process of adjusting grayscale values ​​pixel by pixel, This represents the gray value of the pixel at coordinates (x, y) in the corrected image. Represents the pixel grayscale value at the corresponding location in the original image. The average gray value representing the reference area at the center of the raceway. Represents vertical position The radial distance between the pixel and the center line of the roller track. Represents the radial position of the defect-free reference raceway. The average gray value at that location, Represents a fixed grayscale compensation offset; where The average gray value of the area directly opposite the light source at the center of the raceway is selected as the benchmark. In this area, the incident light angle is closest to perpendicular, and the reflected light intensity is stable without fluctuation. The coordinates of the inner and outer circular boundaries of the raceway are calculated using the Hough transform positioning. A continuous cubic polynomial curve was fitted using a reference image acquired from a standard bearing. Set to a fixed small value to avoid excessively low grayscale values ​​after pixel compensation in the dark areas at the edge of the roller track.

[0040] By adjusting the grayscale value pixel by pixel according to the above relationship, the radial illumination gradient formed by the reflection of the cylindrical raceway can be quickly eliminated without changing the hardware optical path structure. This ensures that the grayscale distribution of the entire raceway image is in a uniform reference range, providing a stable image basis for subsequent defect extraction.

[0041] The system operation process is as follows: The feeding mechanism automatically feeds the bearing to be inspected into the sealed dark box. After the chuck clamps the bearing, the servo rotation mechanism drives the bearing to rotate at a constant speed. The encoder triggers the camera to collect one frame of image every 18 degrees of rotation. A total of 20 frames of images are collected to cover the entire raceway. After the images are transmitted to the edge computing module, the following steps are executed in sequence: nonlocal mean denoising, distortion correction, Hough circle positioning and cropping of region of interest, illumination correction, overexposed pixel repair, multi-scale convolution to generate defect response map, adaptive threshold segmentation to extract suspected connected components, false defect filtering, lightweight network classification, and quality level determination. Finally, based on the determination result, a control signal is output to the sorting equipment to send the bearing into the corresponding material channel. The detection data is automatically uploaded to the factory manufacturing execution system.

[0042] The following is a code snippet demonstrating the logic of the core lighting compensation process in this scenario: def illumination_correct(roi_img, ref_curve, target_mu, beta=5): height, width = roi_img.shape corrected_img = np.zeros_like(roi_img) for y_pos in range(height): compensate_coeff = target_mu / ref_curve[y_pos] corrected_img[y_pos, :] = np.clip(roi_img[y_pos, :]* compensate_coeff + beta, 0, 4095) return corrected_img The illumination correction process eliminates the illumination gradient of the cylindrical raceway, preventing the micro-pitting in the dark edge area from being missed due to low contrast. The multi-scale defect response covers the full size range from 0.05 mm micro-pitting to 5 mm large-area scratches. The model self-updating unit can quickly adapt to the grinding texture changes of different batches. When changing models, only the preset parameters of the corresponding model need to be called to complete the switch, without repeatedly adjusting the threshold, which greatly shortens the model change and debugging time. The fully automated detection process does not require manual intervention and eliminates the risk of missed detection caused by human fatigue.

[0043] Example 2

[0044] A rail transit vehicle depot conducts regular maintenance on axle box bearings. After disassembly, the bearings need to be inspected for fatigue cracks, indentations, and scratches on the raceway surface to determine whether they can continue to be used in the vehicle. The original inspection plan used magnetic particle inspection, which required multiple steps, including magnetic suspension coating, magnetization, manual observation, demagnetization, and cleaning. This process was time-consuming for a single bearing, and the detection sensitivity was affected by the operator's experience. Furthermore, residual magnetic powder during cleaning could enter the bearing raceway and cause subsequent wear during operation. Traditional machine vision solutions, on the other hand, often misidentify wear patterns as defects because the axle box bearings have uniform wear textures after long-term operation, which differ significantly from the grinding texture of new bearings. This results in a high false detection rate.

[0045] After deploying this system, the clamping stroke of the three-jaw chuck is adjusted to match the 130mm inner diameter according to the size of the axle box bearing. The camera object distance is adjusted to ensure that the field of view covers the large-size raceway area. In the initial stage of system use, quality inspectors store the false and missed samples found during review into the self-updating unit. After accumulating to a set sample size, the model incremental fine-tuning is automatically completed to match the wear texture characteristics of the axle box bearing. The defect response calculation adopts a multi-scale Gaussian difference fusion strategy to calculate the full-scale response value pixel by pixel. The calculation process follows the following relationship: During the pixel-by-pixel response value calculation process, This represents the response value at position (x, y) in the full-scale defect response map. This represents the fusion weight corresponding to the i-th scale. The representative standard deviation is A two-dimensional Gaussian kernel, where * represents a two-dimensional convolution operation. The representative uses standard deviation as The reference image of the rolling track texture after two-dimensional Gaussian kernel-based illumination correction. exist The grayscale value is obtained by performing a smooth convolution on the position.

[0046] To meet the inspection requirements of axle box bearings, the Gaussian kernel standard deviations for the three scales are set to 0.8, 2.4, and 7.2 from smallest to largest, respectively, corresponding to the smoothing scales for the minimum detectable fatigue crack width, medium indentation size, and maximum scratch size. The fusion weights of the three scales are... The sum is 1, and the weight values ​​are determined by on-site validation set sample debugging, and are set to 0.5, 0.3 and 0.2 respectively. The corresponding weights of small scales are appropriately increased to strengthen the weak edge response of fatigue microcracks and avoid microcracks being covered by uniform wear textures formed by long-term operation.

[0047] Given the significant differences in wear texture between bearings that have undergone long-term use and the grinding texture of new bearings, the system eliminates the need for large-scale sample collection and annotation before deployment. Only 20 manually verified retired bearing samples of the same model are required. Incremental training is initiated by the model self-updating unit. During training, the general feature extraction parameters of the front-end convolutional layer are kept fixed, and only the parameters of the last two fully connected layers of the classification network are adjusted. This allows for rapid adaptation to the feature distribution of wear texture, avoiding misclassification of continuous and uniform wear texture as defects.

[0048] In the local adaptive threshold segmentation stage, the system first uses the autocorrelation function to statistically analyze the average size of the composite texture primitives on the raceway surface of the bearing to be detected. The sliding window size is then dynamically adjusted to twice the composite texture period length, and the threshold coefficient k is set to 2.3. This ensures the detection rate of microcracks while filtering out high-frequency, high-response values ​​caused by uniform textures, thus reducing the output of false defects.

[0049] In the overexposed pixel repair process, the system focuses on identifying saturated pixels in the annular bright band area formed by long-term wear of the bearing raceway. It replaces the grayscale of the saturated pixels with neighborhood Gaussian weighted values ​​to avoid the grayscale abrupt change at the edge of the bright band being misjudged as a continuous crack.

[0050] The core logic code snippet for multi-scale defect response calculation in this scenario is as follows: def multiscale_response(corrected_img, sigmas=[0.8, 2.4, 7.2],weights=[0.5, 0.3, 0.2]): # Construct Gaussian pyramid layers to store images with different smoothness levels gauss_layers = [cv2.GaussianBlur(corrected_img, (0,0), sigma_val)for sigma_val in sigmas] response_map = np.zeros_like(corrected_img, dtype=np.float32) for scale_idx in range(len(weights)): # Calculate the difference response of adjacent Gaussian layers dog_response = gauss_layers[scale_idx+1].astype(np.float32) -gauss_layers[scale_idx].astype(np.float32) response_map += weights[scale_idx] * dog_response return response_map When conducting a re-inspection of the bearing box, the disassembled bearing, after initial cleaning, is placed directly on the clamping platform. After the three-jaw chuck automatically centers and clamps it, the servo rotation mechanism drives the bearing to rotate at a constant angular velocity of 10 degrees per second. Under the hardware trigger of the rotary encoder, the camera acquires one frame of image at 18-degree intervals, for a total of 20 frames covering the entire raceway.

[0051] After the acquired images are transmitted to the edge computing module, distortion correction is first performed using pre-calibrated camera parameters. Then, the inner and outer circular boundaries of the raceway are located based on the Hough circle transform, and the region of interest of the raceway is cropped. Subsequently, the illumination correction curve adapted to this model of bearing box is called to perform pixel-by-pixel grayscale compensation, repairing overexposed pixels in the running bright band area of ​​the raceway surface. Then, a full-scale defect response map is generated through the above multi-scale response calculation function. After extracting the suspected defect connected components through local adaptive threshold segmentation, pseudo-defect regions with a size smaller than the wear texture unit area are filtered out. The geometric features, grayscale features, and gradient features of the retained regions are then concatenated into a feature vector, which is input into a lightweight classification network that has been incrementally trained and adapted, and the defect type determination result of each suspected region is output.

[0052] In the quality assessment process, fatigue crack defects are given the highest quality weight. If a fatigue crack exceeding the threshold is detected, the bearing is directly judged as a scrapped part. For minor indentations and uniform running-in textures, which are small in size, they are judged as usable. Finally, a re-inspection report with defect location markings is generated. The test data is simultaneously stored in the bearing's full life cycle management file to provide data support for subsequent bearing operation and maintenance decisions.

[0053] Compared to the traditional magnetic particle testing process, the entire testing process does not require multiple steps such as coating with magnetic suspension, magnetization, manual observation, demagnetization, and cleaning. The testing time for a single bearing is reduced by more than 70% compared to the original process. There is no risk of magnetic powder residue embedding into the raceway gap and causing subsequent wear during operation. The test results are not affected by personnel experience or fatigue, and the judgment standards are more consistent. Compared to traditional fixed-parameter machine vision solutions, the model self-updating function can quickly adapt to the wear texture features of bearings in long-term service with only a small number of on-site samples. It eliminates the need for algorithm engineers to repeatedly adjust threshold parameters, effectively solving the problem of wear textures being misjudged as defects. The optimization of small-scale response weights can stably identify early fatigue microcracks that are difficult to detect with the naked eye, avoiding the risk to train safety caused by missed microcrack detection, and meeting the high reliability detection requirements of the rail transit field.

[0054] The lightweight defect classification network used in this invention has a specific structure of 4 cascaded depthwise separable convolutional modules combined with 2 fully connected layers. Each depthwise separable convolutional module consists of channel-wise convolution, pointwise convolution, batch normalization layer and ReLU activation layer. The total number of network parameters is only about one-tenth of that of a traditional 101-layer residual teacher network. The inference time for a single frame of 1024×1024 resolution image is less than 10 milliseconds, which fully meets the time requirements for real-time detection in industrial sites.

[0055] During the knowledge distillation training process, the distillation temperature was set to 4, and the total loss function was composed of a weighted average of the classification cross-entropy loss and the soft label distillation loss, with the distillation loss accounting for 0.7 and the true label classification cross-entropy loss accounting for 0.3, to ensure that the student network can fully learn the inter-class feature differences extracted by the teacher network.

[0056] In the image acquisition stage, the overlap of the raceway region between adjacent frames is fixed at 20%. When stitching together the panoramic image of the entire raceway, the phase correlation method is used to calculate the sub-pixel level translation offset between adjacent frames to align the texture features of the overlapping area. During the stitching process, a fade-in and fade-out weighted fusion strategy is adopted for the pixels in the overlapping area. The closer the pixels are to the stitching seam, the more balanced the fusion weight is, avoiding obvious grayscale seams at the stitching point, ensuring the continuity of the panoramic image of the entire raceway, and preventing grayscale jumps at the seam from being misjudged as annular crack defects.

[0057] When using the Hough circle transform to locate the raceway boundary, a pre-set radius search range is defined for each bearing model as ±10% of the theoretical inner and outer radii of the raceway for that model. The voting threshold is set to 70% of the maximum value of the accumulator. This allows for rapid location of the center coordinates and radius values ​​of the inner and outer circles, preventing circular interference contours such as mounting holes and chamfers in the background area from being misidentified as raceway boundaries. The positioning accuracy error is less than 1 pixel, ensuring that the region of interest for subsequent trimming completely covers the effective bearing surface of the raceway and preventing non-working areas from being included in the detection range, thus avoiding unnecessary computation.

[0058] During the incremental fine-tuning of the model, the system adopts an early stopping strategy to prevent overfitting caused by small sample training. Training is stopped when the accuracy on the validation set does not improve for 5 consecutive rounds. The fine-tuning learning rate is set to 0.0001, the upper limit of the training iteration rounds is set to 20 rounds, and only the parameters of the last two fully connected layers of the network are updated. The parameters of the general defect edges and texture features learned by the front convolutional layers are kept fixed. Only a few parameters need to be adjusted to adapt to the new texture distribution. At the same time, the model avoids catastrophic forgetting during small sample training and ensures the detection stability of the model after the update.

[0059] To meet the bearing quality inspection needs of different application scenarios, the system has built-in quality evaluation standard templates for corresponding industries, covering mainstream application scenarios such as precision machine tool spindle bearings, general machinery bearings, rail transit bearings, and wind power spindle bearings. Users can call up the standard templates for the corresponding industries with one click through the human-machine interface, or customize the quality grade thresholds corresponding to the defect size and location according to their own process requirements, adapting to different levels of quality inspection requirements without the need to redevelop the algorithm logic.

[0060] In the non-local mean denoising stage, the search window size is set to 21×21 pixels, the similar block size is set to 7×7 pixels, and the filtering parameters are automatically adjusted according to the image noise level. While filtering out sensor noise, the sharp edge information of the defect is completely preserved, avoiding the blurring of micro-crack edges caused by traditional Gaussian filtering, which leads to a decrease in subsequent response values ​​and missed detections.

[0061] The distortion coefficients used in the distortion correction process are obtained by calibrating a 12×9 checkerboard calibration plate at the same working distance as the actual inspection. The calibration reprojection error is less than 0.1 pixels, which can completely correct the size measurement deviation caused by lens optical distortion and ensure the accuracy of subsequent defect size conversion.

[0062] During the pixel equivalent calibration process, a standard ceramic gauge block that has been calibrated by metrology is placed on the plane where the raceway is located. After acquiring the image of the gauge block, the ratio of the actual physical size of the gauge block to the number of pixels in the image is calculated to obtain the actual physical size corresponding to each pixel. The calibration accuracy meets the requirements for micron-level size measurement.

[0063] Reference Figure 1 The overall flowchart of the bearing raceway defect detection method based on image processing proposed in this invention illustrates the core computational chain of the system. First, bearing raceway images are acquired under controlled conditions. After preprocessing and boundary localization, the effective curved surface region is accurately extracted. Then, an illumination correction model is used to eliminate gradient deviations caused by cylindrical reflections, and overexposed areas are repaired at the pixel level to restore texture consistency. Next, a multi-scale differential operator is used to highlight abnormal textures, combined with adaptive threshold segmentation to pinpoint suspected defect areas. Finally, multi-dimensional features are extracted and input into a lightweight classification network to complete defect identification. The quality level is then assessed by comprehensively considering physical size and location parameters, and a professional inspection report is output, achieving automation and standardization of the entire inspection process.

[0064] Reference Figure 2This invention provides a detailed flowchart of adaptive illumination correction and specular texture restoration, outlining the key steps in optimizing the underlying image quality. The process first relies on prior standard samples to fit the radial attenuation distribution of illumination on the cylindrical surface. Based on this, pixel-level photometric compensation is performed on the image under inspection, bringing the overall grayscale back to a consistent observation benchmark. Addressing the issue of specular reflections that are prone to occur on metal surfaces, the system iterates through and locks saturated pixels that have reached quantization extrema. By setting a neighborhood window and eliminating invalid extrema, the system accurately overwrites these pixels using the grayscale weighted average of surrounding normal texture pixels. This mechanism effectively eliminates the severe interference caused by uneven illumination and reflective blind spots to subsequent defect identification.

[0065] Reference Figure 3 This invention presents the operational logic of defect feature stripping and target extraction through a multi-scale defect response and adaptive segmentation flowchart. The system constructs multi-scale smooth images using Gaussian kernels with different standard deviations, and obtains full-scale defect response features covering the micrometer to millimeter scale through cross-subtraction. In the target segmentation stage, the algorithm introduces a sliding window highly matched to the machining texture period, dynamically calculating local statistical features to establish an adaptive threshold, accurately stripping abnormal pixels that exceed background fluctuations. Subsequently, a connected component labeling algorithm integrates discrete abnormal feature points, and pseudo-defect connected components are strictly filtered out according to the lower limit of the physical scale of the machined texture, ensuring high purity and high sensitivity in the extraction of suspected defects.

[0066] Reference Figure 4 This invention presents a flowchart illustrating the training and quality level assessment process for a defect classification network, outlining the optimization of the deep learning model and the execution of industrial grading. In the algorithm development stage, data augmentation is employed to expand sample diversity, and a knowledge distillation strategy is used to losslessly compress the feature representation capabilities of a high-precision, complex network into a lightweight network, balancing the computational limitations of industrial deployment with real-time accuracy requirements. In the business assessment stage, the system not only relies on the network's defect category determination but also deeply integrates physical geometric parameters such as the radial extension, axial length, and spatial distribution of defects. Combined with a pre-defined weighting system, it rigorously matches acceptance standards, ultimately accurately classifying and grading products, providing detailed evidence for the traceability of production processes.

[0067] Reference Figure 5This invention presents the architecture and collaborative control flowchart of the bearing raceway defect detection system, showcasing the efficient collaborative operation mechanism of the hardware and software modules. The sealed darkroom acquisition module utilizes a high-precision servo mechanism and a self-centering fixture to dynamically adjust the clamping stroke, driving the bearing to operate smoothly and uniformly. Combined with the synchronous triggering of a constant light source and an industrial camera, it achieves seamless panoramic stitching acquisition of the raceway surface. The edge computing processing module, as the core hub, not only handles concurrent processing of massive amounts of images but also has a built-in self-updating function, enabling closed-loop fine-tuning of the model using on-site verification data. The human-machine interaction module connects the detection end and the production line execution end, providing real-time feedback of calculation results and accurately issuing action control commands to downstream sorting equipment, thus constructing a complete automated quality control closed loop.

[0068] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting bearing raceway defects based on image processing, characterized in that, Includes the following steps: First, a sequence of images covering the entire raceway surface of the bearing to be inspected is acquired using a coaxial ring light source in a darkroom environment and a high-resolution industrial camera. The sequence of images is then preprocessed with denoising and distortion correction. The inner and outer circle boundaries of the raceway are located using Hough circle transform, and the region of interest to be inspected, which contains only the raceway surface, is then cropped. Subsequently, an adaptive illumination correction model matching the curvature parameters of the raceway is constructed. The illumination compensation amount is calculated pixel by pixel for the image within the region of interest. The gradient illumination deviation caused by the reflection of the cylindrical raceway, which results in a bright center area and a dark edge area, is corrected. Overexposed and saturated pixels in the image are located simultaneously. The texture restoration of the saturated area is completed based on the neighborhood grayscale distribution, resulting in a uniformly illuminated raceway texture reference image. Then, based on the multi-scale Gaussian difference operator, convolution operation is performed on the roller texture reference image to generate texture feature maps at different response scales. These maps are then fused to obtain a full-scale defect response map. A local adaptive threshold segmentation algorithm is used to extract all suspected defect connected components from the full-scale defect response map and filter out pseudo-defect regions whose connected component size is smaller than the minimum processing texture period. Then, extract the geometric morphological features, gray-scale distribution features, and edge gradient features of each retained suspected defect connected region, input the feature vector into the pre-trained lightweight defect classification network, and output the defect type judgment result corresponding to each suspected region to identify four common raceway defects: cracks, pitting, scratches, and indentations. Finally, by combining the model and specification parameters of the bearing to be inspected, the location coordinates and size information of the defects, and matching the preset bearing quality evaluation rules, an inspection report containing the distribution, type and grade of defects is generated, thus completing the defect inspection process of the bearing raceway.

2. The bearing raceway defect detection method based on image processing according to claim 1, characterized in that, The construction process of the adaptive illumination correction model is as follows: A reference image of a standard, defect-free bearing raceway with the same curvature parameters under rated illumination parameters is pre-acquired. The average gray value is statistically analyzed column by column along the radial direction of the raceway. An illumination attenuation curve is fitted to obtain the gray value as a function of the radial pixel position. Based on the illumination attenuation curve, the illumination compensation coefficient corresponding to each pixel position is calculated. The pixel gray value in the region of interest is adjusted pixel by pixel to correct the gray mean of the entire raceway image to a unified reference range.

3. The bearing raceway defect detection method based on image processing according to claim 2, characterized in that, The process of locating and repairing overexposed saturated pixels is as follows: traverse the pixels in the region of interest, mark the pixels whose grayscale value reaches the camera's quantization limit as saturated pixels, select a neighborhood window of a preset size with each saturated pixel as the center, remove other saturated pixels in the window, calculate the grayscale weighted average of the effective pixels in the neighborhood, and use this average value to replace the grayscale value of the corresponding saturated pixel to complete the texture repair of the highlight coverage area.

4. The bearing raceway defect detection method based on image processing according to claim 1, characterized in that, The convolution operation process of the multi-scale Gaussian difference operator is as follows: three two-dimensional Gaussian kernels with different standard deviations are selected, and smooth convolution is performed on the roller texture reference image to obtain three base texture images with different smoothness. The difference between the three base texture images is calculated pairwise to obtain the difference response maps of three scales. According to the response sensitivity of different scales to defects of various sizes, corresponding fusion weights are set, and weighted fusion is performed to obtain the full-scale defect response map, covering the full-size defect response range from micron-level pitting to millimeter-level scratches.

5. The bearing raceway defect detection method based on image processing according to claim 1, characterized in that, The execution process of the local adaptive threshold segmentation algorithm is as follows: taking each pixel in the full-scale defect response map as the center, a sliding window matching the cycle of the roller processing texture is selected, the mean and standard deviation of the response value within the window are calculated, and the sum of the mean and k times the standard deviation is used as the segmentation threshold for the pixel position. Pixels with response values ​​higher than the threshold are marked as suspected defect pixels. Connected component marking is performed on adjacent suspected defect pixels, and pseudo-defect regions with connected component areas smaller than the area of ​​a single processing texture unit are removed.

6. The bearing raceway defect detection method based on image processing according to claim 1, characterized in that, The training process of the lightweight defect classification network is as follows: Collect raceway defect samples of bearings from different processing batches and of different specifications, perform data augmentation processing such as random rotation, grayscale fine adjustment and noise injection on the samples, adopt a knowledge distillation training strategy, use a high-precision residual network as the teacher network, transfer the defect feature knowledge extracted by the teacher network to the lightweight student network after channel number pruning, and use the trained student network as the defect classification network for deployment.

7. The bearing raceway defect detection method based on image processing according to claim 1, characterized in that, The defect level assessment process is as follows: For each identified defect, calculate the maximum radial extension dimension, axial extension length, and minimum distance from the defect edge to the effective bearing surface of the raceway. Combine the quality impact weight corresponding to the defect type, match the quality acceptance standard of the corresponding bearing model, and classify the bearing test results into three levels: qualified, reworkable, and scrapped. Mark the specific location and size parameters of each defect in the test report to support quality traceability in subsequent production processes.

8. A bearing raceway defect detection system based on image processing, used to implement the defect detection method according to any one of claims 1-7, characterized in that, include: The sealed dark box acquisition module is equipped with a coaxial ring light source, a high-resolution industrial camera and an adjustable bearing clamping stage. It provides an imaging environment free from ambient stray light interference for bearing raceway image acquisition, acquires high-definition sequential images covering the entire raceway and transmits them to the edge computing processing module. The edge computing processing module is used to execute the steps of the image processing-based bearing raceway defect detection method, and complete the entire process of raceway image preprocessing, illumination correction, suspected defect extraction, defect classification and grade evaluation. The human-machine interaction module is used to set detection parameters, display real-time detection results, and export standardized detection reports. It also interfaces with the automatic sorting equipment on the production line and outputs corresponding sorting control signals based on the detection results.

9. The bearing raceway defect detection system based on image processing according to claim 8, characterized in that, The adjustable bearing clamping platform is equipped with a high-precision servo rotation mechanism and a three-jaw self-centering chuck. The clamping stroke of the chuck can be adjusted according to the inner and outer diameter of the bearing to be tested, driving the bearing to rotate at a constant angular velocity. In conjunction with the fixed frame rate trigger acquisition of the industrial camera, it ensures that the raceway area of ​​adjacent frame images has a set proportion of overlap, realizing no blind spots and no repeated acquisition of the entire raceway.

10. The bearing raceway defect detection system based on image processing according to claim 8, characterized in that, The edge computing processing module is also equipped with a model self-updating unit, which is used to store false detection and missed detection samples that have been manually reviewed and corrected during the detection process. When the cumulative sample size reaches a set threshold, the incremental fine-tuning training of the defect classification network is automatically started, and the updated model parameters replace the original inference model.