A micro-fan bearing press-fit eccentricity detection method based on image processing

By employing polar coordinate transformation, a radial texture oscillation suppression model, and an illumination coupling correction factor, combined with the vector integration method, the problem of low eccentricity detection accuracy caused by metal turning marks and uneven illumination during the press-fitting of micro fan bearings is solved, achieving efficient and low-cost eccentricity detection.

CN121921315BActive Publication Date: 2026-07-03SUZHOU XINGKAISHENG INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU XINGKAISHENG INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-03-25
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In the press-fitting process of micro fan bearings, existing technologies suffer from low accuracy and high false detection rates due to interference from metal turning marks and uneven lighting, making it difficult to meet the production line's requirements for real-time performance and low cost.

Method used

By employing an image processing-based approach, and combining polar coordinate transformation, radial texture oscillation suppression model, and illumination coupling correction factor with vector integration method to calculate eccentricity, texture interference index and edge confidence are constructed to achieve high-precision eccentricity detection of micro fan bearings.

Benefits of technology

It effectively distinguishes machining noise from real edges, improves detection stability and accuracy, reduces computational complexity and cost, and meets the real-time and low-cost requirements of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921315B_ABST
    Figure CN121921315B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image processing, and particularly relates to a micro-fan bearing press-fitting eccentricity detection method based on image processing, which comprises the following steps: obtaining an overhead gray-scale image after press-fitting, performing polar coordinate transformation based on coarse positioning coordinates to obtain a polar coordinate panoramic development image; constructing a radial texture oscillation suppression model, calculating a texture interference index of a pixel by using gradient statistical features in a sliding window to distinguish a turning thread from a real edge; combining a light coupling correction factor and the texture interference index to calculate an edge confidence of the pixel, and adaptively compensating for light differences while suppressing texture interference; extracting a radial position corresponding to a maximum edge confidence under each angle, and calculating a final eccentricity vector by using a vector integration method. The application distinguishes the signal difference between a metal turning thread and a real physical edge, and solves the problem of detection difficulty caused by metal turning thread interference and uneven light.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method for detecting eccentricity during press-fitting of a miniature fan bearing based on image processing. Background Technology

[0002] Miniature cooling fans are widely used in the heat dissipation of electronic devices. Their assembly quality directly affects the performance and lifespan of the equipment. In automated assembly lines, the press-fitting process of the miniature fan bearing and bearing housing is one of the key steps. Press-fitting eccentricity refers to the misalignment of the physical inner hole center of the bearing with the reference outer circle center of the bearing housing. This can cause periodic whistling during high-speed fan operation, as well as increased vibration and shortened lifespan. Therefore, high-precision eccentricity testing of the press-fitted bearing is a necessary step to ensure product quality.

[0003] However, in actual production environments, the surfaces of miniature fan bearings and bearing housings often retain metal turning marks resulting from precision machining. These textures appear as high-density concentric rings in images, with grayscale gradient intensities often exceeding those of actual assembly edges. This easily leads traditional algorithms such as Hough circle transform or least squares fitting to mistakenly identify the textures as contours, resulting in incorrect center calculations. Furthermore, due to the limited field of view and the reflective properties of metal, press-fitted workpieces often exhibit micron-level tilt, resulting in extremely uneven reflection along the circumference. This creates lighting conditions where one side is overexposed while the other is underexposed, making it difficult for traditional methods based on global thresholds to simultaneously extract dark area edges and suppress bright area noise.

[0004] Existing technologies generally lack effective feature separation methods when dealing with scenarios involving complex textures and non-uniform lighting, making it difficult to accurately distinguish high-frequency texture noise from real physical edges. Although some high-end devices employ complex deep learning models for training and recognition, these models require high computational power, are costly to deploy, and require a large number of labeled samples, making it difficult to meet the real-time and low-cost requirements of production lines. Therefore, there is an urgent need for a method for detecting eccentricity in the press-fitting of micro fan bearings that can effectively resist interference from metal turning marks, adapt to changes in lighting, and is computationally efficient. Summary of the Invention

[0005] To address the issues of low accuracy and high false detection rate in the press-fitting eccentricity detection of miniature fan bearings caused by severe interference from metal turning marks and uneven illumination, this invention provides an image processing-based method for detecting eccentricity in the press-fitting of miniature fan bearings.

