A bearing black spot defect detection method and device based on machine vision

By combining improved Gaussian filtering image enhancement and polar coordinate transformation with a dual-threshold processing method, the speed and reliability issues in detecting black spot defects on bearing surfaces were resolved, achieving higher detection accuracy and reliability.

CN116883343BActive Publication Date: 2026-03-27ZHEJIANG SCI-TECH UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies for detecting black spot defects on bearing surfaces suffer from low detection speed and poor reliability. This is especially true when there are many irrelevant features on the bearing surface, contour extraction is difficult, and the background and defects are mixed and difficult to distinguish, leading to false detections and low detection accuracy.

Method used

An improved Gaussian filter image enhancement algorithm is used to enhance the original image. The ROI region of the bearing ring is extracted by polar coordinate transformation and irrelevant feature elimination is performed twice. Finally, a double thresholding method is used to determine surface defects.

Benefits of technology

It improves the accuracy and speed of bearing black spot defect detection, solves the problems of difficult contour extraction and the influence of irrelevant features, and enhances the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116883343B_ABST
    Figure CN116883343B_ABST
Patent Text Reader

Abstract

The application provides a bearing black spot defect detection method and device based on machine vision, and belongs to the field of industrial production. The detection method enhances an original image through an improved Gaussian filter image enhancement algorithm to obtain an enhanced image; performs ROI extraction on the enhanced image, and obtains an ROI image containing polar coordinates through polar coordinate transformation; performs twice irrelevant feature elimination on the ROI image to obtain a to-be-judged image; and determines whether the to-be-judged image contains surface defects by using a double-threshold processing method. The detection method provided in the application embodiment can reduce processing difficulty and improve the accuracy of bearing surface black spot defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of industrial production, and specifically relates to a method and device for detecting black spot defects in bearings based on machine vision. Background Technology

[0002] Bearings, as crucial basic components of mechanical equipment, play a vital role in various types of equipment. With the current national focus on high-quality development and the increasing emphasis on intelligent manufacturing standards, the bearing industry is also continuously improving its development and the formulation of standardized industry norms. Currently, bearing manufacturers adhere to advanced processing techniques and production standards. Therefore, during the bearing production process, the bearing surface may suffer some damage, resulting in defects. At present, due to the immaturity of bearing product quality inspection methods, most bearing manufacturers still rely on manual inspection. This method suffers from issues with inspection speed and reliability, and there is an urgent need to improve inspection technologies.

[0003] With the development of machine vision technology in recent years, machine vision systems have been successfully applied to product inspection. Using machine vision to visually inspect bearing surfaces and reject defective bearings is a necessary step in improving the product quality of bearing manufacturers. During bearing production, different external factors can cause various defects. Black spots, appearing as black patches under industrial camera photography, pose a serious safety hazard to equipment after bearing use, making their detection crucial. As the quality requirements for bearing products continue to rise, the accuracy and speed of detecting these visual defects also need to be improved, thus increasing the demands on the inspection system and consequently increasing the difficulty of inspection. Therefore, the following problems exist in the inspection process:

[0004] 1. Too many irrelevant features on the bearing surface can affect the detection of black spot defects during bearing inspection, and may lead to false detections.

[0005] 2. The entire end face of the bearing ring needs to be obtained during the inspection process. Therefore, it is difficult to extract the contour of the cross-section of the bearing ring containing defects. The accuracy of the contour extraction process also affects the accuracy of the inspection.

[0006] 3. For the extracted bearing end face containing defects, since defects are easily mixed with the background and appear as black when photographed with an industrial camera, there is a difficulty in preprocessing the extracted image of the bearing end face to reasonably distinguish between the background and the black defect blocks. Summary of the Invention

[0007] This application provides a machine vision-based method and apparatus for detecting black spot defects on bearing surfaces, which can solve the problems of low detection speed and poor reliability in existing solutions for detecting black spot defects on bearing surfaces.

[0008] A first aspect of this application provides a machine vision-based method for detecting black spot defects in bearings, the method comprising:

[0009] Obtain the original image of the end face of the bearing ring to be inspected;

[0010] The original image is enhanced using an improved Gaussian filter image enhancement algorithm to obtain the enhanced image.

[0011] The enhanced image is used to extract the ROI of the bearing ring, and the ROI image containing polar coordinates is obtained by polar coordinate transformation.

