Surface flaw detection method for camshaft production quality inspection
By filtering feature point groups and identifying the axis of symmetry in camshaft surface images, decomposing low-frequency and high-frequency images, selecting the optimal filtering scale, and analyzing the differences in high-frequency images, the problem of low accuracy in camshaft surface defect detection is solved, achieving higher detection precision.
Patent Information
- Application Number
- CN202511658180.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Among existing methods for detecting surface defects on camshafts, grayscale-based detection is prone to misjudgment and has poor accuracy.
By acquiring camshaft surface images, filtering feature matching point groups, identifying the axis of symmetry and segmenting the image, using a Gaussian low-pass filter to decompose low-frequency and high-frequency images, selecting the optimal filtering scale, and analyzing the differences in high-frequency images to identify defects.
It improves the accuracy of camshaft surface defect detection and accurately identifies defective areas.
Smart Images

Figure CN121120643A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, and more specifically to a method for detecting surface defects in camshaft production quality inspection. Background Technology
[0002] As a core component of the engine, the surface quality of the camshaft directly affects engine performance and lifespan. Surface defects on the camshaft, such as scratches, dents, and pitting, often accelerate wear, reduce sealing performance, and can even lead to component failure. Therefore, accurate surface defect detection during the production quality inspection process is crucial for ensuring product quality and reliability, and is an indispensable process in the automotive manufacturing industry. Currently, the common method for defect detection is to identify defects based on the differences in grayscale values in the corresponding grayscale image of the object's surface.
[0003] However, when performing defect detection based on the different grayscale values in the grayscale image of the surface corresponding to the camshaft, the following technical problems often arise: Since the grayscale of scratches and other defects is often not much different from that of normal areas, when detecting defects on the camshaft surface, if only the difference in grayscale value is considered, it will often lead to misjudgment of defective pixels, resulting in poor accuracy of camshaft surface defect detection. Summary of the Invention
[0004] To address the technical problem of poor accuracy in detecting surface defects on camshafts, this invention proposes a surface defect detection method for camshaft production quality inspection.
[0005] In a first aspect, the present invention provides a method for detecting surface defects in camshaft production quality inspection, the method comprising: Obtain the target surface image corresponding to the camshaft to be detected, and filter out the feature matching point group from the target surface image, wherein two feature points in the feature matching point group match each other; Based on the symmetry between feature points in each feature matching point group, the target symmetry axis is selected from the target surface image; The target surface image is segmented using the target's axis of symmetry as the dividing line, resulting in two target sub-images. Acquire the low-frequency image of each target sub-image at each preset filtering scale, and acquire the high-frequency image corresponding to each low-frequency image; Based on the difference between the low-frequency images of two target sub-images under the same preset filtering scale, and the difference between their corresponding high-frequency images, the target filtering scale is selected from all preset filtering scales. Flaw identification is performed based on the difference between the high-frequency image corresponding to the low-frequency image of two target sub-images at the target filtering scale.
[0006] In conjunction with the first aspect above, in one possible implementation, the step of filtering feature matching point groups from the target surface image includes: The SIFT algorithm is used to select every two matching feature points from the target surface image to form a feature matching point group.
[0007] In conjunction with the first aspect above, in one possible implementation, the step of selecting the target symmetry axis from the target surface image based on the symmetry between feature points in each feature matching point group includes: Connect the two feature points in each feature matching point group to obtain the feature line segment corresponding to each feature matching point group; Draw the perpendicular bisector of each characteristic line segment, and denote it as the candidate axis of symmetry; Select the target symmetry axis from all candidate symmetry axes.
[0008] In conjunction with the first aspect above, in one possible implementation, the step of selecting the target symmetry axis from all candidate symmetry axes includes: The candidate axis of symmetry that appears most frequently is determined as the target axis of symmetry.
[0009] In conjunction with the first aspect above, in one possible implementation, acquiring the low-frequency image of each target sub-image at each preset filtering scale includes: Any preset filtering scale is determined as the marker filtering scale. The filtering scale of the Gaussian low-pass filter is set as the marker filtering scale, and the low-frequency image of each target sub-image under the marker filtering scale is obtained through the Gaussian low-pass filter.
[0010] In conjunction with the first aspect above, in one possible implementation, obtaining the high-frequency image corresponding to each low-frequency image includes: Any low-frequency image is identified as a labeled low-frequency image, and the difference image between the target sub-image to which the labeled low-frequency image belongs and the labeled low-frequency image is identified as the high-frequency image corresponding to the labeled low-frequency image.
[0011] In conjunction with the first aspect above, in one possible implementation, the step of selecting the target filtering scale from all preset filtering scales based on the difference between the low-frequency images of two target sub-images at the same preset filtering scale, and the difference between their corresponding high-frequency images, includes: Based on the difference between the gray values of pixels in the low-frequency image of the two target sub-images under the same preset filtering scale, and the difference between the gray values of pixels in the corresponding high-frequency image, the evaluation effect factor corresponding to each preset filtering scale is determined. Select the preset filter scale with the largest corresponding evaluation effect factor from all preset filter scales, and use it as the target filter scale.
[0012] In conjunction with the first aspect above, in one possible implementation, determining the evaluation effect factor corresponding to each preset filtering scale based on the difference between the gray values corresponding to pixels in the low-frequency image of the two target sub-images under the same preset filtering scale, and the difference between the gray values corresponding to pixels in the corresponding high-frequency image, includes: Any preset filtering scale is determined as the marker filtering scale, and the low-frequency images of the two target sub-images under the marker filtering scale are respectively denoted as the first temporary low-frequency image and the second temporary low-frequency image. The high-frequency image corresponding to the first temporary low-frequency image and the high-frequency image corresponding to the second temporary low-frequency image are respectively denoted as the first temporary high-frequency image and the second temporary high-frequency image. The absolute value of the difference between the gray-level representative index corresponding to the first temporary low-frequency image and the gray-level representative index corresponding to the second temporary low-frequency image is determined as the target low-frequency difference corresponding to the marker filtering scale, wherein the gray-level representative index corresponding to the image represents the overall gray-level situation of the image. The absolute value of the difference between the gray-level representative index corresponding to the first temporary high-frequency image and the gray-level representative index corresponding to the second temporary high-frequency image is determined as the target high-frequency difference corresponding to the label filtering scale. The evaluation effect factor corresponding to the labeled filtering scale is determined based on the target low-frequency difference and target high-frequency difference corresponding to the labeled filtering scale.
[0013] In conjunction with the first aspect above, in one possible implementation, the method for obtaining the grayscale representation index corresponding to the image includes: The average gray value of all pixels in the image is used as the gray-scale representative index of the image.
[0014] In conjunction with the first aspect above, in one possible implementation, the defect identification based on the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images at the target filtering scale includes: The difference image between the low-frequency image and the high-frequency image corresponding to the low-frequency image of the two target sub-images at the target filtering scale is determined as the target difference image; The grayscale value corresponding to each pixel in the target difference image is normalized to obtain the defect probability index corresponding to each pixel in the target difference image. If the defect probability index corresponding to a pixel is greater than the preset defect threshold, then the pixel is identified as a defective pixel. Identify potential defect areas based on all possible defect pixels; Based on the area of the potential defect, determine whether the potential defect area is the actual defect area.
[0015] Secondly, the present invention provides a surface defect detection system for camshaft production quality inspection, the system comprising: The acquisition and filtering module is used to acquire the target surface image corresponding to the camshaft to be detected, and to filter out the feature matching point group from the target surface image; The symmetry axis filtering module is used to filter out the target symmetry axis from the target surface image based on the symmetry between feature points in each feature matching point group; The image segmentation module is used to segment the target surface image using the target's axis of symmetry as the segmentation line, resulting in two target sub-images. The high and low frequency image acquisition module is used to acquire the low frequency image of each target sub-image at each preset filtering scale, and to acquire the high frequency image corresponding to each low frequency image; The filter scale selection module is used to select the target filter scale from all preset filter scales based on the difference between the low-frequency images of two target sub-images under the same preset filter scale and the difference between their corresponding high-frequency images. The defect identification module is used to identify defects based on the difference between the high-frequency image corresponding to the low-frequency image of two target sub-images at the target filtering scale.
[0016] Thirdly, a server is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the device to perform the methods of the first aspect or any possible implementation thereof.
[0017] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0018] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0019] The present invention has the following beneficial effects: This invention provides a surface defect detection method for camshaft production quality inspection. By analyzing target surface images, it achieves camshaft surface defect detection, solving the technical problem of poor accuracy in camshaft surface defect detection and improving its accuracy. Specifically, this invention identifies the target axis of symmetry by analyzing the symmetry between matching feature points in the target surface image, and divides the target surface image into two relatively symmetrical parts. It further analyzes low-frequency images and their corresponding high-frequency images under different preset filtering scales, selects the target filtering scale, and identifies defects based on the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale. This relatively accurate method achieves camshaft surface defect detection, thereby improving the accuracy of camshaft surface defect detection. Attached Figure Description
[0020] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a surface defect detection method for camshaft production quality inspection according to the present invention; Figure 2 This is a schematic diagram of the composition structure of a surface defect detection system for camshaft production quality inspection according to the present invention; Figure 3 This is a schematic diagram of the structure of a computer device according to the present invention. Detailed Implementation
[0022] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the technical solution proposed according to the present invention are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0024] refer to Figure 1 This document illustrates the flowchart of some embodiments of a surface defect detection method for camshaft production quality inspection according to the present invention. The surface defect detection method for camshaft production quality inspection includes the following steps: Step S1: Obtain the target surface image corresponding to the camshaft to be detected, and filter out the feature matching point group from the target surface image.
[0025] The camshaft to be detected can be any camshaft whose surface defects are to be detected. The target surface image can be any surface image of the camshaft to be detected. Two feature points in the feature matching point group are matched with each other.
[0026] As an example, this step may include the following steps: The first step is to acquire an image of the target surface corresponding to the camshaft to be inspected.
[0027] For example, an industrial camera can be used to capture an image of the surface of the camshaft to be inspected. This image is then recorded as the initial image. The initial image is converted to grayscale, and then adaptive mean filtering is applied to the grayscale image to reduce noise, thus obtaining the target surface image.
[0028] Optionally, the method for acquiring the target surface image corresponding to the camshaft to be inspected can also be as follows: First, a dynamic rotating inspection stage is installed to clamp the camshaft and ensure rotational accuracy. Three high-resolution flash industrial cameras are deployed equidistantly on the same side along the camshaft axis. A highly uniform strip light source is set up, and the angle and brightness of the light source are adjusted to make the camshaft surface uniformly illuminated. A servo motor and control system are connected, and a turntable control module is bound, with a preset 180° rotation program. Next, on the camshaft quality inspection conveyor belt, when the camshaft reaches the inspection device, the three cameras are triggered to simultaneously capture images, obtaining the original images of the three areas on the front of the camshaft. The turntable is then controlled to rotate 180°, and the same three cameras are triggered again to acquire images of the reverse side. Then, all the captured images are input and the ORB (Oriented FAST and Rotated BRIEF) algorithm is used to extract feature points in the overlapping areas and stitch them together to obtain a complete camshaft surface image. Among them, FAST (Features from Accelerated Segment Test) is mainly used for feature point detection. BRIEF (BinaryRobust Independent Elementary Features) is primarily used for feature descriptor calculation. Since the camshaft is a three-dimensional structure, its surface image is also three-dimensional. It can be horizontally cut along the camshaft axis at any position, and the resulting images are ultimately stitched together to form a complete unfolded planar image. Finally, the planar image is converted to grayscale and subjected to adaptive mean filtering for noise reduction, yielding the final unfolded camshaft surface image, denoted as the target surface image.
[0029] The second step involves using the SIFT (Scale Invariant Feature Transform) algorithm to select every two matching feature points from the target surface image to form a feature matching point group.
[0030] Step S2: Based on the symmetry between feature points in each feature matching point group, select the target symmetry axis from the target surface image.
[0031] In practice, from an overall geometric perspective, a camshaft can be considered an approximately axisymmetric part. Camshafts in symmetrical positions often exhibit highly consistent surface textures and machining characteristics. For example, relative to the central axis, the grinding pattern, gloss, and roughness of a journal on the left side should often be almost identical to that of the journal on the symmetrical position on the right. Furthermore, the outer cylindrical surfaces of the camshaft journals, the outer cylindrical surfaces of the shaft body, the addendum cylindrical surfaces of the gears, and the cylindrical surfaces of the thrust retainer are often centrally axisymmetric. The outer cylindrical surface of the journal is often the most important axisymmetric part, serving as the support and rotation reference for the camshaft. The outer cylindrical surface of the shaft body is often the rod-like portion connecting the various cams and gears. The addendum cylindrical surface of the gear is the outermost cylindrical surface of the gear. The cylindrical surface of the thrust retainer can be a ring-shaped structure used for axial positioning.
[0032] As an example, this step may include the following steps: The first step is to connect the two feature points in each feature matching point group to obtain the feature line segment corresponding to each feature matching point group.
[0033] The second step is to draw the perpendicular bisector of each feature line segment, and denote it as the candidate axis of symmetry.
[0034] The third step is to select the target symmetry axis from all candidate symmetry axes.
[0035] For example, the most frequent candidate axis of symmetry can be determined as the target axis of symmetry. For instance, if there are 100 candidate axes of symmetry, and 65 of them are the same straight line (denoted as the first line), 10 are the same straight line (denoted as the second line), 20 are the same straight line (denoted as the third line), and 5 are the same straight line (denoted as the fourth line), then the target axis of symmetry can be the most frequent first line.
[0036] It should be noted that obtaining the target axis of symmetry, which represents the central axis of symmetry of the camshaft to be tested, can facilitate the subsequent identification of defects that disrupt the symmetry.
[0037] Optionally, a voting mechanism can be used to select the target symmetry axis from all candidate symmetry axes.
[0038] Step S3: Using the target's axis of symmetry as the dividing line, the target surface image is segmented to obtain two target sub-images.
[0039] As an example, the target surface image is divided into two sub-images using the target's axis of symmetry as the dividing line, and each sub-image is denoted as the target sub-image.
[0040] It should be noted that, under flawless conditions, the two target sub-images often exhibit near-symmetry.
[0041] Step S4: Obtain the low-frequency image of each target sub-image at each preset filtering scale, and obtain the high-frequency image corresponding to each low-frequency image.
[0042] The preset filtering scale can be a pre-defined filtering scale, which can be controlled by the frequency domain standard deviation. The low-frequency image can be the blurred background obtained after filtering the original image. The high-frequency image can be the details and edges obtained by subtracting the low-frequency image from the original image.
[0043] It should be noted that the more different preset filter scales are set, the more likely the target filter scale obtained in the subsequent screening can represent the optimal filter scale.
[0044] As an example, this step may include the following steps: The first step is to determine any preset filtering scale as the marker filtering scale, set the filtering scale of the Gaussian low-pass filter to the above-mentioned marker filtering scale, and obtain the low-frequency image of each target sub-image under the above-mentioned marker filtering scale through the Gaussian low-pass filter.
[0045] The second step is to identify any low-frequency image as the marked low-frequency image, and to identify the difference image between the target sub-image to which the marked low-frequency image belongs and the marked low-frequency image as the high-frequency image corresponding to the marked low-frequency image.
[0046] Step S5: Based on the difference between the low-frequency images of two target sub-images under the same preset filtering scale, and the difference between their corresponding high-frequency images, select the target filtering scale from all preset filtering scales.
[0047] In reality, ambient lighting interference, such as uneven lighting and shadows, typically manifests as low-frequency signals, and their distribution on both sides of symmetry is uncorrelated. Real defects, such as scratches and dents, often disrupt the symmetry of the distribution and appear as localized high-frequency anomalies in the image. Decomposing an image into low-frequency and high-frequency components using Gaussian low-pass filtering essentially separates image information according to spatial frequency: the low-frequency components mainly contain changes in lighting and slowly varying background interference, while the high-frequency components retain details such as texture, edges, and defects. In finding the optimal filtering scale, it is considered that environmental interference often maximizes low-frequency differences, while the more prevalent real symmetrical textures often minimize high-frequency differences, thus obtaining the optimal filtering scale.
[0048] As an example, this step may include the following steps: The first step, determining the evaluation effect factor for each preset filtering scale based on the difference in grayscale values between pixels in the low-frequency image of the two target sub-images under the same preset filtering scale, and the difference in grayscale values between pixels in their corresponding high-frequency images, may include the following sub-steps: The first sub-step involves determining any preset filtering scale as the marker filtering scale, and then recording the low-frequency images of the two target sub-images under the aforementioned marker filtering scale as the first temporary low-frequency image and the second temporary low-frequency image, respectively.
[0049] The second sub-step involves recording the high-frequency image corresponding to the first temporary low-frequency image and the high-frequency image corresponding to the second temporary low-frequency image as the first temporary high-frequency image and the second temporary high-frequency image, respectively.
[0050] The third sub-step is to determine the absolute value of the difference between the gray-level representative index corresponding to the first temporary low-frequency image and the gray-level representative index corresponding to the second temporary low-frequency image as the target low-frequency difference corresponding to the above-mentioned marker filtering scale.
[0051] Among them, the grayscale index corresponding to the image can characterize the overall grayscale situation of the image.
[0052] For example, the average gray value of all pixels in an image can be used as the gray-scale representative index of the image.
[0053] The fourth sub-step is to determine the absolute value of the difference between the gray-level representative index corresponding to the first temporary high-frequency image and the gray-level representative index corresponding to the second temporary high-frequency image as the target high-frequency difference corresponding to the above-mentioned marker filtering scale.
[0054] The fifth sub-step involves determining the evaluation effect factor corresponding to the aforementioned marker filtering scale based on the target low-frequency difference and target high-frequency difference.
[0055] For example, the formula for determining the evaluation effect factor corresponding to the labeled filtering scale can be: ; Where Q is the evaluation performance factor corresponding to the labeled filtering scale. It is an absolute value function. It is the grayscale representation index corresponding to the first temporary low-frequency image. It is the grayscale representation index corresponding to the second temporary low-frequency image. It is the grayscale representation index corresponding to the first temporary high-frequency image. It is the grayscale representation index corresponding to the second temporary high-frequency image. It represents the target low-frequency difference corresponding to the marked filtering scale. It represents the target high-frequency difference corresponding to the marked filtering scale. It is a pre-set factor greater than 0, mainly used to prevent the denominator from being 0, and it can be 0.0001.
[0056] It should be noted that the larger the evaluation effect factor corresponding to the labeled filtering scale, the closer the labeled filtering scale is to the optimal filtering scale.
[0057] The second step is to select the preset filter scale with the largest corresponding evaluation effect factor from all preset filter scales, and use it as the target filter scale.
[0058] Step S6: Defect identification is performed based on the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images at the target filtering scale.
[0059] As an example, this step may include the following steps: The first step is to determine the target difference image as the difference image between the high-frequency images corresponding to the low-frequency images of the two target sub-images at the target filtering scale.
[0060] It should be noted that the high-frequency components on both sides of the symmetry should mainly include consistent surface textures, potential defects, and some components of the camshaft that do not exhibit a symmetrical structure. Interference from ambient light and other factors is often suppressed to the minimum in the low frequencies and canceled out by differential operations. Components of the camshaft that do not exhibit a symmetrical structure can include the cam profile, gear teeth, keyways, and pin holes. Therefore, by calculating the absolute difference between the high-frequency images on the left and right sides, regions that disrupt symmetry are often amplified and highlighted in the signal space, such as actual defects or components of the camshaft that do not exhibit a symmetrical structure. Normal symmetrical textures theoretically tend to have values close to zero after differential analysis, while defective areas or asymmetrical structures often produce significant non-zero responses due to the lack of symmetrical counterparts.
[0061] The second step is to normalize the gray value corresponding to each pixel in the target difference image to obtain the possible defect index corresponding to each pixel in the target difference image.
[0062] It should be noted that the higher the defect probability index of a pixel, the more likely that the pixel is to be a defective pixel or a pixel of a component that does not exhibit a symmetrical structure in the camshaft itself.
[0063] The third step is to determine the pixel as a potential defect pixel if the defect probability index of the pixel is greater than the preset defect threshold.
[0064] The preset defect threshold can be a pre-set threshold, which can be 0.3.
[0065] The fourth step is to identify the possible areas of defects based on all possible pixels of defects.
[0066] For example, connected component extraction can be performed on the region formed by all possible defective pixels in the target difference image, and the extracted connected component can be denoted as the possible defective region.
[0067] Optionally, the method for obtaining the possible defect region can also be as follows: perform a closing operation on the target difference image, use a structuring element of appropriate size to perform dilation and erosion operations on the possible defect pixels to connect the broken defect points caused by imaging or threshold segmentation, and form a continuous and complete region; then perform an opening operation to eliminate isolated noise points in the image, improve the purity and reliability of the detection results, and record the region finally obtained at this time as the possible defect region.
[0068] The fifth step is to determine whether the area of potential defects is the actual area of defects based on the area of potential defects.
[0069] It should be noted that the defective area can be a genuine defective area or an asymmetrical part. Generally, the area of the defective area is smaller than the area of the asymmetrical part. If the defect is larger than the part, it usually indicates that the defect is very obvious and can be directly detected by the human eye. Therefore, this embodiment of the invention mainly targets the identification of smaller defects.
[0070] For example, the area of each possible defect region is normalized to obtain the component probability factor corresponding to each possible defect region. If the component probability factor corresponding to a possible defect region is less than a preset component threshold, then the possible defect region is determined as a real defect region. The preset component threshold can be a pre-set threshold, which can be 0.5.
[0071] refer to Figure 2Based on the same inventive concept as the above-described method embodiments, this invention provides a surface defect detection system for camshaft production quality inspection. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps of a surface defect detection method for camshaft production quality inspection, specifically including: The acquisition and filtering module 201 is used to acquire the target surface image corresponding to the camshaft to be detected, and to filter out the feature matching point group from the target surface image; The symmetry axis filtering module 202 is used to filter out the target symmetry axis from the target surface image based on the symmetry between feature points in each feature matching point group; Image segmentation module 203 is used to segment the target surface image with the target symmetry axis as the segmentation line to obtain two target sub-images; The high and low frequency image acquisition module 204 is used to acquire the low frequency image of each target sub-image at each preset filtering scale, and to acquire the high frequency image corresponding to each low frequency image; The filter scale selection module 205 is used to select the target filter scale from all preset filter scales based on the difference between the low-frequency images of two target sub-images under the same preset filter scale and the difference between their corresponding high-frequency images. The defect recognition module 206 is used to recognize defects based on the difference between the high-frequency image corresponding to the low-frequency image of two target sub-images at the target filtering scale.
[0072] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. For example, as shown... Figure 3 As shown, the computer device 300 includes: a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program 303, the computer device can execute any of the surface defect detection methods for camshaft production quality inspection described above.
[0073] Based on the same inventive concept as the above-described method embodiments, the present invention provides a server, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the device to execute any of the above-described surface defect detection methods for camshaft production quality inspection.
[0074] Based on the same inventive concept as the above-described method embodiments, the present invention provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to execute any of the above-described surface defect detection methods for camshaft production quality inspection.
[0075] Based on the same inventive concept as the above-described method embodiments, the present invention provides a computer-readable storage medium storing computer program code, which, when executed on a computer, causes the computer to perform any of the above-described surface defect detection methods for camshaft production quality inspection.
[0076] In summary, this invention identifies the target axis of symmetry by analyzing the symmetry between matching feature points in the target surface image, and divides the target surface image into two relatively symmetrical parts. It further analyzes the low-frequency images and their corresponding high-frequency images under different preset filtering scales, selects the target filtering scale, and identifies defects based on the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale. This relatively accurate detection of camshaft surface defects improves the accuracy of camshaft surface defect detection.
[0077] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 of the technical features. 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 the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A surface flaw detection method for camshaft production quality inspection, characterized by, The method comprises the following steps: obtaining a target surface image corresponding to a camshaft to be detected, and screening a feature matching point group from the target surface image, wherein two feature points in the feature matching point group match each other; screening a target symmetry axis from the target surface image according to a symmetry condition between the feature points in each feature matching point group; segmenting the target surface image with the target symmetry axis as a segmentation line to obtain two target sub-images; obtaining a low-frequency image of each target sub-image under each preset filter scale, and obtaining a high-frequency image corresponding to each low-frequency image; screening a target filter scale from all preset filter scales according to a difference between the low-frequency images of the two target sub-images under the same preset filter scale and a difference between the high-frequency images corresponding thereto; performing flaw identification according to a difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filter scale.
2. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The screening of the feature matching point group from the target surface image comprises: screening each two mutually matching feature points from the target surface image by a SIFT algorithm to form the feature matching point group.
3. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The screening of the target symmetry axis from the target surface image according to the symmetry condition between the feature points in each feature matching point group comprises: connecting two feature points in each feature matching point group to obtain a feature line segment corresponding to each feature matching point group; drawing a perpendicular bisector of each feature line segment as a candidate symmetry axis; screening the target symmetry axis from all candidate symmetry axes.
4. The surface flaw detection method for camshaft production quality inspection according to claim 3, characterized in that, The screening of the target symmetry axis from all candidate symmetry axes comprises: determining the candidate symmetry axis appearing the most as the target symmetry axis.
5. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The obtaining of the low-frequency image of each target sub-image under each preset filter scale comprises: determining any one preset filter scale as a marked filter scale, setting a filter scale of a Gaussian low-pass filter as the marked filter scale, and obtaining the low-frequency image of each target sub-image under the marked filter scale by the Gaussian low-pass filter.
6. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The obtaining of the high-frequency image corresponding to each low-frequency image comprises: determining any one low-frequency image as a marked low-frequency image, and determining a difference image between the target sub-image to which the marked low-frequency image belongs and the marked low-frequency image as the high-frequency image corresponding to the marked low-frequency image.
7. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The screening of the target filter scale from all preset filter scales according to the difference between the low-frequency images of the two target sub-images under the same preset filter scale and the difference between the high-frequency images corresponding thereto comprises: determining an evaluation effect factor corresponding to each preset filter scale according to a difference between pixel point corresponding gray values in the low-frequency images of the two target sub-images under the same preset filter scale and a difference between pixel point corresponding gray values in the high-frequency images corresponding thereto; screening a preset filter scale corresponding to the largest evaluation effect factor from all preset filter scales as the target filter scale.
8. The surface flaw detection method for camshaft production quality inspection according to claim 7, characterized in that, The evaluation effect factor corresponding to each preset filtering scale is determined according to the difference between the gray values of the pixel points corresponding to the low-frequency images of the two target sub-images under the same preset filtering scale and the difference between the gray values of the pixel points corresponding to the high-frequency images corresponding to the low-frequency images, and the evaluation effect factor corresponding to each preset filtering scale comprises: An arbitrary preset filtering scale is determined as a marked filtering scale, and the low-frequency images of the two target sub-images under the marked filtering scale are respectively denoted as a first temporary low-frequency image and a second temporary low-frequency image; The high-frequency images corresponding to the first temporary low-frequency image and the second temporary low-frequency image are respectively denoted as a first temporary high-frequency image and a second temporary high-frequency image; The absolute value of the difference between the gray representative indexes corresponding to the first temporary low-frequency image and the second temporary low-frequency image is determined as a target low-frequency difference corresponding to the marked filtering scale, wherein the gray representative indexes corresponding to the images represent the overall gray situation of the images; The absolute value of the difference between the gray representative indexes corresponding to the first temporary high-frequency image and the second temporary high-frequency image is determined as a target high-frequency difference corresponding to the marked filtering scale; The evaluation effect factor corresponding to the marked filtering scale is determined according to the target low-frequency difference and the target high-frequency difference corresponding to the marked filtering scale.
9. The surface flaw detection method for camshaft production quality inspection according to claim 8, characterized in that, The method for obtaining the gray representative indexes corresponding to the images comprises: The mean value of the gray values of all the pixel points in the image is determined as the gray representative index corresponding to the image.
10. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The flaw identification according to the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale comprises: The difference image between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale is determined as a target difference image; The gray value corresponding to each pixel point in the target difference image is normalized to obtain the flaw possibility index corresponding to each pixel point in the target difference image; If the flaw possibility index corresponding to the pixel point is greater than a preset flaw threshold, the pixel point is determined as a flaw possibility pixel point; The flaw possibility region is identified according to all the flaw possibility pixel points; Whether the flaw possibility region is a flaw real region is determined according to the area of the flaw possibility region.
Citation Information
Patent Citations
Multi-modal image robust matching VNS method
CN113343747A
Scene text detection method, system and device based on deep learning
CN116682121A
Camshaft end face defect detection method and system
CN119784672A
Audio retrieval and identification method and device
US20210165827A1
Method, apparatus, and medium for video processing
WO2024175012A1