[0006] This invention provides a method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing, comprising: acquiring a top-view grayscale image of the press-fitted miniature fan bearing, and performing polar coordinate transformation based on the coarse positioning coordinates of the bearing housing to generate a polar coordinate panoramic unfolded image, wherein the horizontal axis of the polar coordinate panoramic unfolded image is angular coordinates and the vertical axis is radial distance coordinates; performing gradient calculation on the polar coordinate panoramic unfolded image, and constructing a radial texture oscillation suppression model based on the gradient statistical features within the radial sliding window, calculating the texture interference index of each pixel in the image, wherein the texture interference index is used to characterize the probability that a pixel belongs to a turning texture region; calculating the edge confidence of each pixel based on the texture interference index and an illumination coupling correction factor, wherein the edge confidence is negatively correlated with the texture interference index, and the illumination coupling correction factor is used to normalize and compensate for the brightness differences of different angle regions; extracting the radial position corresponding to the maximum edge confidence in each angle column of the polar coordinate panoramic unfolded image, and using the vector integration method to calculate the eccentricity vector of the closed contour formed by the radial positions corresponding to all angles relative to the coarse positioning coordinates, thereby obtaining the final press-fitting eccentricity detection result.

[0007] By employing the aforementioned technical solutions, a radial texture oscillation suppression model is constructed to calculate the texture interference index, distinguishing high-frequency oscillating machining noise from real physical edges, thus overcoming the limitation of traditional algorithms that misjudge contours due to texture interference. Simultaneously, the introduced illumination coupling correction factor can adaptively compensate for brightness differences in different angle regions, thereby balancing dark area edge extraction and bright area noise suppression, improving detection stability. Furthermore, the vector integral method used directly calculates the eccentricity, avoiding the complex iterative process of circle fitting, offering advantages over deep learning-based solutions such as high computational efficiency, low deployment cost, and no need for a large number of labeled samples.

[0008] Preferably, the texture interference index satisfies the following relationship:

[0009]

[0010] in, Representing coordinates Texture interference index at the location; Indicated by radius A radial sliding window centered on the center; Indicates relative to the center position The coordinate offset; Indicates the first in the window Radial gradient values ​​at each location; This represents the arithmetic mean of all radial gradient values ​​within the window. This indicates the number of times the radial gradient sign flips within the radial sliding window; It is the natural logarithm function; It is a natural constant; is the numerical stability constant.

[0011] By employing the above technical solution, and combining the gradient mean deviation and the number of gradient sign flips within the radial sliding window, accurate assessment of texture interference is achieved. This formula utilizes the frequent gradient direction flips and amplitude oscillations in the turned texture region to calculate a high texture interference index, while assigning extremely low index values ​​to true edges with unidirectional abrupt changes. This allows the algorithm to distinguish and suppress high-density concentric ring texture interference from a gradient statistical perspective, improving the accuracy of feature separation.

[0012] Preferably, the edge confidence satisfies the following relationship:

[0013]

[0014] in, Representing coordinates Marginal confidence at the point; Indicates the illumination coupling correction factor; This represents the absolute value of the radial gradient at the current point; Indicates the current angle The average grayscale value of the entire column of pixels; The basic luminance constant; Indicates texture penalty terms; This represents the texture suppression coefficient.

[0015] By employing the aforementioned technical solution, dividing the absolute value of the radial gradient by the illumination coupling correction factor achieves adaptive illumination normalization, ensuring reasonable signal intensity even at weak edges in shadow regions. Simultaneously, a texture penalty term based on the texture interference exponent is introduced. Leveraging the rapid decay characteristic of the exponential function, the edge confidence of textured regions is significantly suppressed to near zero. This dual mechanism works together to ensure that the generated edge confidence map effectively suppresses texture noise under strong light while clearly preserving true edges in weak light.

[0016] Preferably, the eccentricity vector satisfies the following relationship:

[0017]

[0018] in, Represents the eccentricity vector; Indicates the total number of sampling angles; For sampling point index; Indicates the first Each sampling angle; Indicates the angle The optimal edge radius value corresponding to the row index with the highest edge confidence; and For corresponding angles The trigonometric function values.