[0012] The ROI image is subjected to two irrelevant feature removal processes to obtain the image to be determined;

[0013] The presence of surface defects in the image to be judged is determined by a dual thresholding method.

[0014] Optionally, the enhancement of the original image using the improved Gaussian filter image enhancement algorithm specifically involves:

[0015] The original image is enhanced using the following formula:

[0016]

[0017] Where σ is the standard deviation of x, μ is the mean of x, (x, y) is the coordinate of any point in the original image, A is the gain term, B is the bias term, and G(x, y) is the coordinate of the enhanced image point.

[0018] Optionally, the step of extracting the ROI of the bearing ring from the enhanced image and obtaining an ROI image containing polar coordinates through polar coordinate transformation includes:

[0019] The entire contour of the bearing end face containing the entire defect feature is extracted and fitted to obtain the initial ROI image.

[0020] The spatial domain median filtering method is used to denoise the initially extracted ROI image;

[0021] The contour of the initially extracted ROI image is fitted using contour extraction and least squares method to obtain the ROI location information. The ROI image is then transformed into a rectangular ROI image by polar coordinate transformation.

[0022] Optionally, performing irrelevant feature removal twice on the ROI image to obtain the image to be determined includes:

[0023] Remove rows with more black pixels than the average row black pixels and columns with fewer black pixels than the average column black pixels to perform the first irrelevant feature removal.

[0024] Irrelevant white areas in the rectangular image are eliminated, and morphological operations are used to compensate for the defective areas in order to perform a second irrelevant feature elimination.

[0025] Optionally, determining whether the image to be judged has surface defects using a dual thresholding method specifically involves:

[0026] A threshold is set during the first and second irrelevant feature elimination processes, and the location and number of surface defects are determined based on the threshold, wherein the threshold is determined according to the ratio of black pixels to the total number of pixels in the image.

[0027] A second aspect of this application provides a machine vision-based bearing black spot defect detection device, the detection device comprising:

[0028] The image acquisition module is used to acquire the original image of the end face of the bearing ring to be inspected;

[0029] An image enhancement module is used to enhance the original image using an improved Gaussian filter image enhancement algorithm to obtain an enhanced image;

[0030] The ROI extraction module is used to extract the ROI of the bearing ring from the enhanced image and obtain an ROI image containing polar coordinates through polar coordinate transformation.

[0031] An irrelevant feature removal module is used to perform irrelevant feature removal twice on the ROI image to obtain the image to be determined;

[0032] The surface defect determination module is used to determine whether the image to be determined has surface defects using a dual threshold processing method.

[0033] Optionally, the image enhancement module is specifically used for:

[0034] The original image is enhanced using the following formula:

[0035]

[0036] Where σ is the standard deviation of x, μ is the mean of x, (x, y) is the coordinate of any point in the original image, A is the gain term, B is the bias term, and G(x, y) is the coordinate of the enhanced image point.

[0037] Optionally, the ROI extraction module includes:

[0038] The contour extraction submodule is used to completely extract and fit the entire contour of the bearing end face containing the entire defect features to obtain the initial extracted ROI image.

[0039] The image denoising submodule is used to denoise the initially extracted ROI image using spatial domain median filtering.

[0040] The coordinate transformation submodule is used to fit the contour of the initially extracted ROI image using contour extraction and least squares method to obtain the position information of the ROI, and to perform polar coordinate transformation on the ROI image to convert the circular ROI image into a rectangular ROI image.

[0041] Optionally, the irrelevant feature elimination module includes:

[0042] The first irrelevant feature elimination submodule is used to remove rows with a number of black pixels greater than the average number of black pixels per row and columns with a number of black pixels less than the average number of black pixels per column, in order to perform the first irrelevant feature elimination.

[0043] The second irrelevant feature elimination submodule is used to eliminate irrelevant white areas in the rectangular image and to compensate for defective areas using morphological operations to perform a second irrelevant feature elimination.

[0044] Optionally, the surface defect determination module is specifically used for:

[0045] A threshold is set during the first and second irrelevant feature elimination processes, and the location and number of surface defects are determined based on the threshold, wherein the threshold is determined according to the ratio of black pixels to the total number of pixels in the image.

