A method for measuring the inner and outer diameters of a bearing
Patent Information
- Application Number
- CN202610361431.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-03-24
AI Technical Summary
When using a high-resolution camera to measure bearings, a full scan of the bearing is required to ensure measurement accuracy. However, a single high-resolution camera needs to scan the entire outer surface of the bearing. When a large number of bearings need to be inspected, this can lead to low inspection efficiency.
By acquiring data from the high-precision temperature sensor and the main temperature sensor of the bearing, the bearing detection temperature is adjusted to identify underexposed and overexposed areas, and the intensity of the lighting is adjusted accordingly. Panoramic image information from the bearing extraction camera is acquired to determine overlapping areas and stitching seams, and the fusion quality is evaluated. If the quality meets the standards, a camera-fused panoramic image is directly generated; otherwise, multi-resolution decomposition and smoothing optimization are performed. Based on the camera-fused panoramic image information, a coaxial light image is established, feature points are extracted and matched from different spectral images, and finally, a registered image cube is output, generating a defect probability map for analysis.
It achieves real-time monitoring and compensation of the measurement environment, eliminates the thermal equilibrium state of the image's geometry and optical system, improves detection efficiency, realizes seamless geometric and photometric integration of 360° panoramic images, eliminates the visibility of splicing seams, improves detection efficiency, and achieves high efficiency in bearing detection.
Smart Images