[0019] By employing the above technical solution, the final result is calculated using full-angle vector integration. By summarizing the sine and cosine projection values ​​of all sampled angles, global integration of edge position data is achieved. Compared to traditional circle center fitting methods based on a few points, this vector integration method fully utilizes all angular information, exhibiting significant statistical smoothing effects and effectively suppressing the interference of individual outliers or local errors on the overall result. Furthermore, this method can directly output the magnitude and direction of the eccentricity without needing to solve complex geometric equations, thus improving computational efficiency while ensuring result stability.

[0020] Preferably, after acquiring the top-view grayscale image of the micro fan bearing after press-fitting, the method further includes: downsampling the top-view grayscale image to filter out high-frequency machining texture interference on the surface; performing image binarization using the maximum inter-class variance method and combining morphological closing operations to eliminate light spots and holes caused by local reflections; calculating the centroid coordinates of the largest connected component using connected component analysis, and using the centroid coordinates as the coarse positioning coordinates; the polar coordinate transformation uses the coarse positioning coordinates as the pole, sets the maximum sampling radius, and maps the circular area into the rectangular polar coordinate panoramic unfolded image.

[0021] By adopting the above technical solution, this invention performs downsampling processing on the top-view grayscale image, which acts as a low-pass filter in the spatial domain, pre-smoothing and suppressing high-frequency metal machining texture interference, while improving computational efficiency. Combining the maximum inter-class variance method and morphological closing operation, it can effectively overcome the problems of light spots and holes caused by local reflections, ensuring the integrity of the bearing housing mask. Thus, the centroid coordinates, which serve as coarse positioning coordinates, can be accurately obtained using connected component analysis. Based on the polar coordinate transformation implemented by this coarse positioning coordinate, the complex circular contour is mapped into a rectangular polar coordinate panoramic unfolded image, and the concentric circle texture is transformed into parallel horizontal lines. This transforms nonlinear edge detection into simple linear column processing, laying a stable geometric foundation for subsequent signal separation and high-precision eccentricity detection using texture features.

[0022] Preferably, the gradient calculation specifically includes: convolving the polar coordinate panoramic unfolded image with the vertical direction kernel of the Sobel operator to obtain the first-order radial gradient value along the radial direction; the method for obtaining the number of times the gradient sign is flipped in the relation satisfied by the texture interference index is: traversing the gradient data in the radial sliding window and counting the number of times the product of two adjacent radial gradient values ​​is less than zero.

[0023] Preferably, extracting the radial position corresponding to the maximum edge confidence in each angle column of the polar coordinate panoramic unfolded image includes: traversing all angle columns of the polar coordinate panoramic unfolded image; for each angle column, comparing the edge confidence values ​​of all pixels in that column; and determining the ordinate of the pixel corresponding to the maximum value as the optimal edge radius value at that angle.

[0024] Preferably, the step of calculating the eccentricity vector of the closed contour formed by the radial positions corresponding to all angles relative to the coarse positioning coordinates using the vector integral method includes: calculating the sum of the projections of the optimal edge radius values ​​in the horizontal direction and the sum of the projections in the vertical direction for all angles; calculating the offset component of the center of the equivalent reference circle relative to the coarse positioning coordinates based on the sum; and calculating the magnitude of the offset component using the Pythagorean theorem to obtain the eccentricity vector.

[0025] Preferably, the method further includes: after calculating the eccentricity vector, determining whether the eccentricity vector exceeds a preset threshold; if it exceeds the preset threshold, determining that there is an eccentricity defect in the current micro fan bearing press-fit.

[0026] Preferably, the values ​​of the base brightness constant and the texture suppression coefficient are set based on the following: when the light intensity of the detection environment is low, resulting in poor overall image contrast, the value of the base brightness constant is increased to prevent noise points in the background area from generating artificially high edge confidence values; when dense machining textures are detected on the bearing surface, the value of the texture suppression coefficient is increased to utilize the rapid decay characteristics of the exponential function to compress the edge confidence of the machining texture area to a level close to zero.

[0027] The technical solution of the present invention has the following beneficial technical effects:

[0028] This invention constructs a radial texture oscillation suppression model that incorporates gradient fluctuations and zero-crossing features, enabling the separation of high-intensity machining texture noise from true edge signals. Simultaneously, it introduces an illumination coupling correction mechanism, dynamically adjusting gradient weights based on local average brightness to overcome extreme illumination differences in the micro-fan bearing press-fitting scenario. The entire calculation process is based on algebraic operations, eliminating the need for complex deep learning models. Furthermore, numerical stability is ensured through the introduction of denominator protection constants in the formula design, resulting in high computational efficiency and improved accuracy in production line inspection. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating an image processing-based method for detecting eccentricity in the press-fitting of a miniature fan bearing according to the present invention.

[0030] Figure 2This is a schematic diagram illustrating the gradient signal of the prior art under polar coordinates affected by turning marks in the present invention;

[0031] Figure 3 This is a schematic diagram illustrating the edge confidence waveform after processing by the radial texture oscillation suppression model in this invention;

[0032] Figure 4 This is a schematic diagram illustrating the eccentricity vector calculation results and detection effects in this invention. Detailed Implementation

[0033] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0034] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0035] This invention discloses a method for detecting eccentricity in the press-fitting of a miniature fan bearing based on image processing, referring to... Figure 1 This includes steps S1-S4:

[0036] S1. Obtain a top-view grayscale image of the micro fan bearing after press-fitting, and perform polar coordinate transformation based on the coarse positioning coordinates of the bearing housing to generate a polar coordinate panoramic unfolded image; the coarse positioning coordinates are the centroid of the bearing housing as the reference origin for this coaxiality test; the horizontal axis of the polar coordinate panoramic unfolded image is the angular coordinate, and the vertical axis is the radial distance coordinate.

[0037] In an optional embodiment, a top-down grayscale image of the micro fan bearing after press-fitting is first acquired using a 5-megapixel industrial camera mounted directly above the press-fitting station, in conjunction with a low-angle red ring light source. This low-angle red ring light source helps to highlight the surface contours of the inspected micro fan bearing and bearing housing and reduces direct reflections. Since the micro fan bearing may have shifted within the field of view, coarse positioning is required first. To overcome the interference of metal machining marks and non-uniform reflections on coarse positioning, the original image is first downsampled by a factor of 4. This downsampling process not only significantly improves the speed of subsequent processing but, more importantly, acts as a low-pass filter in the spatial domain, effectively smoothing and suppressing fine metal machining marks that exhibit high-frequency characteristics. Subsequently, the downsampled image is globally binarized using the Otsu's method. To address the issue of internal holes or edge breaks in the binarized image that may be caused by non-uniform illumination, morphological closing operations are further employed to perform morphological restoration on the binarized image, fusing the originally fragmented areas into a complete bearing housing mask. Based on this, and using connected component analysis, the coordinates of the centroid of the largest connected component, i.e., the entire bearing housing, are calculated. This coordinate system serves only as the reference origin for polar coordinate transformation and as the baseline origin for this coaxiality test; extremely high precision is not required.

[0038] Subsequently, using the centroid coordinates As the pole, a maximum sampling radius covering the outer edge of the bearing housing is set. The image of the circular region is mapped into a polar coordinate panoramic unfolded image distributed in a rectangular array. The horizontal axis of the polar coordinate panoramic unfolded image represents angular coordinates, and the vertical axis represents radial distance coordinates. In this polar coordinate panoramic unfolded image, the original edge of the circular ring is transformed into approximately horizontal straight lines, and the concentric machining marks detected by interference are also transformed into multiple parallel horizontal lines.

[0039] To more clearly illustrate the mapping process of polar coordinate panoramic unfolded images, the embodiments of the present invention will be explained by example below:

[0040] Assuming the resolution of the acquired image is The coarse positioning coordinates obtained after calculation are: The set maximum sampling radius Pixels. The width of the generated polar coordinate panoramic unfolded image is set to 360, corresponding to... to The angle range; the height of the generated polar coordinate panoramic unfolded image is set to 500, corresponding to... to The radius range of pixels. This mapping method aligns the horizontal axis of the polar coordinate panoramic unfolded image with the angular coordinates and the vertical axis with the radial distance coordinates. Each point on the annulus is mapped to a rectangular grid in the polar coordinate panoramic unfolded image, facilitating subsequent column processing.