[0046] This application provides a machine vision-based method and apparatus for detecting black spot defects in bearing races. It offers a comprehensive image processing-based detection method for detecting black spot defects on the surface of bearing races during the bearing manufacturing process. In the preprocessing stage, this application improves the contrast between the races and the background by using an improved Gaussian spatial filtering combined with image enhancement to facilitate better defect detection. Contour detection and least squares fitting are used to determine the Region of Interest (ROI) position information of the bearing races. The obtained ROI position information is then transformed into a rectangular image using polar coordinates, followed by irrelevant feature elimination. A dual threshold is then used to detect the presence of defects on the bearing end face. The image processing-based method and apparatus for detecting black spot defects in bearing races provided in this application can solve the problem of difficult contour acquisition by eliminating irrelevant features on the bearing end face, thus improving the accuracy of detection. Attached Figure Description

[0047] Figure 1 A flowchart illustrating a machine vision-based method for detecting black block defects in bearings, provided in an embodiment of this application;

[0048] Figure 2 A schematic diagram of a bearing black spot defect detection device based on machine vision provided in an embodiment of this application;

[0049] Figure 3 This is a schematic diagram of the structure of a machine vision system provided in an embodiment of this application;

[0050] Figure 4 A step diagram illustrating image preprocessing using an improved Gaussian filtering algorithm, provided in an embodiment of this application;

[0051] Figure 5 A physical image showing the result of preprocessing an image using an improved Gaussian filtering algorithm, as provided in this application embodiment;

[0052] Figure 6 This application provides an embodiment of an image enhancement method that enhances an image through two convolution operations, resulting in a physical image.

[0053] Figure 7 A flowchart for ROI extraction of bearing rings provided in this application embodiment;

[0054] Figure 8-9 This application provides a polar coordinate transformation diagram after ROI extraction in an embodiment of the present application.

[0055] Figure 10 A flowchart of an irrelevant feature removal algorithm provided in an embodiment of this application;

[0056] Figure 11 This is a step diagram illustrating a machine vision-based defect detection method for bearing black spots, provided in an embodiment of this application. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0058] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein.

[0059] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0060] It should be understood that in this application, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product or device.

[0061] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0062] Figure 1 The following is an exemplary flowchart illustrating a machine vision-based method for detecting black spot defects in bearings, as described in an embodiment of this application. Figure 1 As shown, the detection method includes:

[0063] S101: Obtain the original image of the end face of the bearing ring to be inspected;

[0064] Specifically, a machine vision system is used to acquire images of the bearing raceway end faces for inspection. A schematic diagram of the entire machine vision system is shown below. Figure 3 As shown, the camera uses a 500w pixel area array CCD camera with a 16nm fixed-focus lens, and the light source is a dome light source. It also includes a stage for placing bearing rings.

[0065] S102: The original image is enhanced using an improved Gaussian filter image enhancement algorithm to obtain an enhanced image;

[0066] Image preprocessing is performed on the acquired image using an improved Gaussian filter image enhancement algorithm for enhancement and contour extraction. During contour extraction, directly performing threshold segmentation using existing techniques can lead to inaccurate contour extraction due to missing defect features. Therefore, an image enhancement algorithm is needed to improve the contrast between the bearing and the background before contour fitting to facilitate extraction. In this embodiment, an improved Gaussian filter algorithm is used for image preprocessing, the specific process of which is as follows: Figure 4 As shown. The overall principle of the improved Gaussian filter algorithm for enhancing the bearing and background is as follows:

[0067] Gaussian filtering is a linear filter that is often used to eliminate Gaussian noise in signals. It utilizes the density function formula of the Gaussian normal distribution:

[0068]

[0069] Where σ is the standard deviation of x, and μ is the mean of x. Since the center point is the origin when calculating the mean, μ equals 0. Therefore, the above formula can be written as the following formula:

[0070]

[0071] This formula is for one-dimensional to two-dimensional filtering. In image processing, two one-dimensional Gaussian functions are often multiplied together to obtain a two-dimensional Gaussian function. The formula for the two-dimensional Gaussian function is as follows:

[0072]

[0073] Similarly, σ is the standard deviation of x, μ is the mean of x, and x and y are points in the graph.

[0074] A Gaussian filter can be completed by performing a convolution operation using the convolution kernel generated by this formula. To maintain the brightness of the filtered image, the sum of the weights in the convolution kernel generated by the Gaussian function is equal to 1. This characteristic of the function is utilized to improve the convolution kernel by removing the normalization process and adding gain and bias terms to the Gaussian function. This makes the sum of the weights in the convolution kernel greater than 1, thereby improving the image brightness. The improved Gaussian filter formula is:

[0075]

[0076] Where σ is the standard deviation of x, μ is the mean of x, (x, y) is the coordinate of any point in the image, A is the gain term, B is the bias term, and G(x, y) are the coordinates of each point in the enhanced image. Optionally, in this embodiment, A is selected as 1.5, B as 0.25, and σ as 1.5, at which point the image processing effect is optimal.

[0077] The improved Gaussian filter function results in higher grayscale values ​​for individual pixels during the filtering process. Therefore, using this improved Gaussian filter can increase the brightness of the bearing surface, brightening the darker areas containing black spots while preserving the defects themselves. The effect is as follows: Figure 5 As shown. Figure 5 This embodiment of the application provides a physical image of the bearing after preprocessing with an improved Gaussian filtering algorithm. In related technologies, a 7x7 convolution kernel is often used to perform convolution operations on the image, which can increase the brightness of the bearing ring. However, this method also increases the brightness of the bearing background, easily resulting in a lack of significant contrast between the bearing and the background. This embodiment of the application utilizes an improved Gaussian filter for image preprocessing, which can improve the contrast between the bearing and the background, thereby facilitating the removal of irrelevant features and improving the accuracy of contour extraction.

[0078] In practical applications, to accelerate the calculation process, based on the separable property of the Gaussian function, one-dimensional Gaussian filtering can be used to perform column convolution and row convolution separately, achieving an enhancement effect similar to that of two-dimensional Gaussian filtering. However, performing two convolution operations on the image is equivalent to separating the image enhancement into two weaker enhancements. Using this method allows for control over the enhancement effect, performing only one one-dimensional convolution for Gaussian operation, thus avoiding the problem of both the bearing and the raceway being brightened due to two enhancements. Figure 6 As shown in the figure, this is the actual effect of enhancing the image by performing two convolution operations. The image enhancement effect can be achieved by controlling only one convolution operation, which solves the problem of background and bearing ring contrast enhancement. It can effectively preserve the defect area, making the ring more complete and facilitating the subsequent extraction of the bearing end face and accurate fitting of the contour.

[0079] S103: Extract the ROI of the bearing ring from the enhanced image and obtain an ROI image containing polar coordinates through polar coordinate transformation;

[0080] In machine vision and image processing, a Region of Interest (ROI) is a region of an image that needs to be processed, delineated using shapes such as rectangles, circles, ellipses, or irregular polygons. In image processing, an ROI is a selected region of the image that is the focus of image analysis. Delineating this region allows for further processing. Using ROIs to define the target area can reduce processing time and increase accuracy.

[0081] In this embodiment of the application, after the acquired image is enhanced using an improved Gaussian filtering algorithm, the region of interest is extracted from the image, and polar coordinate transformation is performed. The specific steps are as follows:

[0082] Step 1: The acquired image is first segmented by thresholding to separate the contour from the surrounding background. The image enhancement using improved Gaussian filtering improves the bearing ring and contrast, which is beneficial for the subsequent complete extraction and fitting of the entire contour of the bearing end face containing the entire defect feature, so as to extract the ROI region.

[0083] Step 2 involves performing a series of image preprocessing operations on the ROI region extracted in Step 1. The bearing end face image segmented by the threshold is denoised using spatial domain median filtering. The basic idea is to replace the gray value of each pixel with the median of all pixels in its neighborhood. This effectively removes noise without blurring image edges and details. Next, morphological operations such as erosion and dilation are used to further process and optimize image details. The entire algorithm flowchart is shown below. Figure 7 As shown, Figure 7 A flowchart for ROI extraction of bearing rings provided in this application embodiment.

[0084] Step 3: Retain useful information by separating the entire bearing end face from the background. Use contour extraction and least squares fitting to obtain the ROI location information. Then, perform polar coordinate transformation on the ROI region to convert the entire circular surface into a rectangular image. Set the outer circumference of the end face as the width of the transformed rectangular image, and set the difference between the outer and inner radii as the height of the transformed rectangular image. The result is shown in the image below. Figure 8 As shown, Figure 8 This is a polar coordinate transformation diagram after ROI extraction, provided as an embodiment of this application.

