A 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
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Among existing methods for detecting surface defects on camshafts, detection based on differences in grayscale values 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, accurately identifies defective areas, and reduces misjudgments.
Smart Images

Figure CN121120643B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image analysis, and in particular to a surface flaw detection method for camshaft production quality inspection. BACKGROUND
[0002] As a core component of an engine, the surface quality of a camshaft often directly affects the performance and service life of the engine. Surface flaws such as scratches, bumps, and pits of the camshaft often accelerate wear and tear, reduce sealing, and even cause component failure. Therefore, accurate surface flaw detection in the production quality inspection link is crucial for ensuring product quality and reliability, and is an indispensable process link in the automotive manufacturing industry. Currently, when performing flaw detection, the method commonly used is to perform flaw detection according to the difference in gray value in the corresponding surface gray image of the object.
[0003] However, when performing flaw detection according to the difference in gray value in the corresponding surface gray image of the camshaft, the following technical problems often exist:
[0004] Since the gray scale of flaws such as scratches often differs little from the gray scale of normal areas, when performing flaw detection on the surface of the camshaft, considering only the difference in gray scale often leads to misjudgment of flaw pixels, thereby resulting in poor accuracy of camshaft surface flaw detection. SUMMARY
[0005] In order to solve the technical problem of poor accuracy of camshaft surface flaw detection, the present application provides a surface flaw detection method for camshaft production quality inspection.
[0006] In a first aspect, the present application provides a surface flaw detection method for camshaft production quality inspection, which comprises:
[0007] 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;
[0008] screening a target symmetry axis from the target surface image according to the symmetry condition between the feature points in each feature matching point group;
[0009] segmenting the target surface image with the target symmetry axis as a segmentation line to obtain two target sub-images;
[0010] obtaining a low-frequency image of each target sub-image at each preset filter scale, and obtaining a high-frequency image corresponding to each low-frequency image;
[0011] 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 corresponding high-frequency images, a target filter scale is selected from all the preset filter scales;
[0012] According to the difference between the corresponding high-frequency images of the low-frequency images of the two target sub-images under the target filter scale, flaw identification is performed.
[0013] In combination with the first aspect, in a possible implementation manner, the selecting the feature matching point group from the target surface image comprises:
[0014] The SIFT algorithm is used to select each two mutually matched feature points from the target surface image to form a feature matching point group.
[0015] In combination with the first aspect, in a possible implementation manner, the selecting 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:
[0016] Connecting two feature points in each feature matching point group to obtain a feature line segment corresponding to each feature matching point group;
[0017] Drawing a perpendicular bisector of each feature line segment, denoted as a candidate symmetry axis;
[0018] The target symmetry axis is selected from all the candidate symmetry axes.
[0019] In combination with the first aspect, in a possible implementation manner, the selecting the target symmetry axis from all the candidate symmetry axes comprises:
[0020] The candidate symmetry axis that appears most frequently is determined as the target symmetry axis.
[0021] In combination with the first aspect, in a possible implementation manner, the obtaining the low-frequency image of each target sub-image under each preset filter scale comprises:
[0022] Any one of the preset filter scales is determined as a marked filter scale, the filter scale of a Gaussian low-pass filter is set to the marked filter scale, and the low-frequency image of each target sub-image under the marked filter scale is obtained through the Gaussian low-pass filter.
[0023] In combination with the first aspect, in a possible implementation manner, the obtaining the high-frequency image corresponding to each low-frequency image comprises:
[0024] Any one of the low-frequency images is determined as a marked low-frequency image, and a difference image between the target sub-image to which the marked low-frequency image belongs and the marked low-frequency image is determined as the high-frequency image corresponding to the marked low-frequency image.
[0025] With reference to the first aspect, in a possible implementation, the filtering scale is determined according to a difference between low-frequency images of the two target sub-images at the same preset filtering scale and a difference between corresponding high-frequency images thereof.
[0026] The evaluation effect factor corresponding to each preset filtering scale is determined according to a difference between pixel point corresponding gray values in the low-frequency images of the two target sub-images at the same preset filtering scale and a difference between pixel point corresponding gray values in corresponding high-frequency images thereof.
[0027] The preset filtering scale corresponding to the maximum evaluation effect factor is selected from all preset filtering scales as the target filtering scale.
[0028] With reference to the first aspect, in a possible implementation, the evaluation effect factor corresponding to each preset filtering scale is determined according to a difference between pixel point corresponding gray values in the low-frequency images of the two target sub-images at the same preset filtering scale and a difference between pixel point corresponding gray values in corresponding high-frequency images thereof.
[0029] Any one of the preset filtering scales is determined as a marked filtering scale, and the low-frequency images of the two target sub-images at the marked filtering scale are respectively denoted as a first temporary low-frequency image and a second temporary low-frequency image.
[0030] 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.
[0031] A difference between the gray representative indicators 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, where the gray representative indicators corresponding to the images represent overall gray conditions of the images.
[0032] A difference between the gray representative indicators 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.
[0033] 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.
[0034] With reference to the first aspect, in a possible implementation, the gray representative indicators corresponding to the images are obtained by:
[0035] The mean value of the gray scale values corresponding to all pixel points in the image is determined as the gray scale representative index corresponding to the image.
[0036] In combination with the first aspect, in a possible implementation manner, 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:
[0037] 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.
[0038] The gray scale value corresponding to each pixel point in the target difference image is normalized to obtain a flaw possibility index corresponding to each pixel point in the target difference image.
[0039] 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.
[0040] The flaw possibility region is identified according to all the flaw possibility pixel points.
[0041] Whether the flaw possibility region is a flaw real region is determined according to the area of the flaw possibility region.
[0042] In a second aspect, the present application provides a surface flaw detection system for camshaft production quality inspection, the system comprising:
[0043] An acquisition and screening module is configured to acquire a target surface image corresponding to a camshaft to be detected, and screen feature matching point groups from the target surface image.
[0044] A symmetry axis screening module is configured to screen a target symmetry axis from the target surface image according to the symmetry between feature points in each feature matching point group.
[0045] An image segmentation module is configured to segment the target surface image with the target symmetry axis as a segmentation line to obtain two target sub-images.
[0046] A high and low frequency image acquisition module is configured to acquire a low frequency image of each target sub-image under each preset filtering scale, and acquire a high frequency image corresponding to each low frequency image.
[0047] A filtering scale screening module is configured to screen a target filtering scale from all preset filtering scales according to the difference between the low frequency images of the two target sub-images under the same preset filtering scale, and the difference between the high frequency images corresponding thereto.
[0048] A flaw identification module is configured to identify flaws 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.
[0049] In a third aspect, a server is provided, comprising a memory and a processor. The memory is configured to store executable program code, and the processor is configured to invoke and run the executable program code from the memory, so that the device executes the method in the first aspect or any possible implementation manner of the first aspect.
[0050] In a fourth aspect, a computer program product is provided, comprising computer program code, which, when executed on a computer, causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect.
[0051] In a fifth aspect, a computer-readable storage medium is provided, which stores computer program code, which, when executed on a computer, causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect.
[0052] The present application has the following beneficial effects:
[0053] The surface flaw detection method for camshaft production quality inspection provided by the present application realizes camshaft surface flaw detection by analyzing a target surface image, solves the technical problem of poor accuracy of camshaft surface flaw detection, and improves the accuracy of camshaft surface flaw detection. Specifically, the present application identifies a target symmetry axis by analyzing the symmetry between matching feature points in the target surface image, divides the target surface image into two relatively symmetrical parts, continues to analyze low-frequency images under different preset filter scales and their corresponding high-frequency images, filters out a target filter scale, and performs flaw identification based on the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filter scale, relatively accurately realizes camshaft surface flaw detection, and thus improves the accuracy of camshaft surface flaw detection. BRIEF DESCRIPTION OF DRAWINGS
[0054] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0055] Figure 1 The flowchart of the surface flaw detection method for camshaft production quality inspection of the present application;
[0056] Figure 2 The composition structure schematic diagram of the surface flaw detection system for camshaft production quality inspection of the present application;
[0057] Figure 3 Fig. 1 is a structural schematic diagram of a computer device according to the present application. DETAILED DESCRIPTION
[0058] In order to further clarify the technical means and effects taken by the present application to achieve the predetermined inventive objectives, the specific implementation, structure, features and effects of the technical solutions proposed according to the present application are described in detail below in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0059] 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 the present application belongs.
[0060] Reference Figure 1 Fig. 1 shows the flow of some embodiments of a surface flaw detection method for camshaft production quality inspection according to the present application. The surface flaw detection method for camshaft production quality inspection includes the following steps:
[0061] Step S1, obtaining a target surface image corresponding to a camshaft to be detected, and screening a feature matching point group from the target surface image.
[0062] Wherein, the camshaft to be detected can be a camshaft to be detected for surface flaw detection. The target surface image can be a surface image of the camshaft to be detected. Two feature points in the feature matching point group match each other.
[0063] As an example, this step can include the following steps:
[0064] First, obtain a target surface image corresponding to a camshaft to be detected.
[0065] For example, the surface image of the camshaft to be detected can be photographed by an industrial camera, and the image photographed at this time is recorded as an initial image. The initial image is grayed, and the grayed image is subjected to adaptive mean filtering denoising to obtain the target surface image.
[0066] Optionally, the method for obtaining the target surface image corresponding to the camshaft to be detected can further comprise the following steps. First, a dynamic rotating detection platform is installed to clamp the camshaft and ensure the rotating accuracy. Three high-resolution flash industrial cameras are arranged on the same side along the camshaft axis direction at equal intervals. A high-uniformity strip light source is erected, and the angle and brightness of the light source are adjusted to make the surface of the camshaft evenly illuminated. A servo motor is connected to a control system, and a turntable control module is bound to preset a 180° rotation program. Then, when the camshaft reaches the detection device on the camshaft quality inspection conveying belt, the three cameras are triggered to take pictures synchronously to obtain three original images of the front surface of the camshaft. The turntable is controlled to rotate 180°, and the same three cameras are triggered again to obtain the back surface images. Then, all the images taken are inputted to extract feature points in the overlapping area using an ORB (Oriented FAST and Rotated BRIEF) algorithm for splicing. A complete surface image of the camshaft is obtained after splicing. The FAST (Features from Accelerated Segment Test) is mainly used for feature point detection. The BRIEF (Binary Robust Independent Elementary Features) is mainly used for feature descriptor calculation. Since the camshaft is a three-dimensional structure, the surface image thereof is also a three-dimensional structure. The obtained image can be finally spliced into a complete unfolded planar image by cutting along the axial position of the camshaft at any position. Finally, the planar image is subjected to grayscale processing, and adaptive mean filtering is used for noise reduction to obtain a final camshaft surface unfolded image, which is recorded as a target surface image.
[0067] In the second step, SIFT (Scale Invariant Feature Transform) algorithm is used to select each two mutually matched feature points from the target surface image to form a feature matching point group.
[0068] In step S2, the target symmetry axis is selected from the target surface image according to the symmetry condition between the feature points in each feature matching point group.
[0069] In practice, the camshaft can be regarded as an approximately axis-symmetrical part from the overall geometry. The camshaft often has highly consistent surface textures and machining features at symmetrical positions. For example, the grinding lines, glossiness, roughness of a certain journal on the left side relative to the center axis often should be almost exactly the same as that of the journal at the symmetrical position on the right side. Moreover, the outer cylindrical surface of the journal, the outer cylindrical surface of the shaft body, the addendum circle cylindrical surface of the gear, and the cylindrical surface of the thrust collar of the camshaft are often central axis-symmetrical. The outer cylindrical surface of the journal is often the most important axis-symmetrical part, which is the support and rotation reference of the camshaft. The outer cylindrical surface of the shaft body is often the rod-shaped part connecting various cams and gears. The addendum circle cylindrical surface of the gear is the cylindrical surface of the outermost edge of the gear. The cylindrical surface of the thrust collar can be an annular structure for axial positioning.
[0070] As an example, the step can include the following steps:
[0071] Firstly, connect two feature points in each feature matching point group to obtain a feature line segment corresponding to each feature matching point group.
[0072] Secondly, draw the mid-perpendicular of each feature line segment, and mark it as a candidate symmetrical axis.
[0073] Thirdly, screen the target symmetrical axis from all candidate symmetrical axes.
[0074] For example, the candidate symmetrical axis with the most occurrences can be determined as the target symmetrical axis. For example, if there are 100 candidate symmetrical axes, 65 of which are the same straight line marked as the first straight line, 10 of which are the same straight line marked as the second straight line, 20 of which are the same straight line marked as the third straight line, and 5 of which are the same straight line marked as the fourth straight line, then the target symmetrical axis can be the first straight line with the most occurrences.
[0075] It should be noted that obtaining the target symmetrical axis representing the central symmetrical axis of the camshaft to be detected can facilitate subsequent identification of defects that destroy the symmetry.
[0076] Optionally, the target symmetrical axis can also be screened from all candidate symmetrical axes through a voting mechanism.
[0077] Step S3: dividing the target surface image into two target sub-images with the target symmetrical axis as the division line.
[0078] As an example, the target surface image is divided into two sub-images with the target symmetrical axis as the division line, and each sub-image is marked as a target sub-image.
[0079] It should be noted that in the case of no defects, the two target sub-images often exhibit approximate symmetry.
[0080] Step S4, 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.
[0081] wherein the preset filter scale can be a pre-set filter scale, which can be controlled by a frequency domain standard deviation. The low-frequency image can be a blurred background obtained after filtering the original image. The high-frequency image can be details and edges obtained after subtracting the low-frequency image from the original image.
[0082] It should be noted that the more different preset filter scales are set, the more likely the target filter scale obtained by subsequent screening can represent the best filter scale.
[0083] As an example, the present step can include the following steps:
[0084] Firstly, any one of the preset filter scales is determined as a marker filter scale, the filter scale of the Gaussian low-pass filter is set to the marker filter scale, and the low-frequency image of each target sub-image under the marker filter scale is obtained through the Gaussian low-pass filter.
[0085] Secondly, any one of the low-frequency images is determined as a marker low-frequency image, and the difference image between the target sub-image to which the marker low-frequency image belongs and the marker low-frequency image is determined as the high-frequency image corresponding to the marker low-frequency image.
[0086] Step S5, screening 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.
[0087] In actual situations, environmental light interference, such as uneven lighting and shadows, is usually manifested as low-frequency signals, and the distribution on the symmetrical two sides has no correlation. Real defects, such as scratches and dents, often destroy the symmetry of the distribution and are manifested as local high-frequency abnormalities in the image. By Gaussian low-pass filtering to decompose the image into low-frequency and high-frequency components, the image information is essentially separated according to the spatial frequency: the low-frequency component mainly contains light changes and slowly changing background interference, and the high-frequency component retains the texture, edge and defect details. In the process of finding the best filter scale, considering that environmental interference can maximize the low-frequency difference, and considering that the real symmetrical texture accounts for a large proportion, which can minimize the high-frequency difference, the best filter scale is obtained.
[0088] As an example, the present step can include the following steps:
[0089] The first step is to determine the evaluation effect factor corresponding to each preset filtering scale according to the difference between the corresponding gray values of the pixel points in the low-frequency images of the two target sub-images under the same preset filtering scale and the difference between the corresponding gray values of the pixel points in the high-frequency images thereof.
[0090] The first sub-step is to determine any one of the preset filtering scales as a marked filtering scale, and to denote the low-frequency images of the two target sub-images under the marked filtering scale as a first temporary low-frequency image and a second temporary low-frequency image, respectively.
[0091] The second sub-step is to denote the high-frequency images corresponding to the first temporary low-frequency image and the second temporary low-frequency image as a first temporary high-frequency image and a second temporary high-frequency image, respectively.
[0092] The third sub-step is to determine the absolute value of the difference between the gray representative indicators corresponding to the first temporary low-frequency image and the second temporary low-frequency image as the target low-frequency difference corresponding to the marked filtering scale.
[0093] The gray representative indicator corresponding to an image can represent the overall gray situation of the image.
[0094] For example, the mean value of the gray values corresponding to all the pixel points in the image can be determined as the gray representative indicator corresponding to the image.
[0095] The fourth sub-step is to determine the absolute value of the difference between the gray representative indicators corresponding to the first temporary high-frequency image and the second temporary high-frequency image as the target high-frequency difference corresponding to the marked filtering scale.
[0096] The fifth sub-step is to determine the evaluation effect factor corresponding to the marked filtering scale according to the target low-frequency difference and the target high-frequency difference corresponding to the marked filtering scale.
[0097] For example, the formula for determining the evaluation effect factor corresponding to the marked filtering scale can be:
[0098] ;
[0099] Q is the evaluation effect factor corresponding to the marked filtering scale. is an absolute value function. is the gray representative indicator corresponding to the first temporary low-frequency image. is the gray representative indicator corresponding to the second temporary low-frequency image. is the gray representative indicator corresponding to the first temporary high-frequency image. is the gray representative indicator corresponding to the second temporary high-frequency image. is a target low-frequency difference corresponding to the marked filter scale. is a target high-frequency difference corresponding to the marked filter scale. is a preset factor greater than 0, mainly used to prevent the denominator from being 0, which can be 0.0001.
[0100] It should be noted that the greater the evaluation effect factor corresponding to the marked filter scale, the closer the marked filter scale is to the optimal filter scale.
[0101] Secondly, the preset filter scale corresponding to the largest evaluation effect factor is selected from all preset filter scales as the target filter scale.
[0102] Step S6, according to the difference between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filter scale, the flaw is identified.
[0103] As an example, the present step can include the following steps:
[0104] Firstly, the difference image between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filter scale is determined as the target difference image.
[0105] It should be noted that the high-frequency components on the symmetric two sides should mainly include consistent surface texture, possible flaws and some components of the camshaft itself that do not exhibit a symmetric structure, while environmental light and other interference are often maximally suppressed in the low frequency and offset by the difference operation. Among them, some components of the camshaft itself that do not exhibit a symmetric structure can include the profile of the cam, the teeth of the gear, the keyway and the pin hole, etc. Therefore, by calculating the absolute difference between the high-frequency images on the left and right sides, the areas that destroy the symmetry, such as real flaws or some components of the camshaft itself that do not exhibit a symmetric structure, are often amplified and highlighted in the signal space. Normal symmetric texture often approaches zero in theory after difference, while flaw areas or asymmetric structures often produce significant non-zero responses due to the lack of symmetric corresponding points.
[0106] Secondly, the gray value corresponding to each pixel point in the above target difference image is normalized to obtain the flaw possibility index corresponding to each pixel point in the above target difference image.
[0107] It should be noted that the greater the flaw possibility index corresponding to the pixel point, the more likely the pixel point is a flaw pixel point or a component pixel point of the camshaft itself that does not exhibit a symmetric structure.
[0108] Thirdly, 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.
[0109] The preset flaw threshold can be a preset threshold, which can be 0.3.
[0110] Fourthly, according to all the possible defect pixels, a possible defect region is identified.
[0111] For example, a connected domain extraction can be performed on the region formed by all the possible defect pixels in the target difference image, and the extracted connected domain is recorded as the possible defect region.
[0112] Optionally, the method for obtaining the possible defect region can also be as follows: a closing operation is performed on the target difference image, and an appropriate size of a structural element is used to perform an inflation and corrosion operation on the possible defect pixels, so as to connect the broken defect points caused by imaging or threshold segmentation, and form a continuous and complete region; then, an opening operation is performed to eliminate the isolated noise points in the image, and the purity and reliability of the detection result are improved, and the region finally obtained at this time is recorded as the possible defect region.
[0113] Fifthly, whether the possible defect region is a real defect region is determined according to the area of the possible defect region.
[0114] It should be noted that the possible defect region can be a real defect region or an asymmetric part. Generally, the area of the defect region is usually smaller than the area of the asymmetric part. If the defect is larger than the part, it usually means that the defect is very obvious, and this kind of situation can be found by the human eye directly, and therefore, the embodiment of the present application mainly aims at identifying a smaller defect.
[0115] For example, the area of each possible defect region is normalized to obtain a part possibility factor corresponding to each possible defect region, and if the part possibility factor corresponding to the possible defect region is smaller than a preset part threshold, the possible defect region is determined as a real defect region. The preset part threshold can be a threshold set in advance, which can be 0.5.
[0116] Reference Figure 2 Based on the same inventive concept as the above method embodiment, the present application provides a surface defect detection system for camshaft production quality inspection, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The above computer program is executed by the processor to realize the steps of a surface defect detection method for camshaft production quality inspection, which can specifically include:
[0117] The acquisition and screening module 201 is configured to acquire a target surface image corresponding to a camshaft to be detected, and screen feature matching point groups from the target surface image.
[0118] The symmetry axis screening module 202 is configured to screen target symmetry axes from the target surface image according to the symmetry between the feature points in each feature matching point group.
[0119] The image segmentation module 203 is configured to segment the target surface image to obtain two target sub-images by taking the target symmetry axis as a segmentation line.
[0120] The high-low frequency image acquisition module 204 is configured to acquire a low frequency image of each target sub-image under each preset filter scale, and acquire a high frequency image corresponding to each low frequency image.
[0121] The filter scale screening module 205 is configured to screen a 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.
[0122] The flaw identification module 206 is configured to identify flaws according to the difference between the high frequency images corresponding to the low frequency images of the two target sub-images under the target filter scale.
[0123] Figure 3 is a structural schematic diagram of a computer device provided by an embodiment of the present application. As shown in the example, Figure 3 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, wherein the processor 302 executes the computer program 303, so that the computer device can execute any of the aforementioned surface flaw detection methods for camshaft production quality inspection.
[0124] Based on the same inventive concept as the above method embodiments, the present application provides a server including a memory and a processor. The memory is configured to store executable program code, and the processor is configured to call and run the executable program code from the memory, so that the device executes any of the above surface flaw detection methods for camshaft production quality inspection.
[0125] Based on the same inventive concept as the above method embodiments, the present application provides a computer program product, which includes computer program code. When the computer program code is running on a computer, the computer executes any of the above surface flaw detection methods for camshaft production quality inspection.
[0126] Based on the same inventive concept as the above method embodiments, the present application provides a computer readable storage medium, which stores computer program code. When the computer program code is running on a computer, the computer executes any of the above surface flaw detection methods for camshaft production quality inspection.
[0127] To sum up, the application identifies the target symmetry axis by analyzing the symmetry between the matching feature points in the target surface image, divides the target surface image into two relatively symmetrical parts, continues to analyze the low-frequency image under different preset filter scales and the corresponding high-frequency image, screens out the target filter scale, and identifies the 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 filter scale, relatively accurately realizes the camshaft surface defect detection, and thereby improves the accuracy of the camshaft surface defect detection.
[0128] The above examples are only used to illustrate the technical solutions of the present application, but not limit the same; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
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 feature matching point groups from the target surface image, wherein two feature points in each feature matching point group match each other; screening a target symmetry axis from the target surface image according to symmetry conditions between feature points in each feature matching point group; segmenting the target surface image by taking the target symmetry axis as a segmentation line to obtain two target sub-images; obtaining low-frequency images of each target sub-image under each preset filtering scale, and obtaining high-frequency images corresponding to each low-frequency image; screening a target filtering scale from all preset filtering scales according to differences between low-frequency images of the two target sub-images under the same preset filtering scale and differences between high-frequency images corresponding to the low-frequency images; performing flaw identification according to differences between high-frequency images corresponding to low-frequency images of the two target sub-images under the target filtering scale; The step of screening the target filtering scale from all preset filtering scales according to the differences between the low-frequency images of the two target sub-images under the same preset filtering scale and the differences between the high-frequency images corresponding to the low-frequency images comprises the following steps: determining an evaluation effect factor corresponding to each preset filtering scale according to differences between gray values of pixel points in the low-frequency images of the two target sub-images under the same preset filtering scale and differences between gray values of pixel points in high-frequency images corresponding to the low-frequency images; screening, from all preset filtering scales, a preset filtering scale corresponding to the largest evaluation effect factor as the target filtering scale; The step of performing flaw identification according to the differences between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale comprises the following steps: determining, as a target difference image, a difference image between the high-frequency images corresponding to the low-frequency images of the two target sub-images under the target filtering scale; normalizing gray values corresponding to each pixel point in the target difference image to obtain a 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, determining the pixel point as a flaw possibility pixel point; identifying a flaw possibility region according to all flaw possibility pixel points; determining whether the flaw possibility region is a flaw real region according to an area of the flaw possibility region.
2. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The step of screening the feature matching point groups from the target surface image comprises the following steps: screening, from the target surface image, every two mutually matching feature points as a feature matching point group by using a SIFT algorithm.
3. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The step of screening the target symmetry axis from the target surface image according to symmetry conditions between feature points in each feature matching point group comprises the following steps: 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 step of screening the target symmetry axis from all candidate symmetry axes comprises the following steps: determining, as the target symmetry axis, the candidate symmetry axis that appears the most frequently.
5. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The step of obtaining the low-frequency images of each target sub-image under each preset filtering scale comprises the following steps: Determining any one preset filter scale as a mark filter scale, setting a filter scale of a Gaussian low-pass filter as the mark filter scale, and obtaining a low-frequency image of each target sub-image under the mark filter scale through the Gaussian low-pass filter.
6. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The method for obtaining the high-frequency image corresponding to each low-frequency image comprises: Determining any one low-frequency image as a mark low-frequency image, and determining a difference image between the target sub-image to which the mark low-frequency image belongs and the mark low-frequency image as the high-frequency image corresponding to the mark low-frequency image.
7. The surface flaw detection method for camshaft production quality inspection according to claim 1, characterized in that, The method for determining the evaluation effect factor corresponding to each preset filter scale according to the difference between the gray values of the pixel points in the low-frequency images of the two target sub-images under the same preset filter scale and the difference between the gray values of the pixel points in the high-frequency images corresponding to the low-frequency images comprises: Determining any one preset filter scale as a mark filter scale, and denoting the low-frequency images of the two target sub-images under the mark filter scale as a first temporary low-frequency image and a second temporary low-frequency image, respectively; Denoting the high-frequency images corresponding to the first temporary low-frequency image and the second temporary low-frequency image as a first temporary high-frequency image and a second temporary high-frequency image, respectively; Determining the absolute value of the difference between the gray representative indicators corresponding to the first temporary low-frequency image and the second temporary low-frequency image as a target low-frequency difference corresponding to the mark filter scale, wherein the gray representative indicator of an image represents the overall gray situation of the image; Determining the absolute value of the difference between the gray representative indicators corresponding to the first temporary high-frequency image and the second temporary high-frequency image as a target high-frequency difference corresponding to the mark filter scale; Determining the evaluation effect factor corresponding to the mark filter scale according to the target low-frequency difference and the target high-frequency difference corresponding to the mark filter scale.
8. The surface flaw detection method for camshaft production quality inspection according to claim 7, characterized in that, The method for obtaining the gray representative indicator of an image comprises: Determining the mean value of the gray values of all pixel points in the image as the gray representative indicator of the image.
Citation Information
Patent Citations
Multi-modal image robust matching VNS method
CN113343747A
Camshaft end face defect detection method and system
CN119784672A