[0041] Thus, by transforming the polar coordinates, the complex problem of circular contour detection is transformed into a simple linear edge detection problem, while the concentric circle texture is transformed into a horizontal line texture, providing a geometric basis for subsequent signal separation using texture features.

[0042] S2. Perform gradient calculation on the polar coordinate panoramic unfolded image, and construct a radial texture oscillation suppression model based on the gradient statistical features within the radial sliding window. Calculate the texture interference index of each pixel in the image. The texture interference index is used to characterize the probability that a pixel belongs to the turning texture region.

[0043] In an optional embodiment, the image is first unfolded along the vertical axis, i.e., the radial axis, of the polar coordinate panoramic view. Calculate the first-order radial gradient value Specifically, this can be obtained through convolution operations using the vertical kernel of the Sobel operator. Subsequently, to evaluate the difference between texture features and edge features, a texture interference index is constructed. This radial texture oscillation suppression model constructs a texture disturbance index. The high-frequency oscillation signal in the image is evaluated. For each coordinate in the image... The pixels, define a length of radial sliding window In the radial sliding window Statistical characteristics of the radial gradient calculated within the interior.

[0044] Texture disturbance index corresponding to radial texture oscillation suppression model The relation is:

[0045]

[0046] in, Representing coordinates The texture interference index at the location is used to characterize the probability that a pixel belongs to a machined texture region; Indicated by radius A radial sliding window centered on the center; Indicates relative to the center position The coordinate offset; Indicates radial sliding window Inner Radial gradient values ​​at each location; Indicates radial sliding window The arithmetic mean of all radial gradient values ​​within the range; Indicates radial sliding window The number of times the inner radial gradient sign flips, determined by traversing the radial sliding window. The radial gradient data within the range is obtained by counting the number of times the product of two adjacent radial gradient values ​​is less than zero; It is the natural logarithm function; It is a natural constant; This is a numerical stability constant to prevent computational overflow when the denominator is close to zero. If the background white noise generated by the image sensor is strong, the numerical stability constant should be increased. The value is used to suppress exponential fluctuations in ineffective regions.

[0047] To more clearly illustrate the texture interference index The function and calculation process of this invention are illustrated in this embodiment, which selects a local window from a column of a polar coordinate panoramic unfolded image for example calculation:

[0048] Assuming the radial sliding window length The five radial gradient values ​​within the current radial sliding window They are respectively: This represents a typical region of texture oscillation, where the gradient direction changes frequently.

[0049] The first step is to calculate the arithmetic mean of the radial gradient values ​​within the radial sliding window. :

[0050] .

[0051] The second step is to calculate the numerator in the relation. :

[0052] ;

[0053] The third step is to calculate the energy term in the denominator of the expression. :

[0054] ;

[0055] Assuming numerical stability constant The entire calculation process for the denominator is as follows: ;

[0056] The fourth step is to calculate the number of radial gradient sign flips. :

[0057] By traversing the data sequence To calculate the product of two consecutive numbers, for example... If the result is less than zero, it is counted as one flip. This continues, with the sign changing as follows: from positive to negative, from negative to positive, from positive to negative, and from negative to positive. A total of four flips occur, i.e. .

[0058] Step 5: Calculate the final result:

[0059]

[0060] Therefore, for the texture oscillation region, the index is a large positive number.

[0061] Conversely, if it is a true edge region, assuming the radial gradient sequence exhibits a single step change, its data sequence is as follows: In this case, the arithmetic mean The calculation result of the numerator term in the relation is The result of calculating the energy term in the relation is: The number of radial gradient sign flips Logarithmic terms The final calculated texture interference index It will be very small.

[0062] Thus, through the above calculation model, a high interference index can be assigned to the turning texture region that exhibits high-frequency oscillations, while an extremely low interference index can be assigned to the real edge region that exhibits unidirectional abrupt changes, thereby achieving effective evaluation and differentiation of image texture features.