[0085] Taking point C as an example, ρ is the polar radius of point C, and θ is the polar angle of C. The image can be transformed into polar coordinates using the formula. However, not every point can be transformed during the transformation process, and interpolation is required to fill in the gaps. Figure 8-9 This application provides a polar coordinate transformation diagram after ROI extraction, wherein... Figure 9 This is a coordinate transformation graph. Figure 8 This is the actual conversion diagram.

[0086] The polar coordinate transformation formula is:

[0087]

[0088] Where ρ is the polar radius of point C, θ is the polar angle of C, W is the width of the rectangular image, H is the height of the rectangular image, μ_ρ = H / r is the polar radius scaling factor, μ_θ = 2π / W is the angle scaling factor, and u and v are the transformed coordinates, and because Since x = ur and y = rv, the entire polar coordinate formula can be rewritten as:

[0089]

[0090] Where ρ is the polar radius of point C, θ is the polar angle of C, W is the width of the rectangular image, H is the height of the rectangular image, and μ is the polar radius scaling factor. ρ =H / r, angle scaling factor μ θ =2π / W, where u and v are the transformed coordinates, and r is the radius.

[0091] S104: Perform irrelevant feature removal twice on the ROI image to obtain the image to be determined;

[0092] Because the rectangular image of the bearing race contains some irrelevant features, mainly from inaccurate fitting of edges and surface oil stains, these features can affect the accuracy of detecting bearing black spot defects. Therefore, this method employs the following steps to remove irrelevant features based on the detection requirements. The flowchart of the entire irrelevant feature removal algorithm is shown below. Figure 10 As shown, Figure 10 This document provides a flowchart of an irrelevant feature removal algorithm for an embodiment of this application. The acquired rectangular image is read, and irrelevant feature removal is performed twice. The reason for performing two irrelevant feature removals is that during the first removal, a threshold judgment is made to eliminate defective products. Specific steps include:

[0093] Step 1, the first irrelevant feature removal is performed by removing rows with more black pixels than the average row black pixels and columns with less black pixels than the average column black pixels. Due to the uncertainty of the fitting and the irrelevant black features caused by surface oil, median filtering is also applied, so the texture features of the bearing surface need to be removed.

[0094] Step 2, the second texture feature removal, is mainly to eliminate irrelevant white areas in the rectangular image. Since the second removal will make the defects more prominent, it is easy to mistakenly remove black defects. Therefore, morphological operations are used to compensate for the defect area during the removal to preserve the defect information.

[0095] S105: Use a dual thresholding method to determine whether the image to be judged has surface defects.

[0096] This step uses dual thresholding to detect and determine the presence of surface defects. Thresholds are set during the two texture feature removal processes. The thresholds are determined by the ratio of black pixels to the total number of pixels in the image, and defects are determined based on the thresholds.

[0097] Figure 11This application provides a step-by-step diagram for detecting black block defects in bearings based on machine vision. This application proposes a machine vision-based method for detecting black block defects on bearing surfaces with complex texture features, solving the problems of difficulty in extracting the surface contours of some bearing races and low detection rates due to excessive irrelevant surface features in the detection of black block defects on bearing end faces. Preprocessing the extracted image using an improved Gaussian filter function, followed by polar coordinate transformation of the Region of Interest (ROI) and two irrelevant feature removals, improves detection accuracy.

[0098] This application embodiment also provides a machine vision-based bearing black spot defect detection device 20, which includes:

[0099] Image acquisition module 201 is used to acquire the original image of the end face of the bearing ring to be inspected;

[0100] Image enhancement module 202 is used to enhance the original image using an improved Gaussian filter image enhancement algorithm to obtain an enhanced image;

[0101] Specifically, the image enhancement module 202 is used to enhance the original image using the following formula:

[0102]

[0103] Where σ is the standard deviation of x, μ is the mean of x, (x, y) is the coordinate of any point in the original image, A is the gain term, B is the bias term, and G(x, y) is the coordinate of the enhanced image point.

[0104] The ROI extraction module 203 is used to extract the ROI of the bearing ring from the enhanced image and obtain an ROI image containing polar coordinates through polar coordinate transformation.

[0105] The ROI extraction module includes:

[0106] The contour extraction submodule 2031 is used to completely extract and fit the entire contour of the bearing end face containing the entire defect feature to obtain the initial extracted ROI image.

[0107] The image denoising submodule 2032 is used to denoise the initially extracted ROI image using spatial domain median filtering.

