A visual-based bearing ring end face defect detection method
By constructing an end-face defect detection system, combining standard circle matching and polar coordinate transformation, and employing adaptive gamma transformation and texture removal methods, the problems of low efficiency and high false detection rate in bearing ring end-face inspection are solved, achieving high accuracy and low cost real-time detection.
Patent Information
- Application Number
- CN202411758386.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing visual inspection methods are inefficient and have a high false detection rate in detecting defects on the end face of bearing races, and it is difficult to accurately locate the region of interest. Texture features also affect the accuracy of the detection.
A vision-based method for detecting defects on the end face of bearing races is adopted. By constructing an end face defect detection system, standard circle matching and polar coordinate transformation are used, combined with adaptive gamma transformation and gradient fusion nonlocal means texture removal method to achieve accurate localization and detection of defect areas.
It achieves efficient and low-cost bearing ring defect detection, reduces false detection rate, adapts to various models, meets real-time detection needs, and has high detection accuracy and speed.
Smart Images

Figure CN119715537B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a bearing ring defect detection method, relates to the technical field of visual bearing quality appearance detection, and particularly relates to a bearing ring end face defect detection method based on vision. BACKGROUND
[0002] Bearing is an extremely important component in the industrial field, is widely used in various machines and equipment, and has a key supporting and bearing role. The performance and quality of the bearing directly affect the stability and safety of the mechanical equipment, so appearance quality detection of the bearing is very important during design and manufacturing.
[0003] Bearing workpieces are prone to be affected by manufacturing processes and production factors during production and manufacturing, and various defects such as black spots, scratches and bumps occur. The surface flaws are mainly caused by factors such as equipment failure, material problems, machining errors and poor lubrication. The defect detection requirement of the bearing end face is relatively high, and the size of some defects is even about 100 mu m. Moreover, the defect types generated during the production process are various and different in size, and some fine pits are similar to the bearing texture background. The existing visual detection method has the disadvantages of low detection efficiency, high false detection rate and single type, so it is insufficient to undertake the real-time detection task of the bearing. There are also some difficulties in the process of bearing end face visual detection. The difficulties of bearing end face defect detection mainly include the following aspects: the bearing end face area is narrow, generally about 7 mm, the entire end face ring of the bearing needs to be acquired during the detection process, the general ROI acquisition method will cause background pixels to be introduced and end face pixels to be lost due to inaccurate positioning, and the extraction accuracy of the contour also affects the accuracy of detection.
[0004] The texture features of the bearing ring surface are too many, so the existence of the texture features will have a certain influence on the detection of damage, scratches and black spot defects during the bearing detection process, and false detection problems are prone to occur, and irrelevant texture features need to be eliminated. SUMMARY
[0005] In order to solve the problems in the background art, the application provides a bearing ring end face defect detection method based on vision.
[0006] The technical scheme adopted by the application is:
[0007] The bearing ring end face defect detection method based on vision comprises the following steps:
[0008] S1: An end face defect detection system of a bearing ring is constructed, and an end face image of a bearing ring without defects of different types is acquired through the end face defect detection system.
[0009] S2: using the end face defect detection system to extract the region of interest (ROI) of the end face image of the bearing ring of different models without defects.
[0010] S3: using the end face defect detection system to collect the end face image of the bearing ring to be detected on the production line, matching the region of interest (ROI) of the end face image of the bearing ring of different models without defects and the end face image of the bearing ring to be detected using the end face positioning matching based on the standard circle, then sequentially performing polar coordinate conversion and linear interpolation, and then performing defect area preprocessing to locate the defect area, and finally realizing the defect detection of the end face of the bearing ring.
[0011] In the step S1, the end face defect detection system of the bearing ring comprises a 500W area CCD (Charge Coupled Device) industrial camera, a white coaxial light source, a half-mirror, a placing platform, an industrial computer and a cloud platform, the bearing ring is horizontally placed on the placing platform with the end face to be collected facing upward, the area CCD industrial camera, the half-mirror and the bearing ring are sequentially and spacedly arranged from top to bottom, the 16mm fixed focus lens of the area CCD industrial camera is vertically downward toward the half-mirror, and the coaxial light source is located on one side of the half-mirror; the industrial computer comprises a programmable controller and an upper computer connected in sequence, the controller is electrically connected with the area CCD industrial camera, and the upper computer is wirelessly connected with the cloud platform; the coaxial light source emits horizontal white light to the half-mirror to reflect vertically downward incident light to the end face of the bearing ring, the reflected light of the end face of the bearing ring is transmitted through the half-mirror and then collected by the fixed focus lens of the area CCD industrial camera to collect the end face image of the bearing ring, and then transmitted to the controller and the upper computer of the industrial computer to perform region of interest (ROI) extraction, matching, polar coordinate conversion and defect area preprocessing, and then perform defect detection processing, and finally uploaded to the cloud platform for storage and monitoring.
[0012] The image acquisition part of the end face defect detection system comprises a face array CCD industrial camera, a coaxial light source, a half-transmission mirror and a placement platform, the industrial computer comprises a controller and an upper computer in communication connection with the image acquisition part, after the bearing ring reaches the designated position on the production line, the coaxial light source performs lighting, the upper computer of the industrial computer controls the face array CCD industrial camera to perform image acquisition, the controller and the upper computer mainly perform real-time monitoring of the bearing ring and store abnormal images of the bearing ring and log records, and upload to the cloud platform; the cloud platform is used for receiving the end face images and information of the bearing rings collected by the bearing detection station, and can also receive photos and model size information of abnormal bearing ring workpieces and other conventional data, so that cloud end automatic detection of the bearing ring workpiece production line can be realized, and timely maintenance can be performed. In the normal mode, the upper computer of the industrial computer only transmits the information of the defective bearing ring workpiece to the cloud platform to reduce the flow and power consumption, or sets the automatic uploading of abnormal pictures and logs to realize the cloud end viewing of the detection station.
[0013] In step S2, for each type of bearing ring without defects, the end face image of the bearing ring without defects is subjected to region of interest (ROI) extraction. The contour of the bearing ring workpiece of different types needs to be extracted to accurately position the ROI region and avoid introducing or losing pixels due to inaccurate extraction, thereby causing missed detection or false detection. The specific process is as follows:
[0014] S2.1: First, the end face image of the bearing ring without defects with a clean surface under the imaging conditions in the factory is subjected to grayscale processing, and then a rectangular frame is used to select the end face of the bearing ring in the image to obtain an end face frame image. The frame selection operation reduces the influence of the introduction of the background region on the contour recognition.
[0015] The collected end face image of the bearing ring is subjected to grayscale processing, and the three-channel image becomes a single-channel image, making the data processing simpler. The grayscale processing adopts a weighted average method, and finally the three-channel pixel values of each pixel point of the color image are combined into a single-channel gray value.
[0016] S2.2: After the end face frame image is subjected to binaryzation segmentation, the maximum circumscribed circle of the standard circle of the end face of the bearing ring without defects is obtained.
[0017] S2.3: The region of interest (ROI) is extracted according to the maximum circumscribed circle of the standard circle of the end face of the bearing ring without defects, so as to determine the inner and outer standard circles of the end face of the bearing ring without defects, as well as the radius and center coordinates thereof, and finally determine the template circle of the end face of the bearing ring without defects, thereby completing the region of interest (ROI) extraction of the end face image of the bearing ring without defects under the current type.
[0018] In step S3, the regions of interest (ROIs) of the end face images of defect-free bearing rings of different models and the end face image of the bearing ring to be inspected are matched using end face positioning based on standard circle matching. Specifically, the end face image of the bearing ring to be inspected is first binarized and segmented to obtain several circumscribed circles of the end face. Then, each circumscribed circle of the end face image of the bearing ring to be inspected is matched with the radius of the region of interest (ROI) of the end face image of each model of defect-free bearing ring using standard circle matching. This determines the largest circumscribed circle of the end face image of the bearing ring to be inspected among the circumscribed circles, thereby determining the model of the bearing ring to be inspected. Finally, the region of interest (ROI) of the end face image of the defect-free bearing ring of the corresponding model is matched to the end face image of the bearing ring to be inspected according to the center coordinates, thus completing the end face positioning matching of the bearing ring to be inspected.
[0019] The method of performing standard circle matching between the circumcircle of each end face image of the bearing race to be inspected and the radius of the Region of Interest (ROI) of the end face image of each type of defect-free bearing race specifically involves determining the optimal radius matching condition for each circumcircle of the end face image of the bearing race to be inspected and the ROI of the end face image of each type of defect-free bearing race:
[0020]
[0021] Where, r new r0 is the radius of the circumcircle of the end face of the bearing ring to be inspected; r0 is the outer or inner radius of the region of interest (ROI). This is the minimum error for the preset radius.
[0022] When the optimal radius condition is met, the bearing ring to be tested is determined to be of the current model; when the optimal radius condition is not met, the optimal radius condition determination for the next model continues until the model of the bearing ring to be tested is determined, thus completing the standard circle matching.
[0023] In step S3, the end face image of the bearing ring to be inspected, after the end face positioning and matching is completed, is converted into a rectangular image by polar coordinate transformation and linear interpolation. Then, the defect area is preprocessed. Specifically, an adaptive gamma transformation is first performed based on the different surface reflectivity of different models. Then, a texture removal method based on gradient fusion and nonlocal mean is used to suppress and eliminate the metal texture, extract the initial defect area of suspected defects, and then the initial defect area is further segmented and filtered by an iterative adaptive threshold segmentation method and a multi-feature discrimination method. Finally, the defect area is located, realizing the precise location and detection of defects.
[0024] The average brightness mu and brightness standard deviation sigma of the rectangular image are obtained, so that a dynamic adjustment factor k is introduced, k = sigma / mu, the gamma dynamic factor of the adaptive gamma transformation is adjusted through the dynamic adjustment factor k, the adaptive gamma transformation is carried out on the rectangular image, the dynamic adjustment based on brightness of the end surface image is realized, and the gamma dynamic factor is as follows:
[0025]
[0026] The adaptive gamma transformation is carried out on the rectangular image according to the adjusted gamma dynamic factor.
[0027] The processing of the texture removal method based on gradient fusion non-local mean is as follows: first, two 7*7 sobel operators are used to obtain the image horizontal and vertical gradients of the rectangular image after adaptive gamma transformation, then normalization processing is carried out, then the horizontal and vertical gradients of each pixel point in the rectangular image are converted into energy gradients through energy gradient conversion, then the region in which the pixel point with an energy gradient higher than a preset energy gradient threshold is taken as a high-energy region, the seed filling algorithm is used to fill the high-energy region, the internal region of the filled high-energy region is taken as a reserved region, the remaining texture feature region without defects is taken as an elimination region, the non-local mean filter denoising algorithm is used to carry out region inversion smoothing elimination processing on the elimination region, and finally, the initial defect region of suspected defects is extracted.
[0028] The visual image processing algorithm technology is used to determine the image appearance defects of the bearing ring workpiece, and a machine vision online defect detection system is built to identify and acquire the workpiece containing defects, so that non-contact workpiece appearance quality detection is realized, and the quality detection of the bearing ring end surface appearance can be specifically applied.
[0029] The beneficial effects of the present application are as follows:
[0030] The defect detection system has the advantages of convenient installation and adjustment of each module, low cost, real-time detection and recording of the bearing ring defect workpiece, acquisition of the bearing ring end surface image through the defect detection system combined with the machine vision technology, detection and screening of the bearing ring containing defects combined with the image processing algorithm, real-time detection and recording of the bearing ring through the upper computer, real-time detection and automatic backup transmission of the bearing ring through remote control and data exchange with the cloud platform, reduction of the false detection rate, and realization of the purpose of automatic detection. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 The overall architecture diagram of the visual bearing ring end face defect detection system of the application is shown in the figure.
[0032] Figure 2 The hardware position diagram of the visual bearing ring end face defect detection system of the application is shown in the figure.
[0033] Figure 3 The overall flowchart of the end face defect detection provided by the application is shown in the figure.
[0034] Figure 4 The schematic diagram of ROI positioning based on standard part circle for different models of bearing ring workpieces provided by the application is shown in the figure, wherein, Figure 4 (a) is the schematic diagram of ROI positioning based on standard part circle for 53-40-23 model bearing ring workpieces, Figure 4 (b) is the schematic diagram of ROI positioning based on standard part circle for 37-26-16 model bearing ring workpieces, Figure 4 (c) is the schematic diagram of ROI positioning based on standard part circle for 43-30-14 model bearing ring workpieces.
[0035] Figure 5 The polar coordinate conversion schematic diagram provided by the application is shown in the figure, wherein, Figure 5 (a) is the coordinate conversion principle diagram, Figure 5 (b) is the actual effect diagram of bearing ring end face polar coordinate conversion.
[0036] Figure 6 The schematic diagram of the end face ring area after polar coordinate conversion provided by the application is shown in the figure.
[0037] In the figure: 1, bearing ring, 2, area array CCD industrial camera, 3, fixed focus lens, 4, coaxial light source, 5, half-transmission mirror, 6, object platform, 7, industrial computer, 71, controller, 72, upper computer, 8, cloud platform. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application.
[0039] As shown in the figure, Figure 3 The visual-based bearing ring end face defect detection method of the application is specifically as follows:
[0040] S1: An end face defect detection system of the bearing ring 1 is constructed, and the end face images of different models of defect-free bearing rings 1 are collected through the end face defect detection system, as shown in Figure 1 and Figure 2As shown, the end face defect detection system of the bearing ring 3 comprises a 500W area array CCD (Charge Coupled Device) industrial camera 2, a white coaxial light source 4, a half-mirror 5, a placing platform 6, an industrial computer 7 and a cloud platform 8, the bearing ring 1 is horizontally placed on the placing platform 6 with the end face to be collected facing upward, the area array CCD industrial camera 2, the half-mirror 5 and the bearing ring 1 are sequentially and spacedly arranged from top to bottom, the 16mm fixed focus lens 3 of the area array CCD industrial camera 2 vertically faces downward to the half-mirror 5, and the coaxial light source 4 is located on one side of the half-mirror 5; the industrial computer 7 comprises a programmable controller 71 and an upper computer 72 connected in sequence, the controller 71 is electrically connected with the area array CCD industrial camera 2, and the upper computer 72 is wirelessly connected with the cloud platform 8; the coaxial light source 4 emits horizontal white light to the half-mirror 5 to reflect vertically downward incident light to the end face of the bearing ring 1, the reflected light of the end face of the bearing ring 1 transmits through the half-mirror 5 and then is collected by the fixed focus lens 3 of the area array CCD industrial camera 2 to collect the end face image of the bearing ring 1, and then is transmitted to the controller 71 and the upper computer 72 of the industrial computer 7 to perform region of interest (ROI) extraction, matching, polar coordinate conversion and defect region preprocessing and then perform defect detection processing, and finally is uploaded to the cloud platform 8 for storage and monitoring.
[0041] The image acquisition part of the end face defect detection system comprises the area array CCD industrial camera 2, the coaxial light source 4, the half-mirror 5 and the placing platform 6, the industrial computer 7 comprises the controller 71 and the upper computer 72 in communication connection with the image acquisition part, after the bearing ring 1 reaches the designated position on the production line, the coaxial light source 4 performs lighting, the upper computer 72 of the industrial computer 7 controls the area array CCD industrial camera 2 to perform image acquisition, the controller 71 and the upper computer 72 mainly perform real-time monitoring of the bearing ring 1, store and log abnormal images of the bearing ring 1, and upload to the cloud platform 8; the cloud platform 8 is used for receiving the end face image of the bearing ring 1 collected by the bearing detection station and information, and the information cloud platform 8 can also receive photos and model size information of abnormal bearing ring 1 workpieces and other conventional data, can realize cloud end automatic detection of the bearing ring 1 workpiece production line, and can be maintained in time. In the normal mode, the upper computer 72 of the industrial computer 7 only transmits information of the defective bearing ring 1 workpiece to the cloud platform to reduce flow and power consumption, or sets automatic uploading of abnormal pictures and logs to realize cloud end viewing of the detection station.
[0042] S2: The end face image of the defect-free bearing ring 1 of different models is extracted using the end face defect detection system. For each type of defect-free bearing ring 1, the end face image of the defect-free bearing ring 1 is extracted, and the contour of the bearing ring 1 workpiece is extracted to realize accurate positioning of the ROI region, avoid the introduction or loss of pixels due to inaccurate extraction, and thus avoid the occurrence of missed detection or false detection. The specific implementation is as follows:
[0043] S2.1: First, the end face image of the defect-free bearing ring 1 with a clean surface under the factory imaging condition is subjected to grayscale processing, and then a rectangular frame is used to select the end face of the bearing ring 1 in the image to obtain an end face frame selection image. The frame selection operation reduces the influence of the introduction of the background region on the contour recognition.
[0044] The collected end face image of the bearing ring 1 is subjected to grayscale processing, and the three-channel image becomes a single-channel image, making the data processing simpler. The grayscale processing adopts a weighted average method, and finally the three-channel pixel values of each pixel point of the color image are combined into a single-channel grayscale value.
[0045] S2.2: After the end face frame selection image is subjected to binary segmentation, the maximum circumscribed circle of the standard circle of the end face of the defect-free bearing ring 1 is obtained; in specific implementation, a canny contour edge extraction algorithm is adopted.
[0046] S2.3: The ROI is extracted according to the maximum circumscribed circle of the standard circle of the end face of the defect-free bearing ring 1, so as to determine the inner and outer standard circles of the end face of the defect-free bearing ring 1, as well as the radius and center coordinates thereof, and finally determine the template circle of the end face of the defect-free bearing ring 1, thereby completing the ROI extraction of the end face image of the defect-free bearing ring 1 under the current model. As shown in Figure 4 (a) of FIG. 1, Figure 4 (b) of FIG. 1, and Figure 4 (c) of FIG. 1, which are respectively the ROI positioning results of the bearing ring workpieces of the 53-40-23 type, the 37-26-16 type, and the 43-30-14 type based on the standard part circle matching.
[0047] S3: The end face image of the bearing ring 1 to be detected on the production line is collected using the end face defect detection system, the ROI of the end face image of the defect-free bearing ring 1 of different models and the end face image of the bearing ring 1 to be detected are subjected to end face positioning matching based on standard circle matching, and then polar coordinate conversion and linear interpolation are sequentially performed before defect region preprocessing to position the defect region, thereby finally realizing defect detection of the end face of the bearing ring.
[0048] The end face image of the bearing ring 1 of interest region ROI of different models of the bearing ring 1 without defects and the end face image of the bearing ring 1 to be detected are matched by the end face positioning matching based on the standard circle matching, specifically, after the end face image of the bearing ring 1 to be detected is binarized and segmented, a plurality of circumscribed circles of the end face are obtained, then the radius of each circumscribed circle of the end face image of the bearing ring 1 to be detected is matched with the radius of the region of interest ROI of the end face image of the bearing ring 1 without defects of each model, so that the maximum circumscribed circle of the end face image of the bearing ring 1 to be detected is determined in each circumscribed circle, and then the model of the bearing ring 1 to be detected is determined, so that the region of interest ROI of the end face image of the bearing ring 1 without defects under the corresponding model is matched to the end face image of the bearing ring 1 to be detected according to the center coordinates, and the end face positioning matching of the bearing ring 1 to be detected is completed.
[0049] The radius of each circumscribed circle of the end face image of the bearing ring 1 to be detected is matched with the radius of the region of interest ROI of the end face image of the bearing ring 1 without defects of each model, specifically, for each circumscribed circle of the end face of the bearing ring 1 to be detected and the region of interest ROI of the end face image of the bearing ring 1 without defects of each model, the radius of the circumscribed circle and the radius of the region of interest ROI are matched as follows:
[0050]
[0051] Wherein, r new is the radius of the circumscribed circle of the end face of the bearing ring 1 to be detected; r0 is the outer circle radius or the inner circle radius of the region of interest ROI; is the preset radius minimum error.
[0052] When the optimal radius condition is met, the bearing ring 1 to be detected is determined as the current model; when the optimal radius condition is not met, the optimal radius condition of the next model is continued to be determined until the model of the bearing ring 1 to be detected is determined, and the standard circle matching is completed.
[0053] The method of the present application solves the problem of difficult extraction of bearing ROI area in the process of bearing ring 1 end face defect detection, adopts the standard workpiece circle matching ROI extraction and matching method, solves the problem of pixel introduction or loss caused by the different distribution positions of defects and the narrow area of the end face of the bearing ring 1. The radius condition determination ensures the accurate positioning of the end face area, realizes the area positioning of the bearing ring 1 workpiece in the detection station, and compared with the traditional contour fitting to obtain the ROI area, the above steps effectively overcome the problems of difficult ROI extraction and inaccurate end face pixel fitting caused by the narrow end face area of the bearing ring 1 and the complex background, and can adapt to bearing ring 1 workpieces of different models.
[0054] The end face image of the bearing ring 1 to be inspected, after the end face positioning and matching are completed, is converted into a rectangular image by polar coordinate transformation and linear interpolation. The result after polar coordinate transformation is as follows: Figure 6 As shown, the defect area is then preprocessed. Specifically, an adaptive gamma transform is first performed based on the different reflective properties of different models. Then, a texture removal method based on gradient fusion and nonlocal mean is used to suppress and eliminate the metal texture, extracting the initial defect area of suspected defects. Then, an iterative adaptive threshold segmentation method and a multi-feature discrimination method are used to further segment and filter the initial defect area, finally locating the defect area and achieving precise defect localization and detection.
[0055] like Figure 5 (a) and Figure 5 As shown in (b), a polar coordinate transformation is performed. First, the entire end face is transformed into a rectangular image using polar coordinate transformation. The perimeter of the outer circle of the end face is set as the width of the transformed rectangular image, and the difference between the outer radius and the inner radius is set as the height of the transformed rectangular image. The specific transformation is as follows:
[0056] θ=uμ θ ρ=vμ l +r
[0057] x=ρcosθ+r x y = ρsinθ - r y
[0058] Φ′(u, v) = Φ(x, y)
[0059] Where θ is the polar angle of the point; ρ is the polar radius of the point; u and v are the points P on the end face of the bearing ring 1 to be tested relative to the center r. x r y Polar angle and polar radius; μ θ and μ l These are the polar coordinate angle scaling factor and the polar radius conversion scaling factor, μ θ =2π / L, μ l = (Rr) / H, where L and H are the length and width of the rectangular image, respectively, and R and r are the outer and inner diameters of the workpiece circle, respectively; x and y are the horizontal and vertical distances of point P from the origin O, respectively; Φ′(u, v) is the pixel value of the rectangular image; Φ(x, y) is the nearest neighbor difference in the rectangular coordinate system.
[0060] When performing adaptive gamma transform on a rectangular image, the average brightness μ and brightness standard deviation σ of the rectangular image are first obtained. A dynamic adjustment factor k, k = σ / μ, is then introduced. This dynamic adjustment factor k adjusts the γ dynamic factor of the adaptive gamma transform, thereby performing adaptive gamma transform on the rectangular image and achieving dynamic adjustment of the end face image based on brightness. The γ dynamic factor is as follows:
[0061]
[0062] The rectangular image is adaptively gamma transformed according to the adjusted gamma dynamic factor.
[0063] The dynamic adjustment factor k combines the information of the standard deviation of brightness and the average brightness, and log128 is used to normalize the logarithmic value of the average brightness. The 1+sigma / mu is an amplification factor.
[0064] The adaptive gamma transformation ensures the dynamic adjustment of the end face brightness under different illumination environments, the brightness of the defect area and the normal area is improved, the detail change part is more obvious, and the influence of some irrelevant features is reduced, which is more conducive to the subsequent irrelevant feature elimination processing of energy gradient analysis.
[0065] Since the collected end face image of the bearing ring 1 has different texture characteristics, considering the light reflection characteristics of the end face surface of the bearing ring 1, the brightness of the light source needs to be adjusted again during the image acquisition process of the bearing ring 1 workpiece of different batches and types, in order to balance the imaging effect between the defect area and the normal area. Therefore, the adaptive gamma transformation method is proposed to realize the dynamic adjustment of the end face based on brightness.
[0066] The texture removal method based on gradient fusion non-local mean is processed, specifically, first, two 7*7 sobel operators are used to obtain the image horizontal and vertical gradients of the rectangular image after adaptive gamma transformation, then normalized processing is performed, then the horizontal and vertical gradients of each pixel point in the rectangular image are converted into energy gradients through energy gradient conversion, then the area where the pixel point with energy gradient higher than the preset energy gradient threshold is seated is regarded as a high-energy area, the seed filling algorithm is used to fill the high-energy area, and the internal area of the filled high-energy area is regarded as a reserved area, the remaining texture characteristic area without defects is regarded as an elimination area, the non-local mean filter denoising algorithm is used to perform area inversion smoothing elimination processing on the elimination area, and finally the initial defect area of the suspected defect is extracted.
[0067] The bearing end face rectangular image after gamma transformation is processed by the irrelevant feature elimination algorithm proposed in the application. The irrelevant features mainly come from the metal texture area existing in the production and processing process of the bearing ring 1. These texture characteristics are complex and will affect the subsequent defect detection, so it is necessary to remove the irrelevant features. The image gradient refers to the change rate of the image gray value, which reflects the change of the pixel value in the image. The calculation of the image gradient can determine the area with significant feature change on the surface of the bearing ring 1 workpiece, and the area with obvious gradient change of the defect area, so as to distinguish the suspected defect area from the texture characteristics.
[0068] The similarity of the image can be obtained by analyzing the texture of the end face of the bearing ring 1. The regional similarity can be obtained by adjusting the filter strength parameter h and the size of the window, so as to analyze the texture and the image structure, realize the suppression and smoothing of the texture, select the appropriate scale parameter, and obtain the appropriate parameter for eliminating the texture. Using the scale parameter, the non-local mean filter denoising algorithm is used for irrelevant feature texture elimination and smoothing processing in the elimination area of the gradient anomaly.
[0069] The metal texture of the bearing end face is eliminated, the irrelevant features are eliminated, and the pixel loss of the defect area is avoided, so that the elimination of irrelevant features such as texture and the detail preservation of the defect area are realized.
[0070] Then an iterative adaptive threshold segmentation method and a multi-feature discrimination method are used to further segment and screen the initial defect area. Specifically, the average gray value of the image with the initial defect area extracted is obtained as the initial threshold value, then the image is divided into foreground and background regions using the initial threshold value, and then a new gray threshold T new , T new = (μ F + μ B ) / 2, μ F is the average gray threshold of the foreground region, and μ B is the average gray value of the background region. Then iterative approximation is continuously performed until |T new -T0|< ε, T0 is the initial threshold average gray value, and ε is the approximation coefficient, which is generally set to 0.5, to realize the defect segmentation of the suspected area. The segmented defects are located and segmented to draw contours to obtain the segmentation area of the suspected defect area. Feature analysis is performed on the segmented defect area to realize the discrimination of the defect area by combining the gray range threshold, the maximum circumscribed rectangle area range threshold, and the defect area range threshold.
[0071] The real-time image and information of the bearing ring 1 workpiece detected with defects are displayed in real time on the host computer software on the host computer 72, and the information log of the bearing ring 1 workpiece containing defects is recorded. The host computer software interface displays the defect image and information log collected by wireless means, and sends the detection data to the specified cloud platform 8.
[0072] By using the irrelevant feature elimination method, the metal texture of the end face is suppressed, and the defect area is preliminarily extracted. The remaining area is smoothed and eliminated. An image containing only a suspected defect area is obtained. However, when the separated defect area is small, the pixels contained in the area are also small and the edge part is relatively fuzzy. Direct use of fixed global threshold or contour segmentation method cannot accurately segment these small areas, which may lead to loss of defect area pixel information and further cause false detection and missed detection.
[0073] The method of iteratively thresholding the extracted suspected defect area image realizes accurate positioning and segmentation of the defect area, and the multi-feature discrimination method realizes the detection and discrimination of the defect, finally realizes the discrimination of the defect type and the screening of the defective workpiece, and realizes the positioning and segmentation of the position of the defect.
[0074] The application proposes a bearing ring end face defect detection method based on vision to solve the problems of difficult ROI extraction and more surface irrelevant texture features in bearing ring end face detection, and designs and builds a visual defect detection system for bearing ring workpiece actual production line to realize online detection of bearing ring workpiece end face defects, and solves the problems of low automation, strong subjectivity of manual observation and unsatisfactory detection accuracy in the prior art.
[0075] Although the embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A vision-based method of detecting defects on the end face of a bearing ring, characterized in that, The application relates to a bearing ring end face defect detection system and a defect detection method thereof. S1: constructing a bearing ring (1) end face defect detection system, collecting end face images of different types of non-defective bearing rings (1) through the end face defect detection system; S2: using the end face defect detection system to extract a region of interest (ROI) of the end face images of different types of non-defective bearing rings (1); S3: using the end face defect detection system to collect end face images of bearing rings (1) to be detected on a production line, matching the ROI of the end face images of different types of non-defective bearing rings (1) and the end face images of the bearing rings (1) to be detected through end face positioning matching based on standard circle matching, then sequentially performing polar coordinate conversion and linear interpolation, and then performing defect region pretreatment positioning to position a defect region, and finally realizing defect detection of the bearing ring end face; In the step S3, the ROI of the end face images of different types of non-defective bearing rings (1) and the end face images of the bearing rings (1) to be detected are matched through end face positioning matching based on standard circle matching, specifically, the end face images of the bearing rings (1) to be detected are binarized and segmented to obtain a plurality of circumscribed circles of the end face, then each circumscribed circle of the end face images of the bearing rings (1) to be detected is matched with the radius of the ROI of the end face images of different types of non-defective bearing rings (1) through standard circle matching, so that the largest circumscribed circle of the end face images of the bearing rings (1) to be detected is determined in each circumscribed circle, the type of the bearing rings (1) to be detected is determined, and then the ROI of the end face images of non-defective bearing rings (1) corresponding to the type is matched to the end face images of the bearing rings (1) to be detected according to the center coordinates, and the end face positioning matching of the bearing rings (1) to be detected is completed.
2. The visual-based bearing ring end face defect detection method of claim 1, wherein: The step S1, the end face defect detection system of the bearing ring (1) includes a surface array CCD industrial camera (2), a coaxial light source (4), a half mirror (5), a platform (6), an industrial computer (7) and a cloud platform (8), the bearing ring (1) is placed horizontally on the platform (6) and the end face to be collected faces up, the surface array CCD industrial camera (2), the half mirror (5) and the bearing ring (1) are arranged in sequence from top to bottom, the fixed focus lens (3) of the surface array CCD industrial camera (2) is vertically downward to the half mirror (5), and the coaxial light source (4) is located on one side of the half mirror (5); The industrial computer (7) includes a controller (71) and a host computer (72) connected in sequence, the controller (71) is electrically connected with the surface array CCD industrial camera (2), and the host computer (72) is wirelessly connected with the cloud platform (8); The coaxial light source (4) emits horizontal white light to the half mirror (5) to reflect vertically downward incident light to the end face of the bearing ring (1), the reflected light of the end face of the bearing ring (1) transmits through the half mirror (5) and then the fixed focus lens (3) of the surface array CCD industrial camera (2) collects the end face image of the bearing ring (1), and then transmits to the controller (71) and the host computer (72) of the industrial computer (7) for region of interest (ROI) extraction, matching, polar coordinate conversion and defect region preprocessing, and then defect detection processing, and finally uploaded to the cloud platform (8) for storage monitoring.
3. The visual-based bearing ring end face defect detection method of claim 1, wherein: In the step S2, for each type of bearing ring (1) without defects, the end face image of the bearing ring (1) without defects is extracted in the region of interest (ROI), specifically as follows: S2.1: first, the end face image of the bearing ring (1) without defects is processed by grayscale, then the end face of the bearing ring (1) in the image is selected by rectangular frame to obtain the end face frame image; S2.2: the end face frame image is segmented by binaryzation to obtain the maximum circumscribed circle of the standard circle of the end face of the bearing ring (1) without defects; S2.3: the region of interest (ROI) is extracted according to the maximum circumscribed circle of the standard circle of the end face of the bearing ring (1) without defects, so as to determine the inner and outer standard circles of the end face of the bearing ring (1) without defects, and the radius and center coordinates, and complete the region of interest (ROI) extraction of the end face image of the bearing ring (1) without defects under the current type.
4. The visual-based bearing ring end face defect detection method of claim 1, wherein: The standard circle matching of the radius of each circumscribed circle of the end face image of the bearing ring (1) to be detected and the region of interest (ROI) of the end face image of the bearing ring (1) without defects of each type is as follows: for each circumscribed circle of the end face of the bearing ring (1) to be detected and the region of interest (ROI) of the end face image of the bearing ring (1) without defects of each type, the radius of the circumscribed circle and the radius of the region of interest (ROI) are matched under the following optimal radius condition: wherein, is a radius of an inscribed circle of an end face of the bearing ring (1) to be detected; is an outer or inner radius of a region of interest, ROI; is a preset radius minimum error; When the optimal radius condition is met, it is determined that the bearing ring (1) to be detected is the current model; when the optimal radius condition is not met, the optimal radius condition of the next model is continuously determined until the model of the bearing ring (1) to be detected is determined, and the standard circle matching is completed.
5. The visual-based bearing ring end face defect detection method of claim 1, wherein: In the step S3, the end face image of the bearing ring (1) to be detected after the end face positioning and matching is converted into a rectangular image through polar coordinate conversion and linear interpolation in sequence, and then the defect region is pretreated. Specifically, adaptive gamma transformation is first performed, then a texture removal method based on gradient fusion non-local mean value is used for processing, an initial defect region is extracted, and then an iterative adaptive threshold segmentation method and a multi-feature discrimination method are used for further segmentation and screening of the initial defect region, and finally the defect region is located.
6. The visual-based bearing ring end face defect detection method of claim 5, wherein: When performing adaptive gamma transform on the rectangular image, the average brightness of the rectangular image is first obtained. and brightness standard deviation This leads to the introduction of a dynamic adjustment factor. , By dynamically adjusting factors Adjusting the adaptive gamma transform A dynamic factor is used to perform an adaptive gamma transform on the rectangular image. The dynamic factors are as follows: According to the adjusted The dynamic factor performs adaptive gamma transformation on the rectangular image.
7. The visual-based bearing ring end face defect detection method of claim 5, wherein: The texture removal method based on gradient fusion non-local mean value is used for processing. Specifically, first, two sobel operators are used to obtain the horizontal and vertical gradients of the rectangular image after adaptive gamma transformation, then normalization processing is performed, then the horizontal and vertical gradients of each pixel point in the rectangular image are converted into energy gradients through energy gradient conversion, then the region where the energy gradient of each pixel point is higher than the preset energy gradient threshold is taken as a high-energy region, the high-energy region is filled and processed using a seed filling algorithm to be taken as a reserved region, the remaining region is taken as an elimination region, the elimination region is subjected to region inversion smoothing elimination processing using a non-local mean value filtering denoising algorithm, and finally the initial defect region is extracted.
Citation Information
Patent Citations
Small bearing quality detection method, device and system based on machine vision
CN110246122A
Bearing quality detection method based on machine vision
CN112308832A