[0063] S3. Calculate the edge confidence of each pixel based on the texture interference index and the illumination coupling correction factor determined based on the average brightness information of the pixel at the current angle; the edge confidence is used to characterize the probability that the pixel belongs to the real physical edge of the bearing inner hole; the edge confidence is negatively correlated with the texture interference index, and the brightness difference of different angle regions is normalized and compensated by the illumination coupling correction factor.

[0064] In one optional embodiment, due to the workpiece pressing tilt, the overall brightness of the polar coordinate panoramic unfolded image varies significantly at different angles. To eliminate the influence of uneven illumination on the detection results, an illumination coupling correction mechanism is introduced.

[0065] Marginal confidence The relation is:

[0066]

[0067] in, Representing coordinates Marginal confidence at the point; Indicates the illumination coupling correction factor; This represents the absolute value of the radial gradient at the current point; Indicates the current angle The average grayscale value of the entire column of pixels; The base brightness constant is set based on the background noise level of the image and the stability requirements of the numerical calculation. When the light intensity of the detection environment is low, resulting in poor overall image contrast, the base brightness constant should be increased. The value is set to prevent noise points in the background area from generating artificially high edge confidence values; Indicates texture penalty terms; This is the texture suppression coefficient, which is set based on the prominence of metal machining marks. This coefficient determines the texture interference index. The penalty for edge confidence should be increased when the machining texture on the bearing surface is extremely dense; the texture suppression coefficient should be increased. The value of is used to compress the edge confidence of the interference region to near by utilizing the rapid decay characteristic of the exponential function. The level.

[0068] To more clearly illustrate marginal confidence... The function and calculation process of this invention are illustrated in this embodiment, which selects two representative pixels from the polar coordinate panoramic unfolded image for example calculation:

[0069] Case A represents the interference points of turning marks under strong light:

[0070] Assume the absolute value of the radial gradient at this point The value is relatively high; the average gray value of the column containing this point is... Based on the texture interference index calculated in the previous step Assuming the fundamental luminance constant Texture suppression coefficient .

[0071] Substituting the relational expression, we obtain the marginal confidence level:

[0072]

[0073] As can be seen from the calculation results, although the original radial gradient value of the pixel is 40, the edge confidence is severely suppressed because it is identified as a texture feature, and the value is close to 0.

[0074] Case B represents the actual edge point within the shaded area:

[0075] Assume the absolute value of the radial gradient at this point The value is low; the average gray value of the column containing this point. It is located in a darker area; its texture interference index This is used to characterize that the point belongs to a true edge feature; at the same time, in order to maintain the consistency of contrast, the base brightness constant is... With texture suppression coefficient The values ​​of are all consistent with those in case A above.

[0076] Substituting the relational expression, we obtain the marginal confidence level:

[0077]

[0078] The calculation results show that although the original gradient absolute value of the pixel is 20, its edge confidence value is actually higher after illumination compensation and low texture penalty processing.

[0079] Thus, by combining illumination normalization and radial texture oscillation suppression models, this step can eliminate the interference caused by high-gradient pseudo-edges, while accurately extracting the true edge features in weakly lit areas, ultimately generating a clean and accurate edge confidence map.

[0080] S4. Extract the radial position corresponding to the maximum edge confidence in each angle column of the polar coordinate panoramic unfolded image. The radial position is the radial position of the actual physical edge of the bearing inner hole. The closed contour formed by the radial positions corresponding to all angles is the complete contour of the bearing inner hole. Calculate the eccentricity vector of the closed contour formed by the radial positions corresponding to all angles relative to the coarse positioning coordinates using the vector integration method to obtain the final press-fit eccentricity detection result.

[0081] In an optional embodiment, by traversing all angle columns of the polar coordinate panoramic unfolded image and comparing the edge confidence values ​​of all pixels in each column, the angles are... The ordinate of the pixel corresponding to the maximum value is determined as the optimal edge radius value. Based on this, the optimal edge radius value is calculated for all angles using the vector integral method. The sum of the projections in the horizontal and vertical directions is used to calculate the center of the equivalent reference circle relative to the coarse positioning coordinates. The offset component is determined, and the magnitude of the offset component is calculated using the Pythagorean theorem to obtain the eccentricity vector. .