[0108] The coordinate transformation submodule 2033 is used to extract the contour of the initially extracted ROI image using contour extraction and least squares fitting to obtain the position information of the ROI, and to perform polar coordinate transformation on the ROI image to convert the circular ROI image into a rectangular ROI image.

[0109] The irrelevant feature removal module 204 is used to perform irrelevant feature removal twice on the ROI image to obtain the image to be determined;

[0110] The first irrelevant feature elimination submodule 2041 is used to remove rows with a number of black pixels greater than the average number of black pixels in the row and columns with a number of black pixels less than the average number of black pixels in the column, in order to perform the first irrelevant feature elimination.

[0111] The second irrelevant feature elimination submodule 2042 is used to eliminate irrelevant white areas in the rectangular image and to compensate for defective areas using morphological operations to perform a second irrelevant feature elimination.

[0112] The surface defect determination module 205 is used to determine whether the image to be determined has surface defects using a dual threshold processing method.

[0113] Specifically, the surface defect determination module 205 is used for:

[0114] A threshold is set during the first and second irrelevant feature elimination processes. The location and number of surface defects are determined based on the threshold, where the threshold is determined according to the ratio of black pixels to the total number of pixels in the image.

[0115] The bearing black block defect detection device 20 based on machine vision provided in this application embodiment can realize the various processes implemented in the above-mentioned bearing black block defect detection method embodiment based on machine vision. To avoid repetition, it will not be described again here.

[0116] The bearing black block defect detection device 20 based on machine vision provided in this application enhances the original image using an improved Gaussian filter image enhancement algorithm to obtain an enhanced image. The enhanced image then extracts the Region of Interest (ROI) of the bearing race and obtains an ROI image containing polar coordinates through polar coordinate transformation. The ROI image undergoes two irrelevant feature removal operations to obtain an image to be judged. A dual-threshold processing method is used to determine whether the image to be judged contains surface defects. This detection device addresses the problems of difficulty in extracting the surface contour of some races and low detection rate due to excessive irrelevant surface features in the detection of black block defects on the bearing end face. It proposes to preprocess the extracted image using an improved Gaussian filter function, and then perform polar coordinate transformation and two irrelevant feature removal operations on the ROI region. This reduces the processing difficulty and improves the accuracy of bearing surface black block defect detection.

[0117] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0118] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0119] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0120] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0121] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0122] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0125] Note that, unless otherwise explicitly stated, all features disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by alternative features for achieving the same, equivalent, or similar purpose. Therefore, unless explicitly stated otherwise, each claimed feature is merely one example of a set of equivalent or similar features. Where used, "further," "preferably," "even further," and "more preferably" are simple starting points for describing another embodiment based on the foregoing embodiments, the combination of which with the foregoing embodiments constitutes the complete configuration of another embodiment. Any combination of several "further," "preferably," "even further," or "more preferably" settings following the same embodiment constitutes yet another embodiment.

[0126] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functions and structural principles of the present invention have been demonstrated and explained in the embodiments, and any variations or modifications may be made to the implementation of the present invention without departing from the stated principles.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A machine vision based bearing black spot defect detection method characterized by, The detection method comprises: obtaining an original image of a bearing ring end face to be detected; enhancing the original image through an improved Gaussian filter image enhancement algorithm to obtain an enhanced image; extracting a bearing ring ROI from the enhanced image and obtaining an ROI image containing polar coordinates through polar coordinate transformation; eliminating irrelevant features twice from the ROI image to obtain a to-be-judged image; determining whether the to-be-judged image contains surface defects through a double-threshold processing method; wherein the extracting a bearing ring ROI from the enhanced image and obtaining an ROI image containing polar coordinates through polar coordinate transformation comprises: completely extracting and fitting a bearing end face containing entire defect features to obtain an initial extraction ROI image; performing image denoising on the initial extraction ROI image through a spatial domain filter median filter method; fitting the contour of the initial extraction ROI image through contour extraction and a least square method to obtain the position information of the ROI, and performing polar coordinate transformation on the ROI image to convert the circular ROI image into a rectangular ROI image through polar coordinate transformation; the polar coordinate transformation specifically comprises: converting the entire circular surface of the ROI region into a rectangular image through polar coordinate transformation, setting the circumference of the outer ring of the end face as the width of the converted rectangular image, and setting the difference between the outer ring radius and the inner ring radius as the height of the converted rectangular image; the formula of the polar coordinate transformation is specifically: where p is the polar radius of point C, Q is the polar angle of C, W is the width of the rectangular image, H is the height of the rectangular image, p_scale is the polar radius scaling factor , Q_scale is the angle scaling factor , u, v are the converted coordinates, r is the radius, and because , , , the entire polar coordinate formula can be rewritten as: ; the eliminating irrelevant features twice from the ROI image to obtain a to-be-judged image comprises: removing the rows with a number of black pixels greater than the average number of black pixels in the rows and the columns with a number of black pixels less than the average number of black pixels in the columns for the first irrelevant feature elimination; eliminating irrelevant white areas in the rectangular image and compensating the defect areas through morphological operation for the second irrelevant feature elimination; the determining whether the to-be-judged image contains surface defects through the double-threshold processing method specifically comprises: setting a threshold value during the first irrelevant feature elimination and the second irrelevant feature elimination, and determining the position and quantity of the surface defects according to the threshold value, wherein the threshold value is determined according to the proportion of black pixels in the image and the total number of pixels in the image.