Figure CN122192185B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing measurement technology, specifically a method for measuring the inner and outer diameters of bearings. Background Technology
[0002] The core of bearing measurement is to ensure its dimensional accuracy. Depending on different measurement needs and scenarios, it can be divided into contact measurement and non-contact measurement. Contact measurement often uses micrometers and dial indicators to quickly measure basic dimensions. Non-contact measurement mainly uses optical measurement, which utilizes high-resolution cameras and telecentric optical systems to quickly and accurately measure parameters such as bearing diameter, roundness, and coaxiality. It is especially suitable for measuring complex geometries.
[0003] When using a high-resolution camera to measure bearings, a full scan of the bearing is required to ensure measurement accuracy. However, a single high-resolution camera needs to scan the entire outer surface of the bearing. When a large number of bearings need to be inspected, this can lead to low inspection efficiency.
[0004] In response to the existing problems, there is an urgent need to innovate on the existing basis. Summary of the Invention
[0005] The purpose of this invention is to provide a method for measuring the inner and outer diameters of bearings, in order to ensure measurement accuracy, as mentioned in the background art. In this case, a full scan of the bearing is required to ensure measurement accuracy, but a single high-resolution camera needs to scan the entire outer surface of the bearing. When a large number of bearings need to be inspected, this results in low inspection efficiency.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for measuring the inner and outer diameters of a bearing, comprising the following steps:
[0007] The bearing detection temperature is adjusted by acquiring data from the high-precision bearing temperature sensor and the main temperature sensor. By acquiring the collected bearing image information, underexposed and overexposed areas are identified, and the intensity of the lighting is adjusted according to the underexposed and overexposed areas.
[0008] The panoramic image information captured by the bearing extraction camera is obtained, and the overlapping area and stitching seam information are determined based on the number of panoramic image information captured by the bearing extraction camera. Based on the stitching seam information, the fusion quality is evaluated. If the index meets the standard, the camera-fused panoramic image is directly generated; otherwise, multi-resolution decomposition and smoothing optimization are performed.
[0009] The system establishes a coaxial light image based on the panoramic image information fused from the camera, extracts and matches feature points from different spectral images, and finally outputs the registered image cube.
[0010] Based on the registered image cube, a defect probability map is generated. Candidate regions are extracted through binarization and connected component analysis, and the final candidate set is obtained through non-maximum suppression. Residual features are extracted and multi-level features are fused on the candidate regions. After downsampling the original image, the bearing region is quickly located through threshold segmentation and circle fitting, and the bearing center coordinates, bearing inner diameter, and bearing outer diameter are output.
[0011] Compared with the prior art, the beneficial effects of the present invention are:
[0012] 1. This bearing inner and outer diameter measurement method achieves real-time monitoring and compensation of the measurement environment temperature through data fusion of a high-precision temperature sensor and a main sensor, suppressing bearing size measurement drift caused by thermal expansion and contraction. An automatic temperature adjustment mechanism ensures that the optical system operates in thermal equilibrium, eliminating the influence of thermal aberration on image quality. Multi-camera distributed acquisition combined with overlapping area optimization achieves seamless geometric and photometric integration of 360° panoramic images. Multi-resolution fusion and post-fusion processing eliminate the visibility of splicing seams, ensuring no visual breaks in the circumferential direction. The splicing quality is evaluated in real time, and when it does not meet the standards, multi-resolution decomposition and smoothing optimization are automatically triggered, forming a closed loop of detection, evaluation, and optimization, thereby improving the efficiency of bearing detection. Attached Figure Description
[0013] Figure 1 This is a flowchart of the bearing measurement process of the present invention. Detailed Implementation
[0014] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0015] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0016] Example 1
[0017] Please refer to this embodiment. Figure 1, the present invention provides a technical solution: a bearing inner and outer diameter measurement method, comprising the following steps: acquiring data information of a high-precision temperature sensor and a main temperature sensor of the bearing to adjust the bearing detection temperature; acquiring collected bearing image information to determine an underexposed area and an overexposed area, and adjusting the intensity of the illuminating lamp according to the underexposed area and the overexposed area; acquiring panoramic image information collected by a bearing extraction camera, and determining overlapping area and stitching seam information according to the number of pieces of panoramic image information collected by the bearing extraction camera; evaluating the fusion quality based on the stitching seam information, directly generating and integrating a camera-fused panoramic image if the index reaches the standard, otherwise performing multi-resolution decomposition and smoothing optimization, and establishing a coaxial light image according to the camera-fused panoramic image information; extracting and matching feature points in different spectral images, and finally outputting a registered image cube; generating a defect probability map according to the registered image cube, extracting candidate regions through binarization and connected domain analysis, and obtaining a final candidate set through non-maximum suppression; performing residual feature extraction and multi-level feature fusion on the candidate regions; downsampling the original image, then rapidly positioning the bearing region through threshold segmentation and circle fitting, and outputting the bearing center coordinates, the bearing inner diameter and the bearing outer diameter;
[0018] Acquiring data information of the high-precision temperature sensor and the main temperature sensor arranged outside the bearing comprises: executing a stability determination strategy according to the data information of the high-precision temperature sensor and the main temperature sensor, wherein the high-precision temperature sensor is arranged at the camera mounting position, the main temperature sensor is mounted at the center of the bearing placement area, the bearing is placed on the base of an air-floating vibration isolation platform, and an ambient temperature reference sensor is arranged on the base of the air-floating vibration isolation platform, all sensors are calibrated to ensure that the measurement consistency error is less than ±0.1°C; acquiring data information of the high-precision temperature sensors N1, N2...Nn and the main temperature sensor within the latest T minutes, dividing them equally into t time periods, calculating the temperature range in each time period respectively, which is obtained by subtracting the minimum value from the maximum value; determining the maximum temperature range among the t time periods according to the temperature ranges in the t time periods, and naming it as a fluctuation index; if the fluctuation index is less than A°C, acquiring data information of the high-precision temperature sensors N1, N2...Nn and the main temperature sensor within the latest 1.5T minutes, performing linear fitting with the data information of the main temperature sensor respectively, calculating the absolute value of the temperature change slope respectively, judging whether there is a continuous heating or cooling trend, and determining the average absolute value of the temperature change slope; if the fluctuation index is ≥A , executing a temperature compensation strategy, if the average absolute value of the temperature change slope < , acquiring the absolute values C1, C2...Cn of the differences between the data information of the high-precision temperature sensors N1, N2...Nn and the data information of the main temperature sensor respectively, naming the maximum absolute value of the differences among C1, C2...Cn as the uniformity factor; if the average absolute value of the temperature change slope ≥ ℃, execute the temperature compensation strategy, if the uniformity factor < To perform bearing image acquisition, during the bearing's rotation on the turntable, image acquisition is performed every 30° increment. One image is acquired at each position using coaxial light, ring light, and dark field light, based on the 30° increment. Each image resolution is set to 2 megapixels, and 36 images are acquired in total. If the uniformity factor is ≥ At ℃, a temperature compensation strategy is executed. This strategy includes: acquiring the target set temperature and main temperature sensor data; calculating the difference between the target set temperature and the main temperature sensor data; and if the difference is greater than zero, then... The temperature of the space is adjusted by increasing the rate by ℃ / minute, and in After a few minutes, the stability assessment strategy is re-executed. If the difference between the target set temperature and the main temperature sensor data is less than zero, then... The temperature of the space is adjusted by decreasing the rate of temperature reduction by ℃ / minute, and After 10 minutes, the stability determination strategy will be re-executed;
[0019] A high-precision sensor array, composed of high-precision temperature sensor information and a main temperature sensor, is used to monitor the thermal state of the optical system in real time, capturing lens thermal drift and support thermal deformation. The main temperature sensor directly monitors the temperature of the workpiece being measured, ensuring the accuracy of the temperature reference for bearing dimension measurement. By calculating the absolute value of the difference between each camera position sensor and the central sensor, a spatial temperature uniformity factor is established to ensure that the circumferential temperature gradient is minimal during the 360° rotation measurement of the bearing, eliminating measurement errors caused by elliptical deformation due to temperature unevenness. Fluctuation indicators are used to ensure that there are no sudden temperature disturbances (such as personnel approaching or equipment starting / stopping) within the most recent T minutes. Segmented statistics (divided into t time periods) are used to avoid... To prevent accidental peaks from masking overall stability and improve judgment robustness, the system identifies slow heating / cooling trends (such as air conditioning adjustment and equipment preheating) by calculating the absolute value of the temperature change slope, ensuring that the temperature is in thermal equilibrium and avoiding dimensional drift caused by thermal expansion during measurement. The uniformity factor verifies that there are no local hot or cold spots in the camera array and bearing area. A three-dimensional protection network is formed by fluctuation, trend, and uniformity. If any dimension exceeds the standard, compensation is triggered to prevent unqualified environments from entering image acquisition. Strict triggering conditions are implemented, and image acquisition is only performed when the conditions are met, fundamentally preventing acquisition with defects and avoiding geometric distortion caused by thermal drift in images acquired under unstable temperatures.
[0020] Determining underexposed and overexposed areas includes: acquiring the collected bearing image information and uniformly dividing each bearing image information into P blocks, each block being 100 pixels × 100 pixels in size (in this application, P is 192), with a 16-row × 12-column grid used for division; recording the number of pixels with grayscale values greater than the overexposure factor and the number of pixels with grayscale values less than the underexposure factor within each of the P blocks, and iterating through all blocks, setting the overexposure factor to 250 and the underexposure factor to 20; if the number of pixels with the overexposure factor in a block exceeds the total number of pixels in the block... If the number of pixels with an overexposure factor exceeds 5% of the total number of blocks, the block is marked as an overexposed area; if the number of pixels with both overexposure and underexposure factors in a block does not exceed 5% of the total number of blocks, a distributed acquisition strategy is executed; the coordinate information of all overexposed and underexposed areas is acquired, the image shooting position is recorded, a coordinate system is established based on the shooting position, and then the coordinate information is determined; the lighting information is determined based on the coordinate information of the overexposed and underexposed areas, and overexposure compensation and underexposure compensation strategies are executed respectively. Compensation strategies include: Overexposure compensation strategy: acquiring image information of the corresponding block of overexposed area and determining the degree of overexposure; if the overexposed area accounts for 5%-10% of the corresponding block of image information, reducing the lighting intensity by 10% and re-performing the bearing image acquisition operation; if the overexposed area accounts for 10%-20% of the corresponding block of image information, reducing the lighting intensity by 20% and re-performing the bearing image acquisition operation; if the overexposed area accounts for more than 20% of the corresponding block of image information, reducing the lighting intensity by 30% and re-performing the bearing image acquisition operation. Underexposure compensation strategy includes: acquiring image information of the corresponding block of underexposed area and determining the degree of underexposure; if the underexposed area accounts for 5%-10% of the corresponding block of image information, increasing the lighting intensity by 20% and re-performing the bearing image acquisition operation; if the underexposed area accounts for 10%-20% of the corresponding block of image information, indicating a lighting intensity of 30% and re-performing the bearing image acquisition operation; if the underexposed area accounts for more than 20% of the corresponding block of image information, reducing the lighting intensity by 40% and re-performing the bearing image acquisition operation.
[0021] This scheme achieves uniform exposure control across the entire field of view for 2-megapixel images (all 192 blocks meet grayscale distribution requirements) through a gridded fine-grained evaluation, hierarchical adaptive adjustment, and coordinate mapping control architecture. It ensures consistent signal-to-noise ratio and contrast across 36 acquired images under three illumination modes: coaxial light, ring light, and dark field light. This provides a high-quality, highly consistent, and highly reliable image data foundation for subsequent multispectral image stitching, defect identification, and sub-pixel-level geometric measurement. By dividing the image into grids, the 2-megapixel image is decomposed into independently evaluable local units, enabling pixel-level exposure quality monitoring. A dual-threshold statistical mechanism with an overexposure factor of 250 and an underexposure factor of 20 is employed. Based on the sensitivity of human vision (grayscale values <20 are difficult to distinguish details, while grayscale values >250 result in saturation distortion), a scientific threshold of 5% area ratio is set to avoid misjudging isolated noise points and ensure the evaluation reflects the true characteristics of the area. Utilizing an asymmetric adjustment ratio, based on the optical characteristic that supplemental lighting is easy but shading is difficult, the underexposure increase is greater than the overexposure decrease, ensuring rapid convergence to uniform exposure within a limited adjustment range.
[0022] Example 2
[0023] Please refer to this embodiment. Figure 1The distributed acquisition strategy includes: acquiring panoramic image information captured by the bearing extraction cameras, and determining the overlapping area based on the number of panoramic images captured by the bearing extraction cameras. This application uses four extraction cameras: camera 1 has a bearing shooting range of 0°-95°, camera 2 has a bearing shooting range of 90°-185°, camera 3 has a bearing shooting range of 180°-275°, and camera 4 has a bearing shooting range of 270°-5°. The overlap factor between camera 1 and camera 2 is the 90°-95° region, meaning the overlapping area is the area captured by two adjacent cameras. Furthermore, the overlap factor between camera 2 and camera 3 is the 180°-185° region, and the overlap factor between camera 3 and camera 4 is the 270°-275° region. The overlap factor between camera 4 and camera 1 is in the range of 0°-5°. Based on the scanned image information of the overlapping area, stable feature points are determined, and the pixel coordinates and scale information of each feature point are recorded. Stable feature points are those that can be reliably identified at different magnifications. By performing multiple blurring processes on the original overlapping area image, with the blurring degree gradually increasing each time, the gray values of the same location at different scale layers are compared to find points that have both maximum and minimum values at adjacent scale layers. These points remain stable when the scale changes and are thus considered candidate feature points. Points with low contrast, whose gray value changes are insignificant, and points with strong edge response, which are unstable along the edge direction, are removed. The remaining candidate feature points are the stable feature points. Centered on a feature point, the grayscale distribution of the region surrounding the stable feature point is extracted, and a feature point description vector is generated. A square region is delineated centered on the feature point, with the side length proportional to the feature scale; the larger the scale, the larger the region. For example, a feature scale of 3 results in a 16×16 pixel description region; a feature scale of 5 results in a 32×32 pixel description region. Within the description region, the vertical direction of the horizontal grayscale change of each pixel is calculated, and the gradient magnitude (degree of change) and gradient direction (direction of change) of each pixel are recorded. The 360-degree direction is divided into 8 sectors, and the cumulative gradient magnitude of all pixels within each sector is calculated to form the overall directional distribution characteristics of the description region. The description region is then evenly divided into 4×4=16 sub-regions. Each sub-region contains 4×4=16 pixels. Within each sub-region, an 8-directional gradient histogram is constructed to record the gradient distribution intensity in each direction. The histograms of the 16 sub-regions are then concatenated, resulting in 16×8=128 values for each sub-region, forming a 128-dimensional description vector, which is the feature point description vector. The feature point description vectors of adjacent overlapping regions are compared, and the similarity distance between them is calculated. For each feature point, the most similar candidate matching point in another image is found. X pairs of candidate matching points are selected, and the geometric transformation relationship is calculated. It is then checked whether removing X pairs of candidate matching points conforms to the geometric transformation relationship. If it does, it is named an interior point; otherwise, it is named an exterior point.Remove all outliers, retain only inliers, and name them reliable matching point pairs. Calculate the pixel coordinate deviation of each reliable matching point pair in the camera image, and calculate the average and maximum deviation values. If the average deviation value is >0.5 pixels or the maximum deviation value is >1 pixel, execute the homography matrix calculation strategy. If the average deviation value is ≤0.5 pixels or the maximum deviation value is greater than or equal to 1 pixel, execute the fusion quality judgment strategy. The homography matrix calculation strategy includes: obtaining reliable matching point pair information, selecting 2X reliable matching point pairs based on the principle of uniformly covering the entire overlapping area, and determining the projection transformation relationship between the two images. According to the projection transformation relationship, project the corner points of one image onto the other image, calculate the deviation between the actual matching point position and the transformed theoretical position, name it the reprojection error, adjust the calculation error, and re-execute the fusion quality judgment strategy.
[0024] A four-camera circular array achieves seamless 360° field-of-view stitching through a 5° overlap area (total overlap of 20°), eliminating motion blur and vibration sensitivity issues associated with single-camera rotating scans. The optical axes of all cameras converge at the bearing center, ensuring strictly consistent object distances and avoiding image scale differences caused by perspective distortion. Combined with static imaging, this fundamentally eliminates mechanical vibration and motion blur caused by the rotating stage, ensuring image clarity even at a high-speed acquisition rate of 4000 frames per second. This achieves millisecond-level acquisition, sub-pixel-level registration, and pixel-level seamless stitching of panoramic bearing images, providing a high-resolution, highly consistent, and highly reliable image data foundation for subsequent defect identification and geometric measurement. Feature point detection is based on local grayscale extrema. Due to the influence of bearing rotation angle, features from different shooting positions can be matched across images. The homography matrix is estimated by randomly sampling 4 pairs of points. Inner points with reprojection error <0.5 pixels are statistically analyzed, and outer points caused by reflection, oil stains, and defects are removed (the mismatch rate is reduced to <5%). Only the inner points are used to re-estimate the transformation matrix to ensure that the projection relationship is not affected by noise, providing a geometric basis for seamless stitching. The average deviation is ≤0.5 pixels: ensuring that the overall registration accuracy meets the sub-micron measurement requirements, with a maximum deviation ≤1 pixel, preventing serious local mismatch (such as mismatch in defective areas) from damaging the overall stitching quality, triggering automatic optimization to form a closed loop, and using multiple cameras to sample simultaneously to improve the bearing data acquisition speed.
[0025] The fusion quality assessment strategy includes: acquiring panoramic image information from the bearing extraction camera. Based on the panoramic image information, the seam information is determined, and the seam analysis area is formed by expanding W to both sides from the seam as the center. ; ,in, , Where W is the circumferential height, h is the axial height, W = 20 pixels, and k = 1, 2, 3, 4 represent the four seams. The width is the angle; since there are four cameras, four seams will appear. The analysis area is based on the seams. Calculate the horizontal gradient of each pixel. and vertical gradient And determine the gradient magnitude and gradient direction ; Set up the splice seam analysis area The grayscale function of the inner image is ; , , , The gradient reflects the degree and direction of grayscale changes in an image. In an ideal seamless image, the gradient at the seam should transition smoothly with the surrounding area. If there is misalignment or abrupt change in brightness, gradient anomalies will occur. The gradient amplitude is sampled along the normal direction of the seam to form a one-dimensional gradient curve. ,in To determine the coordinates across the seam and calculate the degree of gradient abrupt change. And statistically analyze the gradient mutation ratio. ; ;in, and These represent the gradient values at adjacent positions on both sides of the seam, with the seam normal direction perpendicular to the seam. ;in This is an indicator function; it returns 1 when the condition is met and 0 otherwise. The neighborhood average gradient To analyze the total number of pixels in the region, this metric counts the percentage of pixels where the gradient abrupt change at the seam exceeds 30% of the normal level. If this percentage is too high, it indicates a significant discontinuity or misalignment of gray levels at the seam. A pixel correspondence is established on both sides of the seam, assuming the number of pixels on one side of the seam is [not specified]. The pixels on the other side of the seam are And calculate the grayscale difference. Calculate the RMSE index and implement a comprehensive judgment strategy; ;in This is a geometric transformation function that maps the main camera coordinates to the secondary camera coordinate system; ;in, The total number of valid pixel pairs, For the first Differences in grayscale values between pixels; To represent the average grayscale difference, the RMSE (Mean Reflection Sequence) index is used to reflect the brightness consistency of corresponding pixels on both sides of the seam, thereby indicating the degree of fluctuation in the difference between the two pixels. The comprehensive judgment strategy includes: if... ≤30%, and ≤2 gray levels, record the final quality indicators. and This is integrated into a camera-fused panoramic image and multispectral image registration is performed; if >30% or >2 gray levels, perform multi-resolution decomposition operation; use dual indicators to ensure comprehensive evaluation of splicing quality from both visual perception and numerical accuracy dimensions. Gradient abrupt changes affect the visual visibility of seams, and gray level differences affect measurement accuracy.
[0026] Performing multi-resolution decomposition operations includes: S1, acquiring data on both sides of the center of the seam. and And perform adaptive weighted fusion. deal with; ;in, For weighting functions; ;in, At the center of the seam, a transition is performed towards both sides. A cosine function ensures the continuity of the first derivative, avoiding abrupt gradient changes. Outside the transition region, a single-sided image is used to maintain original sharpness. S2. Within the fused transition region, smoothing optimization is performed to force gradient continuity and eliminate residual seams. The optimization objective is: ;in, for Gradient field after Gaussian filtering To preserve the fidelity coefficients and control the deviation from the original fusion result, a first-order Gaussian filter is quickly calculated: Gaussian smoothing is performed only in the core region of the splice seam (width w / 2), which eliminates residual seams and minimizes computational cost. Adaptive to the width of the transition zone The standard deviation of the Gaussian kernel is automatically correlated with the width of the transition zone to ensure that the smoothing intensity matches the scale of the stitched area; S3, and verify the gradient continuity. and grayscale consistency ;
[0027] ; ;
[0028] like ,and Output And integrate them into a camera-fused panoramic image; if ,and Then, re-execute the resolution decomposition operation.
[0029] gradient continuity From a visual perception perspective, the evaluation ensures that there are no obvious grayscale jumps or misalignments at the seams, meeting the requirements of visual continuity for the human eye. From the perspective of numerical accuracy, the brightness fluctuation of the same-named pixels on both sides of the splicing seam is ensured to be minimal, meeting the grayscale consistency requirements of submicron level measurement. The joint judgment of dual indicators ensures that both visual naturalness and measurement accuracy are met simultaneously, avoiding failure modes where the seam is visible or the deviation can be measured. Compared with the complex process of traditional Laplacian pyramid + Poisson fusion (which requires multi-level decomposition and iterative solution), this fast solution reduces the processing time from hundreds of milliseconds to <50 milliseconds while maintaining similar fusion quality, meeting the real-time requirements of the production line.
[0030] Multispectral image registration operations include:
[0031] Acquire camera-fused panoramic image information and establish a coaxial light image based on the camera-fused panoramic image information. Ring light image and dark field light images Coaxial light image Utilizing its properties of penetrating oil films and highlighting the matrix contour, it provides a stable geometric reference for ring-shaped light imaging. and dark field light images By using cross-spectral registration, images with three different optical responses are precisely aligned to the same coordinate system, constructing an image cube. Spectral dimension index Establishing a standardized 3D data format lays the foundation for subsequent multispectral feature fusion, accurately identifying defect types from multimodal features, avoiding misjudgments based on single spectra, and selecting... As reference images, detection feature points are determined in the ring light image and the dark field light image; and scale-invariant detection feature points are detected in the coaxial light image, the ring light image and the dark field light image. And perform cross-spectral feature matching. Because the grayscale representation of the same physical point varies greatly under different light sources, normalized cross-correlation is used for matching. ;in, for or The location of the maximum NCC value within the search window is the matching point; this is achieved by subtracting the local mean. This process eliminates the absolute brightness differences between the three light sources, retaining only the correlation of grayscale variation patterns. It searches for the maximum NCC value within the search window, adapting to small-scale geometric deformations and uneven illumination. Compared to simple grayscale differences or Euclidean distances, NCC is invariant to linear illumination changes (overall brightness increase / decrease), ensuring accurate identification of corresponding feature points under different light sources. The model is then converted to a geometric transformation model and registered, with parameter solving and registration execution performed. Transformation model: Assume that the coaxial light and the target image satisfy an affine transformation. Parameter solution: Solve for 6 unknown parameters using at least 3 pairs of non-collinear detection feature points; Registration execution: Perform affine transformation and resampling on the target image; For the registered image, re-verify the detected feature points and establish correspondences, and calculate the deviation. Statistical error index ; ; ; Execute the detection feature point deviation judgment: if or Execute the transformation model optimization strategy; if ,and Store the projection transformation matrix and And record the registration error statistics. and And generate the registered image cube. And perform feature extraction strategies; ;in, For spectral dimension indexing; the transformation model optimization strategy includes: upgrading the transformation model to adopt projection transformation and performing normalized coordinate calculation; reducing the detection threshold (contrast threshold reduced from 0.03 to 0.015 to detect more weak features), and performing multi-scale dense sampling (uniform sampling across 5 scale layers to cover features of different sizes); optimizing the selection of detection feature points (sorted by response value, retaining the top 500 to ensure uniform distribution); and calculating the reprojection error of the selected detection feature points. , retain those that meet The model with the most in-pixel points is used, and the projection transformation model H is resolved using all in-pixel points to determine the minimum sum of squared reprojection errors. The optimal projection transformation model is determined through iterative processing. and the registered image And recalculate and Then, the deviation of the detection feature points is determined.
[0032] Upgrade Transformation Model Affine transformations assume that parallel lines remain parallel, but perspective differences exist in actual multispectral imaging. Therefore, a projection transformation (homography matrix) is used. Normalized coordinate calculation; ; The iterative process involves randomly selecting 4 pairs from a large number of matching points (projection transformation requires 8 constraints) to solve the current... Estimate and calculate the reprojection error for all points. ; And count the interior points ( (pixels), retain the model with the most interior points, and re-estimate using all interior points. After eliminating outlier interference, the system uses multi-scale detection and RANSAC to remove outliers. Even with oil stains, surface defects, and local occlusion, the system can still robustly estimate the correct geometric transformation relationship, achieving a registration success rate of >99%. The goal is to minimize the sum of squared reprojection errors. And after iterative updates; ;in, The iterative update formula is: ,in Let be the acobian matrix, and be the partial derivatives of the error with respect to the parameters. Let be the error vector, representing the reprojection error of all points. The damping factor controls the convergence characteristics. Let be the identity matrix, satisfying Stop iteration after any condition is met, and output the projection transformation model. and the registered image And recalculate and By reducing the registration error to 0.3-0.5 pixels, precise spatial alignment is provided for subsequent I-type defect identification and subpixel edge localization. This scheme achieves subpixel-level accurate registration (error <0.5 pixels) of three types of images—coaxial light, ring light, and dark field light—through a complete technical chain including NCC cross-spectral matching, 6-parameter affine initial matching, 8-parameter projection refinement, RANSAC robust estimation, nonlinear optimization, and dual precision verification. It constructs a three-dimensional image cube, providing a multimodal, high-precision, and robust data foundation for subsequent defect identification.
[0033] Feature extraction strategies include: obtaining the registered image cube. ,(in (corresponding to coaxial light, ring light, and dark field light respectively), for each input channel Independently perform two-dimensional spatial convolution ; ;in, for Each channel uses a dedicated 3×3 convolutional kernel, and the output feature map has the same number of channels as the input, both being 3 channels. This step only applies to the spatial dimension. Sliding upwards preserves the characteristic patterns of coaxial light, ring light, and dark field light without mixing information from different spectral channels; it also performs two-dimensional spatial convolution. The output undergoes a 1×1 convolution to achieve cross-spectral channel information integration. ; ;in The point convolution weight matrix is... The number of output channels is 32. The 1×1 convolution linearly combines the features of the three light sources without expanding the spatial receptive field, and learns multispectral correlation patterns such as coaxial dark light + ring light + dark field light spot = burrs. While reducing the amount of computation, compared with the feature mixing of standard convolution, the decoupled design allows the network to explicitly learn to extract single-spectral features first and then discover cross-spectral correlations, which improves the interpretability and accuracy of defect identification.
[0034] Cross-spectral channel information integration Extracting high-level semantic feature maps The composite responses of all pixels within a 32×32 neighborhood of the original image and the three light sources are aggregated to form an abstract semantic representation of the probability of defects. This representation is then compressed into a feature vector using global average pooling. Each dimension encodes statistical characteristics across the spectrum and across space; The probability of defect existence is calculated and output by a lightweight fully connected layer. ; The defect probability map is determined by mapping the probability range to a sigmoid function. ; ;when hour, (High confidence defect); when hour, (High confidence normal); when hour, (Decision Boundaries);
[0035] A probability heatmap with the same spatial resolution as the input image is constructed, where each pixel value represents the likelihood probability of a defect at that location. This provides a continuous confidence basis for subsequent region selection. The mapping from high-level semantics to pixel-level probability achieves a synergy between global understanding and precise local localization, grasping both the overall characteristics of the defect and pinpointing its boundaries to the pixel level. Based on the defect probability map... Generate a binary mask ; ;in This is an indicator function; it returns 1 if the condition is met, and 0 otherwise. To improve recall, it is better to have false positives than false negatives, ensuring that over 95% of real defects are captured; for binary masks Execute connected component labeling algorithm Extract the set of connected components Pixel area: Equivalent diameter: ;in Set the area to 100 pixels (approximately 10×10 pixels) to filter out noise points. Set to 5 pixels to exclude spurious responses that are too small; for the set of connected components Nonmaximum suppression Retain the region with the highest local probability to generate a candidate region set. ; ;in To and Intersection and Union The neighborhood set is used to retain the candidate region with the highest probability among overlapping candidate regions, ensuring that each physical defect corresponds to only one detection box, avoiding subsequent duplicate calculations and result conflicts. Cross-Union Ratio (CUI) is used for judgment, relying on geometric overlap rather than simple distance to adapt to the clustering of defects of different shapes. The transformation from probability map to candidate region set achieves a balance between recall and precision, outputting a high-quality candidate set for fine-grained classification. The filtered candidate region set... Include Each region has a potential defect area. bounding box The description clearly identifies the location range of defects in the circumferential and axial directions of the bearing, supports subsequent local image patch extraction (224×224 or higher resolution), and realizes a two-level architecture from coarse localization to fine classification. It achieves high-speed (millisecond level), high-precision (pixel level), and high-recall (>95%) initial screening of bearing defects, providing a limited number of reliable and accurately located candidate regions for subsequent fine classification, which significantly improves the efficiency and accuracy of the overall detection system.
[0036] Based on the candidate region set Determine the input feature map ; ;in The size of the candidate region after initial screening is 224×224. This refers to the number of spectral channels; based on the feature map. Perform residual feature processing And extract multi-level features. Perform feature pyramid pooling fusion ; ; ; The convolution kernels are 1×1, 3×3, and 1×1, respectively, to achieve a bottleneck structure of "compression-convolution-dilation" and skip connections. Direct addition forms a gradient highway, alleviating the gradient vanishing problem in deep networks (50 layers). Each residual block outputs... With input They have the same spatial dimensions, making them easy to stack; ;
[0037] It integrates multi-level features, taking into account both small defects (such as fine lines) and large defects (such as large-area impacts), and performs average pooling on each channel. ,Will Spatial information is compressed into a scalar and then adaptively weighted. and output channel weights ; ;in For feature map In the passage Location activation value, Can be regarded as a channel Global descriptors, such as A high level indicates a strong overall response of the coaxial optical channel, but may also indicate a high reflectivity defect. ;in, Compression ratio , , restore dimensions For the Sigmoid function, the output is... Utilizing channel weights By learning the importance of channels such as the sensitivity of dark-field light to scratches and the insensitivity of coaxial light to oil stains, the system automatically increases the weight of key spectral channels and suppresses redundant channels. Compared with non-attention mechanisms, this improves defect classification accuracy by 15-20%, especially significantly improving recall for low-contrast defects (such as minor scratches).
[0038] Using channel weights For the original feature map Perform channel-by-channel weighting and output. ; According to the output Then perform global average pooling and output Logits. Global average pooling: Fully connected classification layer: ;
[0039] Logits The output will be Logits. Convert to probability distribution ; ;satisfy ,and ; Gao: The model considers the area to be highly likely to be a scratch. Gao: The model considers the region to be defect-free, and the "sharpness" of the probability distribution reflects the model's degree of confidence; the candidate region is selected by taking the probability distribution pk with the highest posterior probability. confidence level ; ; The probability distribution is peaked, with one category having a probability close to 1 and the rest close to 0, indicating a high degree of confidence in the model. The probability distribution is flat, with each category's probability close to 1 / 5 = 0.2, indicating model ignorance; based on candidate regions... confidence level Output the category label ; ; Category labels The classification structure is mapped to the pixel-level space to form a binary mask. , ; ; The pixel was determined to be a certain type of defect (scratches, bumps, burrs, or oil stains). The pixel belongs to either a normal region or the background; the mask spatial resolution is consistent with the original image to ensure pixel-level correspondence; the resulting binary mask... Perform opening operation Eliminate isolated noise points; ;in It is a 3×3 structuring element. Indicates corrosion. Indicates dilation; obtains an image cube. And perform downsampling to obtain ;
[0040] Downsampling the original image to a lower resolution significantly reduces computation while preserving low-frequency information of the overall bearing contour. This reduces computational load and enables real-time localization of the bearing region. The processed image... Perform full threshold segmentation and output. ; , Based on Otsu's automatic thresholding method, the bearing is separated from the background, where The inter-class variance is used to optimally separate the bearing from the background. This adaptively determines the optimal segmentation threshold without manual adjustment, adapting to the grayscale differences of bearings made of different materials (steel / ceramic / coated). Perform morphological closing operation and output. ; Filling holes, broken connections, among which The structural element is circular with a radius of approximately 5 pixels to ensure that the complete bearing contour is extracted through connected component analysis, avoiding fragmentation of the region caused by local occlusion; the output of the morphological closing operation... Perform connected component analysis and extract the largest connected component. ; For the largest connected component boundary points Perform fast circle fitting;
[0041] Output the bearing center coordinates bearing inner diameter and bearing outer diameter Edge region mask This provides prior geometric constraints for subsequent defect identification, limits the search range, and reduces background noise interference; ;in, Pixels (edge bandwidth at coarse resolution), based on edge region mask Extract any pixel Calculate its distance to the edge region Shortest Euclidean distance ; This distance transformation map labels each pixel with "how far from the edge," used to determine whether a defect is near a key measurement area; the confidence score Cj is obtained, and its region-level confidence score is mapped to pixel-level confidence score to generate a pixel-level confidence map. ; According to the binary mask Pixel-level confidence map Edge area mask and shortest Euclidean distance Weights are assigned and a weighted graph is generated. ;Condition 1. If ,but When the defect mask coincides with the bearing edge, it indicates that the defect directly disrupts the measurement baseline (e.g., a burr on a chamfer). In this case, the edge grayscale distribution is severely distorted, and the confidence level must be reduced to the maximum extent (weight 0.3) to avoid mistaking the defect boundary for the true dimension; Condition 2, if ,but The confidence level is in the middle range, and the model hesitates between "scratches" and "oil stains." This uncertainty means that the area may be a rare type of defect or a complex mixture of defects. A conservative strategy is to reduce the weights and rely on geometric consistency constraints rather than single-pixel information. Condition 3: If ,but ,in Even if the defect does not directly contact the edge, the point spread function (PSF) of the optical system will cause the edge grayscale profile to be "tailed" and contaminated. A weight of 0.5 indicates "half-convinced"—retaining some information for continuity constraints but reducing its pull on the calculation of the circle center; Condition 4: If conditions 1, 2, and 3 are not satisfied, then... Pixels far from defects, with clear confidence levels, and not in edge regions have completely reliable gradient information; a weight of 1.0 ensures that these regions dominate the final geometric fitting result. For the generated... Perform Gaussian smoothing to generate an optimized weight map. ; This scheme achieves high-precision identification (pixel-level confidence), efficient geometric positioning (millisecond-level coarse detection), and robust geometric measurement (weighted circle fitting) of bearing defects through a complete technical chain from multi-scale fine classification to downsampling coarse positioning, and then from pixel-level confidence to four-layer conditional weight allocation and Gaussian smoothing optimization. It ensures that even under harsh working conditions with surface defects (scratches, bumps, burrs), it can still maintain sub-micron-level inner and outer diameter measurement accuracy. It should be noted that in the embodiments, all I[⋅] are indicator functions, and the output is 1 when the condition is met, and 0 otherwise. All ∧ represent AND, that is, all conditions need to be met. All ∨ represent OR, that is, any one of the conditions needs to be met.
[0042] Example 3
[0043] Please refer to this embodiment. Figure 1 Obtain image grayscale And perform smoothing preprocessing; smoothing preprocessing includes: by adjusting the image grayscale... Perform Gaussian convolution to output a noise-suppressed grayscale image. ; ,in The Gaussian kernel is used to control the smoothing intensity; the initial Gaussian kernel is used. Based on the calculated noise-suppressed grayscale image Recalculate the weighted graph Gradient magnitude gradient direction And perform weighted suppression processing. ; , It is 1.0. for At the same time, maintain the original gradient, fully trust the region, and classify the region as a normal region; When it is 0.5, It is 0.5 The time gradient is halved, so use with caution. The region type is the defect proximity zone. When it is 0.3, It is 0.3 Severe suppression, near elimination, region type is defect coverage area, weight map generated through pre-detection. The gradient in the defect region is nonlinearly suppressed (weight 0.3) or buffered and reduced (weight 0.5).
[0044] According to weighted suppression processing As a result, for the weighted graph Perform local weight adaptive adjustment of high threshold and low threshold ; Normal area: , Standard value; Defect proximity area: , Improved by 2 times; Defect coverage area: , This represents a 3.3-fold improvement; in defect areas, the significant increase in the threshold makes even the original gradient... Stronger, weighted It is still difficult to reach the threshold. This is equivalent to building a dynamic firewall around the defect to prevent false edges from entering the candidate set. The gradient contribution of the defect region is reduced to 30%, the probability of false edges entering the candidate set is significantly reduced, the signal-to-noise ratio is improved by about 3.3 times, and the system automatically adjusts the detection sensitivity according to the confidence level, realizing fine detection of good areas and coarse filtering of bad areas without the need for manual parameter adjustment; the connection angle is also affected. Using quantification formulas The measurements are taken in the horizontal, vertical, 45°, and 135° directions. Along the gradient direction Compare neighboring pixels
[0045]
[0046] in According to With a defined search step size, NMS ensures that the edge width is a single pixel, eliminating the coarse edge effect and providing accurate positional information for subsequent geometric fitting. It also eliminates the geometric center offset caused by multi-pixel wide edges and provides accurate positional coordinates for subsequent least-squares circle fitting.
[0047] Based on neighboring pixels High threshold and low threshold Perform dual threshold determination and output the determination result. ; And determine the result based on the output. It then performs edge connectivity rule processing and outputs the analysis results. Using 8-connectivity analysis, weak edges are connected to strong edges:
[0048]
[0049] The "dual-threshold" mechanism of the hysteresis thresholding method allows weak edges to be detected at low thresholds, but they are only preserved if they are connected to deterministic strong edges. Combined with adaptive weights, this ensures that even if defect region edges are suppressed, as long as normal region edges are continuous, a complete contour can still be formed through connectivity propagation. This transforms defect or normal region classification into a spatial attention mechanism similar to traditional image processing algorithms, enabling intelligently guided precision measurement, particularly suitable for automated quality inspection of highly reflective metal surfaces (bearings, precision shaft parts). (The last sentence appears to be incomplete and possibly refers to obtaining category labels.) The classification structure is mapped to the pixel-level space to form a binary mask. For forming a binary mask Take its supply set And statistically analyze edge continuity The system only counts the edge continuity of non-defect areas, improving the accuracy of fracture rate statistics to over 95%, avoiding false re-detection instructions caused by defect location, reducing invalid algorithm iterations by about 30-40%, and improving production line cycle stability. ,in, The binary image of candidate edges after weighted detection; Non-defect area indication function; Only pixels that are detected as edges but are also classified as normal are retained. Through set intersection operations, the system actively "masks" defective areas. Edge pixels. If the defect is located exactly on the bearing contour, the resulting edge break will not be included in the breakage rate statistics, thus avoiding misjudgment as "edge extraction algorithm failure" and triggering unnecessary re-detection;
[0050] Based on edge continuity Calculate the fracture rate And evaluate edge width An automatic parameter adjustment mechanism with dual constraints of fracture rate and edge width is established; ideally, the bearing edge should be a complete closed curve. In fact, it was extracted from the non-defect area. Independent edge segment: , Perfectly continuous, a single closed curve; Minor breakage (such as due to partial obstruction) is acceptable; Severe fragmentation necessitates adjusting the Canny threshold and re-detecting; edge width evaluation, theoretically, the ideal edge should be a single pixel wide. Actual measurement of edge pixel expansion in the normal direction: ,in For the first The non-zero width of the grayscale value of each edge pixel along the gradient direction. This represents the total number of edge pixels. Ideal single-pixel edge, with optimal sharpness; Slightly blurry, within acceptable range; Severe defocusing or over-smoothing requires checking the optical system or reducing the Gaussian smoothing parameter. The calculated fracture rate is based on the calculated fracture rate. and edge width And perform optimization judgment;
[0051] , and Gaussian kernel To achieve refined iterative optimization, from wide edges to reduced Zero-human-intervention adaptive parameter optimization avoids traditional trial-and-error parameter tuning, improving deployment efficiency by over 60% and ensuring that each image is in the optimal detection parameter state; if it does not meet the requirements... If no action is needed, then no action is required; based on the analysis results... Extract all closed contours ; Based on all closed contours Determine the closed contour ordered set ; ordered sets Convert to direction chain code sequence ; According to the chain code sequence Inversely deduce ordered coordinate sequence And based on the ordered coordinate sequence Arranged clockwise, an ordered sequence of edge points is obtained. ; ,in For direction Corresponding coordinate offset:
[0052]
[0053]
[0054] Ordered edge point sequence Take three consecutive points , , And calculate the local radius of curvature. ; ,in, , the square of the forward chord length; The square of the backward chord length; The square of the chord length across the point; and based on the local radius of curvature. Determine the radius of curvature ; , ( ): Approximately a straight line, a normal contour segment; Smaller Larger: sharp bends, possibly due to chamfering or burrs; depending on the local radius of curvature. Binary mask Extracting the set of outliers , ,in, The continuous curvature length of the i-th outlier point For curvature threshold, To determine the minimum effective burr length; set the anomaly points. From an ordered sequence of edge points Remove from the middle to form a gap, and then apply pressure to both ends of the gap. and And the nearest normal point, the best-fit circular arc ; According to the radius of curvature and the best arc The center of the circle is determined using the least squares method. and radius By eliminating the contamination of overall geometric parameters (roundness, diameter) by local manufacturing defects (burrs, bumps), the measurement repeatability accuracy is improved by more than 50%, ensuring that the obtained profile is the ideal design profile rather than a defect-perturbed profile. Furthermore, by combining chain code ordering with least squares, high-precision geometric measurement is achieved. The clean data after outlier removal, combined with least squares circle fitting, improves the resistance to outlier interference by 3-5 times. Even in noisy or partially occluded scenarios, it maintains sub-pixel (<0.3 pixels) fitting accuracy. It should be noted that, based on the radius of curvature... and the best arc The center of the circle is determined using the least squares method. and radius It is only necessary to determine the radii of curvature of the outer and inner edges of the bearing separately. and the best arc This allows us to determine the bearing's inner and outer diameter parameters.
[0055] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for measuring the inner and outer diameters of a bearing, characterized in that, comprising the following steps: acquiring high-precision temperature sensor data information and main temperature sensor data information of the bearing to adjust the bearing detection temperature, determining an underexposed area and an overexposed area by acquiring collected bearing image information, and adjusting the intensity of the illuminating lamp according to the underexposed area and the overexposed area; acquiring panoramic image information collected by a bearing extraction camera, determining overlapping area and stitching seam information according to the quantity of the panoramic image information collected by the bearing extraction camera, evaluating fusion quality based on the stitching seam information, directly generating and integrating a camera-fused panoramic image if the index reaches the standard, otherwise performing multi-resolution decomposition and smoothing optimization; establishing a coaxial light image according to the camera-fused panoramic image information, extracting and matching feature points in different spectral images, and finally outputting a registered image cube; generating a defect probability map according to the registered image cube, extracting candidate regions through binarization and connected domain analysis, obtaining a final candidate set through non-maximum suppression, performing residual feature extraction and multi-level feature fusion on the candidate regions, rapidly positioning the bearing region through threshold segmentation and circle fitting after downsampling the original image, and outputting the bearing center coordinates, the bearing inner diameter and the bearing outer diameter; acquiring high-precision temperature sensor data information and main temperature sensor data information arranged outside the bearing comprises; executing a stability determination strategy according to the high-precision temperature sensor data information and the main temperature sensor data information: acquiring data information of high-precision temperature sensors N1, N2...Nn and main temperature sensor data information within the latest T minutes, dividing them equally into t time periods, and respectively calculating the temperature range in each time period; determining the maximum temperature range among the t time periods according to the temperature ranges in the t time periods, and defining it as a fluctuation index; if the fluctuation index < A℃, acquiring data information of high-precision temperature sensors N1, N2...Nn and main temperature sensor data information within the latest 1.5T minutes, performing linear fitting with the main temperature sensor data information respectively, respectively calculating the absolute value of the temperature change slope, and determining the average absolute value of the temperature change slope; If volatility index ≥ A Implement a temperature compensation strategy; If the absolute value of the slope of the average temperature change is < The absolute values C1, C2, ..., Cn of the difference between the data information of the high-precision temperature sensors N1, N2...Nn and the data information of the main temperature sensor are obtained respectively. The absolute value of the largest difference among C1, C2...Cn is named the uniformity factor. If the absolute value of the slope of the average temperature change is ≥ ℃, execute temperature compensation strategy; If the uniformity factor < Perform bearing image acquisition operations; If uniformity factor ≥ ℃, execute temperature compensation strategy; the temperature compensation strategy comprises: acquiring a target set temperature and main temperature sensor data information, and calculating the difference value between the target set temperature and the main temperature sensor data information; If the difference between the target set temperature and the main temperature sensor data is greater than zero, and by using... The temperature of the space is adjusted by increasing the rate by ℃ / minute, and in After 10 minutes, the stability determination strategy will be re-executed; If the difference between the target set temperature and the main temperature sensor data is less than zero, and by using... The temperature of the space is adjusted by decreasing the rate of temperature reduction by ℃ / minute, and After a few minutes, the stability determination strategy will be re-executed.
2. The bearing inner and outer diameter measurement method according to claim 1, characterized in that: determination of the underexposed area and the overexposed area comprises: acquiring the collected bearing image information, and evenly dividing each piece of bearing image information into P blocks; respectively recording the number of pixels with a gray value greater than the overexposure factor and the number of pixels with a gray value smaller than the underexposure factor in the P blocks, and traversing all the blocks; if the number of pixels corresponding to the overexposure factor in a block exceeds 5% of the total number of pixels of the block, marking the block as an overexposed area; if the number of pixels corresponding to the underexposure factor in a block exceeds 5% of the total number of pixels of the block, marking the block as an underexposed area; if neither the number of pixels corresponding to the overexposure factor nor the number of pixels corresponding to the underexposure factor in a block exceeds 5% of the total number of pixels of the block, executing a distributed acquisition strategy; respectively acquiring coordinate information of all overexposed areas and underexposed areas, determining illuminating lamp information according to the coordinate information of the overexposed areas and the underexposed areas, and respectively executing an overexposure compensation strategy and an underexposure compensation strategy; the overexposure compensation strategy comprises: Obtain the image information of the corresponding block in the overexposed area and perform an overexposure degree determination; If the overexposed area accounts for 5%-10% of the corresponding block image information, reduce the lighting intensity by 10% and re-execute the bearing image acquisition operation; If the overexposed area accounts for 10%-20% of the corresponding block image information, reduce the lighting intensity by 20% and re-execute the bearing image acquisition operation; If the overexposed area accounts for more than 20% of the corresponding block image information, reduce the lighting intensity by 30% and re-execute the bearing image acquisition operation; Underexposure compensation strategies include: Obtain the image information of the corresponding block in the underexposed area and perform an underexposure degree determination; If the underexposed area accounts for 5%-10% of the corresponding block image information, increase the lighting intensity by 20% and re-execute the bearing image acquisition operation; If the underexposed area accounts for 10%-20% of the corresponding block image information, a prompt will be made indicating that the lighting intensity is 30%, and the bearing image acquisition operation will be re-executed; If the underexposed area accounts for more than 20% of the corresponding block image information, reduce the lighting intensity by 40% and re-execute the bearing image acquisition operation.
3. The bearing inner and outer diameter measurement method according to claim 2, characterized in that: Distributed data collection strategies include: Acquire panoramic image information captured by the bearing extraction camera, and determine the overlapping area based on the number of panoramic images captured by the bearing extraction camera; Based on the image information of the overlapping region, stable feature points are determined, and the pixel coordinate position information and scale information of each feature point are recorded; Centered on each stable feature point, extract the gray-level distribution of the region surrounding the stable feature point and generate a feature point description vector; By comparing the feature point description vectors of adjacent overlapping regions, the similarity distance between the feature point description vectors is calculated, and the most similar candidate matching point in another image is found for each feature point; Select X pairs of candidate matching points, calculate the geometric transformation relationship, and check whether removing X pairs of candidate matching points still conforms to the geometric transformation relationship; If it matches, name it an interior point; If it does not conform, name it an external point; Remove all outer points, keep only the inner points, and name them as reliable matching point pairs; Calculate the pixel coordinate deviation of each reliable matching point pair in the camera image, and calculate the average deviation value and the maximum deviation value; If the average deviation value is greater than 0.5 pixels or the maximum deviation value is greater than 1 pixel, execute the homography matrix calculation strategy; If the average deviation is ≤0.5 pixels or the maximum deviation is greater than or ≤1 pixel, the fusion quality judgment strategy is executed; Homography matrix calculation strategies include: Acquire reliable matching point pair information, select 2X reliable matching point pairs with the principle of uniformly covering the entire overlapping area, and determine the projection transformation relationship between the two images; Based on the projection transformation relationship, the corner points of one image are projected onto another image. The deviation between the actual matching point position and the theoretical position after transformation is calculated and named as the reprojection error. The calculation error is adjusted, and the fusion quality judgment strategy is re-executed.
4. The bearing inner and outer diameter measurement method according to claim 3, characterized in that: Fusion quality assessment strategies include: Obtain panoramic image information from the bearing extraction camera. Based on the panoramic image information, the seam information is determined, and the seam analysis area is formed by expanding W to both sides from the seam as the center. ; Analysis of the seam area Calculate the horizontal gradient of each pixel. and vertical gradient And determine the gradient magnitude and gradient direction ; The gradient magnitude is sampled along the normal direction of the splice seam to form a one-dimensional gradient curve. ,in To determine the coordinates across the seam and calculate the degree of gradient abrupt change. And statistically analyze the gradient mutation ratio. ; Establish a pixel correspondence on both sides of the seam, and let the pixel on one side of the seam be denoted as . The pixels on the other side of the seam are And calculate the grayscale difference. Calculate the RMSE index and implement a comprehensive judgment strategy; The comprehensive judgment strategy includes: like ≤30%, and ≤2 gray levels, record the final quality indicators. and It integrates the camera-fused panoramic images and performs multispectral image registration. like >30% or >2 gray levels, perform multi-resolution decomposition operation; Performing multi-resolution decomposition operations includes: S1. Obtain from both sides of the center of the splice seam. and And perform adaptive weighted fusion. deal with; S2. In the transition region after fusion, perform smoothing optimization, force gradient continuity, and eliminate residual seams; S3, and verify gradient continuity. and grayscale consistency ; like ,and Output And integrate them into a camera-fused panoramic image; like ,and Then, re-execute the resolution decomposition operation.
5. The bearing inner and outer diameter measurement method according to claim 4, characterized in that: Multispectral image registration operations include: Acquire camera-fused panoramic image information and establish a coaxial light image based on the camera-fused panoramic image information. Ring light image and dark field light images ; choose As a reference image, detection feature points are determined in the ring light image and the dark field light image; and scale-invariant detection feature points are detected in the coaxial light image, the ring light image and the dark field light image. And perform cross-spectral feature matching The model is converted into a geometric transformation model and registered, and parameter solving and registration execution operations are performed. For the registered image, re-verify the detected feature points and establish correspondences, and calculate the deviation. Statistical error index ; Execute the detection feature point deviation judgment: like or Execute the transformation model optimization strategy; like ,and Store the projection transformation matrix and And record the registration error statistics. and And generate the registered image cube. And perform feature extraction strategies; Transformation model optimization strategies include: The upgraded transformation model adopts projection transformation and performs normalized coordinate calculation; Lower the detection threshold and perform multi-scale dense sampling to optimize the selection of detection feature points; And calculate the reprojection error of the detected feature points after screening. , retain those that meet The model with the most in-pixel points is used, and the projection transformation model H is resolved using all in-pixel points to determine the minimum sum of squared reprojection errors. The optimal projection transformation model is determined through iterative processing. and the registered image And recalculate and Then, the deviation of the detection feature points is determined.
6. The bearing inner and outer diameter measurement method according to claim 5, characterized in that, Feature extraction strategies include: Obtain the registered image cube ,in These correspond to coaxial light, ring light, and dark field light, respectively, for each input channel. Independently perform two-dimensional spatial convolution ; Two-dimensional spatial convolution The output undergoes a 1×1 convolution to achieve cross-spectral channel information integration. ; Cross-spectral channel information integration Extracting high-level semantic feature maps The vector is compressed into a feature vector using global average pooling. ; The probability of defect existence is calculated and output by a lightweight fully connected layer. ; The defect probability map is then determined by mapping the probability range to the sigmoid function. ; Based on defect probability map Generate a binary mask ; For binary masks Execute connected component labeling algorithm Extract the set of connected components For connected component sets Nonmaximum suppression Retain the region with the highest local probability to generate a candidate region set. .
7. The bearing inner and outer diameter measurement method according to claim 6, characterized in that: Based on the candidate region set Determine the input feature map ; Based on feature map Perform residual feature processing And extract multi-level features. Perform feature pyramid pooling fusion ; Perform average pooling for each channel ,Will Spatial information is compressed into a scalar and then adaptively weighted. and output channel weights ; Using channel weights For the original feature map Perform channel-by-channel weighting and output. ; According to the output Then perform global average pooling and output Logits. ; Logits will be output Convert to probability distribution ; By taking the region with the highest posterior probability from the probability distribution pk, the candidate region is selected. confidence level ; Based on candidate regions confidence level Output the category label ; Category Labels The classification structure is mapped to the pixel-level space to form a binary mask. , ; For the formed binary mask Perform opening operation Eliminate isolated noise points; Get Image Cube And perform downsampling to obtain ; and the processed results Perform full threshold segmentation and output. ; And the obtained Perform morphological closing operation and output. ; The output of morphological closing operation Perform connected component analysis and extract the largest connected component. ; For the largest connected component boundary points Perform fast circle fitting; Output the bearing center coordinates bearing inner diameter and bearing outer diameter Edge region mask ; Based on edge region mask Extract any pixel Calculate its distance to the edge region Shortest Euclidean distance ; Obtain the confidence score Cj, map its region-level confidence score to pixel-level confidence score, and generate a pixel-level confidence map. ; Based on binary mask Pixel-level confidence map Edge area mask and shortest Euclidean distance Weights are assigned and a weighted graph is generated. ; For the generated Perform Gaussian smoothing to generate an optimized weight map. .
8. The bearing inner and outer diameter measurement method according to claim 7, characterized in that: Obtaining image grayscale And perform smoothing preprocessing; Smoothing preprocessing includes: By analyzing image grayscale Perform Gaussian convolution to output a noise-suppressed grayscale image. ; Based on the calculated noise-suppressed grayscale image Recalculate the weighted graph Gradient magnitude gradient direction And perform weighted suppression processing. ; According to weighted suppression processing As a result, for the weighted graph Perform local weight adaptive adjustment of high threshold and low threshold ; Along the gradient direction Compare neighboring pixels Based on neighboring pixels High threshold and low threshold Perform dual threshold determination and output the determination result. ; And based on the output judgment result It then performs edge connectivity rule processing and outputs the analysis results. .
9. The bearing inner and outer diameter measurement method according to claim 8, characterized in that: Get by category tags The classification structure is mapped to the pixel-level space to form a binary mask. For forming a binary mask Take its supply set And statistically analyze edge continuity ; Based on edge continuity Calculate the fracture rate And evaluate edge width ; Based on the calculated fracture rate and edge width And perform optimization judgment; , and Gaussian kernel ; If not satisfied If so, no action is needed; Based on the analysis results Extract all closed contours ; Based on all closed contours Determine the closed contour ordered set ; Sorted sets Convert to direction chain code sequence ; Based on the chain code sequence Inversely deduce ordered coordinate sequence And based on the ordered coordinate sequence Arranged clockwise, an ordered sequence of edge points is obtained. ; Ordered edge point sequence Take three consecutive points , , And calculate the local radius of curvature. ; And based on the local radius of curvature Determine the radius of curvature ; Based on the local radius of curvature Binary mask Extracting the set of outliers Set of outliers From an ordered sequence of edge points Remove from the middle to form a gap, and then apply pressure to both ends of the gap. and And the nearest normal point, fit the best circular arc ; Based on radius of curvature and the best arc The center of the circle is determined using the least squares method. and radius .
Citation Information
Patent Citations
Rolling bearing manufacturing quality contribution degree evaluation method and system
CN118378955A
Multi-point measuring instrument and measuring method for measuring radial dimension of thin-wall bearing
CN120760618A