[0082] Eccentricity vector The relation is:

[0083]

[0084] Represents the eccentricity vector; This indicates the total number of sampling angles. Its setting is based on the balance between detection accuracy and processing speed. If the production line requires high repeatability for eccentricity detection, it should be increased. The value is used to increase the number of sample points involved in the integration calculation; For sampling point index; Indicates the first Each sampling angle; Indicates the angle The optimal edge radius value corresponding to the row index with the highest edge confidence represents the radial position coordinates of the real assembly edge identified after processing by the radial texture oscillation suppression model. and For corresponding angles The trigonometric function values; The X-axis component; This is the Y-axis component.

[0085] To more clearly illustrate the eccentricity vector The function and calculation process of this invention will be illustrated by the following examples in this embodiment:

[0086] To simplify the demonstration, assume a total sampling angle. Sampling point index From 1 to 4, the corresponding sampling angles They are respectively Extracted edge radius They are respectively: This numerical difference indicates that the bearing center has shifted relative to the coarse positioning reference origin.

[0087] The first step is to calculate the sum of the horizontal component, i.e., the X-direction component: ;

[0088] The second step is to calculate the sum of the vertical component, i.e., the Y-direction component: ;

[0089] The third step is to use the Pythagorean theorem to calculate the magnitude of the aforementioned offset components and then calculate the final eccentricity vector. :

[0090]

[0091] The above calculation results mean that the bearing center is approximately [missing information] relative to the coarse datum point. Pixel eccentricity.

[0092] The eccentricity vector is calculated. Then, the system will calculate the eccentricity vector. The calculated eccentricity vector is compared with a preset threshold. If the value exceeds a preset threshold, it is determined that there is an eccentricity defect in the current micro fan bearing press-fit, and an alarm signal is sent to the automated production line or a scrap rejection operation is performed; if the eccentricity vector... If the preset threshold is not exceeded, the current micro fan bearing press-fit quality is deemed qualified.

[0093] Thus, by using the vector integration method, this invention fuses edge information from all angles into a unified eccentric vector, which not only avoids the complex circle fitting iteration process, but also utilizes the smoothing properties of integration to further eliminate the influence of individual outliers, achieving fast and high-precision eccentricity detection.

[0094] In addition, such as Figure 2 As shown, the original gradient signal obtained by the prior art in polar coordinates, i.e. the dashed trajectory, has multiple large-amplitude oscillating peaks on the left side of the real edge position, i.e. the vertical mark. These peaks are pseudo signals generated by machining texture interference.

[0095] like Figure 3 As shown, after processing by the method of the present invention, the oscillation interference in the edge confidence waveform, i.e., the solid line trajectory, is effectively suppressed, and only a single edge peak at the real physical edge is retained.

[0096] like Figure 4 As shown, the algorithm accurately extracts the edge points of all angles, i.e., the distribution of the point set, and calculates the eccentric vector, i.e., the direction of the arrow. The solid line in the figure is the equivalent reference circle drawn based on the endpoint of the eccentric vector. This equivalent reference circle can closely fit the extracted physical edge, which intuitively verifies the high accuracy and anti-interference ability of this scheme.

[0097] While this specification has shown and described various embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A method for detecting eccentricity during press-fitting of a miniature fan bearing based on image processing, characterized in that, include: A top-view grayscale image of the micro fan bearing after press-fitting is obtained, and a polar coordinate transformation is performed based on the coarse positioning coordinates of the bearing housing to generate a polar coordinate panoramic unfolded image. The horizontal axis of the polar coordinate panoramic unfolded image is the angular coordinate, and the vertical axis is the radial distance coordinate. Gradient calculation is performed on the polar coordinate panoramic unfolded image, and a radial texture oscillation suppression model is constructed based on the gradient statistical features within the radial sliding window. The texture interference index of each pixel in the image is calculated, and the texture interference index is used to characterize the probability that a pixel belongs to the turning texture region. The edge confidence of each pixel is calculated based on the texture interference index and the illumination coupling correction factor determined based on the average brightness information of the pixel at the current angle. The edge confidence is negatively correlated with the texture interference index, and the brightness difference of different angle regions is normalized and compensated by the illumination coupling correction factor. In each angle column of the polar coordinate panoramic unfolded image, the radial position corresponding to the maximum edge confidence is extracted. The eccentricity vector of the closed contour formed by the radial positions corresponding to all angles relative to the coarse positioning coordinates is calculated using the vector integration method to obtain the final press-fit eccentricity detection result. The texture interference index satisfies the following relationship: ; Representing coordinates Texture interference index at the location; Indicated by radius A radial sliding window centered on the center; Indicates relative to the center position The coordinate offset; Indicates the first in the window Radial gradient values ​​at each location; This represents the arithmetic mean of all radial gradient values ​​within the window. This indicates the number of times the radial gradient sign flips within the radial sliding window; It is the natural logarithm function; It is a natural constant; is the numerical stability constant.

2. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 1, characterized in that, The edge confidence scores satisfy the following relationship: in, Representing coordinates Marginal confidence at the point; Indicates the illumination coupling correction factor; This represents the absolute value of the radial gradient at the current point; Indicates the current angle The average grayscale value of the entire column of pixels; The basic luminance constant; Indicates the texture penalty term; This represents the texture suppression coefficient.

3. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 2, characterized in that, The eccentricity vector satisfies the following relationship: in, Represents the eccentricity vector; Indicates the total number of sampling angles; For sampling point index; Indicates the first Each sampling angle; Indicates the angle The optimal edge radius value corresponding to the row index with the highest edge confidence; and For corresponding angles The trigonometric function values.

4. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 1, characterized in that, After acquiring the top-view grayscale image of the micro fan bearing after press-fitting, the method further includes: downsampling the top-view grayscale image to filter out high-frequency machining texture interference on the surface; performing image binarization using the maximum inter-class variance method and combining morphological closing operations to eliminate light spots and holes caused by local reflections; calculating the centroid coordinates of the largest connected component using connected component analysis, and using the centroid coordinates as the coarse positioning coordinates; the polar coordinate transformation uses the coarse positioning coordinates as the pole, sets the maximum sampling radius, and maps the circular area into the rectangular polar coordinate panoramic unfolded image.

5. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 1, characterized in that, The gradient calculation specifically includes: convolving the polar coordinate panoramic unfolded image with the vertical kernel of the Sobel operator to obtain the first-order radial gradient value along the radial direction; the method for obtaining the number of times the gradient sign is flipped in the relation satisfied by the texture interference index is: traversing the gradient data in the radial sliding window and counting the number of times the product of two adjacent radial gradient values ​​is less than zero.

6. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 2, characterized in that, Extracting the radial position corresponding to the maximum edge confidence in each angle column of the polar coordinate panoramic unfolded image includes: traversing all angle columns of the polar coordinate panoramic unfolded image; for each angle column, comparing the edge confidence values ​​of all pixels in that column; and determining the ordinate of the pixel corresponding to the maximum value as the optimal edge radius value at that angle.

7. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 6, characterized in that, The step of calculating the eccentricity vector of the closed contour formed by the radial positions corresponding to all angles relative to the coarse positioning coordinates using the vector integral method includes: calculating the sum of the projections of the optimal edge radius values ​​in the horizontal direction and the sum of the projections in the vertical direction for all angles; calculating the offset component of the center of the equivalent reference circle relative to the coarse positioning coordinates based on the sum; and calculating the magnitude of the offset component using the Pythagorean theorem to obtain the eccentricity vector.

8. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 1, characterized in that, The method further includes: after calculating the eccentricity vector, determining whether the eccentricity vector exceeds a preset threshold; if it exceeds the preset threshold, determining that there is an eccentricity defect in the current micro fan bearing press-fit.

9. The method for detecting eccentricity in press-fitting of a miniature fan bearing based on image processing according to claim 2, characterized in that, The numerical settings of the base brightness constant and texture suppression coefficient are based on the following: when the light intensity of the detection environment is low, resulting in poor overall image contrast, the value of the base brightness constant is increased to prevent noise points in the background area from generating artificially high edge confidence values; when dense machining textures are detected on the bearing surface, the value of the texture suppression coefficient is increased to utilize the rapid decay characteristics of the exponential function to compress the edge confidence of the machining texture area to a level close to zero.