2. The detection method according to claim 1, characterized in that, the enhancing the original image through the improved Gaussian filter image enhancement algorithm specifically comprises: enhancing the original image through the following formula: wherein σ is the standard deviation of x, (x, y) is the coordinate of any point in the original image, A is a gain term, B is a bias term, and G(x, y) is the enhanced image point coordinate.

3. A machine vision based bearing black spot defect detection apparatus, characterized by, the detection device comprises: an image acquisition module configured to obtain an original image of a bearing ring end face to be detected; an image enhancement module configured to enhance the original image through an improved Gaussian filter image enhancement algorithm to obtain an enhanced image; an ROI extraction module configured to extract a bearing ring ROI from the enhanced image and obtain an ROI image containing polar coordinates through polar coordinate transformation; an irrelevant feature elimination module configured to eliminate irrelevant features twice from the ROI image to obtain a to-be-judged image; a surface defect judgment module configured to determine whether the to-be-judged image contains surface defects through a double-threshold processing method. The ROI extraction module comprises: a contour extraction submodule, configured to extract a bearing end face containing an entire defect feature and fit the entire contour to obtain an initial extraction ROI image; an image denoising submodule, configured to perform image denoising on the initial extraction ROI image by using a spatial domain filtering median filtering method; a coordinate conversion submodule, configured to fit a contour of the initial extraction ROI image by using contour extraction and a least square method to obtain position information of the ROI, and perform polar coordinate transformation on the ROI image to convert a circular ROI image into a rectangular ROI image by polar coordinate transformation; the coordinate conversion submodule is specifically configured to: convert an entire circular surface of the ROI region into a rectangular image by polar coordinate transformation, set a circumference of the end face outer ring as a width of the converted rectangular image, and set a difference between the outer ring radius and the inner ring radius as a height of the converted rectangular image; a formula of the polar coordinate transformation is specifically as follows: where p is the polar radius of point C, Q is the polar angle of C, W is the width of the rectangular image, H is the height of the rectangular image, p_scale is the polar radius scaling factor , Q_scale is the angle scaling factor , u, v are the converted coordinates, r is the radius, and because , , , the entire polar coordinate formula can be rewritten as: ; the irrelevant feature elimination module comprises: a first irrelevant feature elimination submodule, configured to remove a row with a number of black pixels greater than a row average number of black pixels and a column with a number of black pixels less than a column average number of black pixels to perform a first irrelevant feature elimination; a second irrelevant feature elimination submodule, configured to eliminate irrelevant white areas in the rectangular image, and compensate a defect area by using a morphological operation to perform a second irrelevant feature elimination; the surface defect determination module is specifically configured to: set a threshold value in the process of the first irrelevant feature elimination and the second irrelevant feature elimination, and determine a position and a number of surface defects according to the threshold value, wherein the threshold value is determined according to a proportion of black pixels in the image and total pixels in the image.

4. The detection device of claim 3, wherein, the image enhancement module is specifically configured to: enhance the original image by the following formula: where σ is the standard deviation of x, (x, y) is the coordinate of any point in the original image, A is the gain term, B is the bias term, and G(x, y) is the enhanced image point coordinate.

Citation Information

Patent Citations

  • Oil pipe flat grinding quality detection method based on machine vision

    CN115456949A