Engine cylinder surface defect detection method and system
Through laser displacement sensor and Fourier transform technology, combined with Sobel edge detection and adaptive binarization methods, the accurate identification problem of engine cylinder surface defect detection in complex curved surfaces and high noise environments is solved, and the micron-level defects are achieved accurate detection and efficient identification.
Patent Information
- Application Number
- CN202411497368.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing engine cylinder surface defect detection technology is difficult to accurately identify subtle defects on complex curved surfaces, especially in high noise environments, which cannot achieve accurate detection of micron-level defects, and there are problems of missed detection and missed detection.
The laser displacement sensor is used to obtain the cylinder surface height information, and noise filtering is performed through fast Fourier transform. Defects are identified by Sobel edge detection and adaptive binarization methods. Defect geometric features are calculated using third-order fit polynomials, and pre-constructed. The standard template image library matches and generates detailed defect reports.
It realizes accurate detection and identification of fine defects on the surface of the engine cylinder block, reduces missed and missed detection, and improves detection accuracy and production efficiency.
Smart Images

Figure CN119290761A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of engine cylinder surface defect detection, and in particular relates to an engine cylinder surface defect detection method and system. Background Art
[0002] At present, the application of engine cylinder surface defect detection technology in industrial production faces many challenges, especially the obvious deficiencies of automated detection systems under high precision and high efficiency requirements. For example, traditional two-dimensional visual inspection technology is widely used in industrial quality control, but this method can only capture two-dimensional image information of the cylinder surface. For complex three-dimensional structures such as cylinders, especially areas with height differences and curved surfaces, it is impossible to accurately obtain its complete surface information. This limitation leads to poor detection of micron-level defects such as pores, scratches, cracks, etc., especially defects in depth and volume are often difficult to capture. In addition, the existing detection technology has limited ability to deal with noise interference. Due to the interference of external factors such as vibration, lighting conditions, and material surface reflectivity in industrial environments, a large amount of noise is often mixed in the data, which makes the detection system prone to false detection and missed detection when identifying defects. Although some technologies improve detection accuracy by adding image processing algorithms such as edge detection and morphological processing, these methods are still insufficient when dealing with complex surfaces due to the lack of three-dimensional spatial information and effective noise filtering methods. Therefore, there is an urgent need for an engine cylinder surface defect detection method based on three-dimensional morphology detection, high precision and strong noise resistance, which can still achieve accurate detection of tiny surface defects under complex curved surfaces and high noise environments, especially in the case of automated production lines, and maintain efficient and real-time detection capabilities to improve overall detection accuracy and production efficiency, and reduce errors caused by human factors. Summary of the invention
[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to propose a method for detecting surface defects of an engine cylinder block, aiming to solve the technical problem that the detection methods in the prior art are difficult to accurately identify subtle defects on complex curved surfaces, especially in a data environment with high noise, and cannot achieve accurate detection of micron-level defects.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: The present invention provides a method for detecting surface defects of an engine cylinder block.
[0005] The engine cylinder surface defect detection method comprises:
[0006] Step S10: obtaining height information of defect points on the surface of the engine cylinder block based on the laser displacement sensor, and collecting data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generating a three-dimensional height data dot matrix;
[0007] Step S20: Perform three-dimensional frequency domain processing on the generated three-dimensional height data lattice by fast Fourier transform, and keep the spatial frequency range within 0.1 μm during the processing. -1 To 10μm -1 After filtering out high-frequency and low-frequency noises, the three-dimensional frequency domain data is restored to three-dimensional space domain data by inverse Fourier transform, thereby obtaining noise-free three-dimensional morphological data.
[0008] Step S30: using the Sobel algorithm based on edge detection to preliminarily process the three-dimensional shape data, combining the local area adaptive binarization method to determine the boundary of the defect and then determine the defect area, and matching the image with the pre-built standard template image library to identify the surface defects, including pores, scratches and cracks; wherein the standard template image library is established based on the statistics of historical data and is used to identify defects on the surfaces of different types of cylinder bodies;
[0009] Step S40: Fitting the boundary of the surface defect based on the third-order fitting polynomial, optimizing the fitting result by the least square method, and calculating the geometric characteristics of the surface defect, including the depth, width and perimeter information of the surface defect; wherein, the depth information of the defect must satisfy the depth greater than 0.05 mm to be regarded as a valid defect to ensure that the fitting error in the fitting process is within ±0.01 mm;
[0010] Step S50: Generate a defect report based on the geometric features of the surface defect, and feed it back to the front-end operation screen in real time through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected.
[0011] Preferably, in step S30, the step of using the Sobel algorithm based on edge detection to preliminarily process the three-dimensional shape data includes:
[0012] Step S301: Calculate the gradients in the horizontal and vertical directions to obtain edge strength;
[0013]
[0014]
[0015] Among them, G x and G y Represent the gradients in the horizontal and vertical directions respectively, I represents the two-dimensional slice of the input three-dimensional shape data, and the matrix product represents the convolution operation;
[0016] Step S302: Calculate the final edge strength G:
[0017]
[0018] Among them, G represents the edge strength, which is used to determine the boundary of the defect.
[0019] Preferably, in step S30, the step of performing image matching with a pre-built standard template image library includes:
[0020] Step S303: extracting a template image corresponding to the cylinder body type and the processing surface area currently being inspected from a pre-built standard template image library, wherein the template image is a defect-free surface image collected based on historical data and standard processes;
[0021] Step S304: grayscale normalization is performed on the defect area image and the template image. The grayscale normalization formula is:
[0022]
[0023] Among them, K is the input defect area image data, K min and K max are the minimum and maximum grayscale values of the input image, respectively, and K′ is the standardized image;
[0024] Step S305: Calculate the similarity between the detection image and the template image based on the normalized cross-correlation coefficient NCC, the formula is:
[0025]
[0026] Among them, T i Represents the pixel value in the template image, T′ i Represents the corresponding pixel value in the detection image, and are the average pixel values of the template image and the detection image respectively;
[0027] Step S306: Based on the similarity calculation result, if the NCC value is less than the set threshold, it is determined that there is a defect in the area and marked as a suspected defect area.
[0028] Preferably, in step S10, the laser displacement sensor is scanned only on the upper surface of the cylinder body, excluding the side surface and the bottom surface of the cylinder body.
[0029] Preferably, in step S10, the scanning speed of the laser displacement sensor is limited to 1 mm to 5 mm per second.
[0030] Preferably, in step S50, the defect report is updated in real time after being generated, and the operator can view it on the front screen and adjust the production process according to the defect information.
[0031] Preferably, in step S40, the calculation of the fitting polynomial is performed for a maximum of five iterations to avoid overfitting.
[0032] The present invention also provides an engine cylinder surface defect detection system comprising:
[0033] The height acquisition module is used to obtain the height information of the defect points on the surface of the engine cylinder block based on the laser displacement sensor, and to collect data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generate a three-dimensional height data dot matrix;
[0034] The frequency domain processing module is used to perform three-dimensional frequency domain processing on the generated three-dimensional height data lattice through fast Fourier transform, and the spatial frequency range is kept within 0.1μm during the processing -1 To 10μm -1 After filtering out high-frequency and low-frequency noises, the three-dimensional frequency domain data is restored to three-dimensional space domain data by inverse Fourier transform, thereby obtaining noise-free three-dimensional morphological data.
[0035] A defect recognition module is used to perform preliminary processing on the three-dimensional shape data using the Sobel algorithm based on edge detection, determine the boundary of the defect and then the defect area by combining the local area adaptive binarization method, and identify surface defects, including pores, scratches and cracks, by performing image matching with a pre-built standard template image library; wherein the standard template image library is established based on the statistics of historical data and is used to perform defect recognition on the surfaces of different types of cylinder bodies;
[0036] The fitting and feature calculation module is used to fit the boundaries of surface defects based on the third-order fitting polynomial, optimize the fitting results through the least squares method, and calculate the geometric features of surface defects, including the depth, width and perimeter information of surface defects; among which, the depth information of the defect must satisfy the depth greater than 0.05mm to be considered as a valid defect to ensure that the fitting error during the fitting process is within ±0.01mm;
[0037] A report generation and feedback module, which is used to generate a defect report according to the geometric features of the surface defects, and to provide real-time feedback to the front-end operation screen through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected;
[0038] The present invention also provides an engine cylinder block surface defect detection device, comprising a memory, a processor, and an engine cylinder block surface defect detection program stored in the memory and executable on the processor, wherein the engine cylinder block surface defect detection program implements the engine cylinder block surface defect detection method when executed by the processor.
[0039] The present invention also provides a computer program product, including an engine cylinder surface defect detection program, and the engine cylinder surface defect detection program implements the engine cylinder surface defect detection method when executed by a processor.
[0040] The beneficial effect of the present invention is that compared with the detection methods in the prior art, which are difficult to accurately identify subtle defects on complex surfaces, especially in a noisy data environment, and cannot achieve the technical problem of accurate detection of micron-level defects, the present application uses high-precision laser displacement sensors and Fourier transform noise filtering to achieve accurate detection and identification of subtle surface defects, thereby avoiding the problems of missed detection and false detection in the prior art and improving detection accuracy and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 The figure is a flow chart of a first embodiment of a method for detecting surface defects of an engine cylinder block according to the present invention.
[0043] Figure 2 The present invention is a schematic diagram of an equipment for a method for detecting surface defects of an engine cylinder block. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Embodiment 1: Figure 1 2 is a flow chart of a first embodiment of a method for detecting surface defects of an engine cylinder block according to the present invention, and a first embodiment of a method for detecting surface defects of an engine cylinder block according to the present invention is proposed.
[0046] Step S10: obtaining height information of defect points on the surface of the engine cylinder block based on the laser displacement sensor, and collecting data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generating a three-dimensional height data dot matrix;
[0047] It should be noted that the resolution of the laser displacement sensor is 0.01μm, which ensures that even small height changes on the complex cylinder surface can be accurately recorded. The scanning process is performed line by line along the X-axis, ensuring coverage of every area on the cylinder surface. In addition, the scanning step distance can be adaptively adjusted according to the specific structure and surface characteristics of the cylinder to ensure a balance between scanning accuracy and efficiency.
[0048] It is understandable that the resolution of the laser displacement sensor directly affects the accuracy of detection. The tiny defects that may exist on the surface of the cylinder body, such as pores, scratches or cracks, usually have micron-level or even nanometer-level size changes. Therefore, a resolution of 0.01μm can accurately capture these tiny changes and ensure the effectiveness of the subsequent defect identification process.
[0049] It should be understood that in order to optimize the accuracy and efficiency of scanning, the scanning path of the laser displacement sensor can be dynamically adjusted according to the geometric structure of the cylinder. For example, for smooth areas, the scanning step distance can be larger to improve the acquisition efficiency; while for complex surfaces or areas with large height differences, the scanning step distance needs to be reduced to ensure that sufficiently accurate surface height data is obtained. In addition, the scanning speed and data acquisition frequency can also be adaptively adjusted according to the material, size and surface characteristics of the cylinder.
[0050] Step S20: Perform three-dimensional frequency domain processing on the generated three-dimensional height data lattice by fast Fourier transform, and keep the spatial frequency range within 0.1 μm during the processing. -1 To 10μm -1 After filtering out high-frequency and low-frequency noises, the three-dimensional frequency domain data is restored to three-dimensional space domain data by inverse Fourier transform, thereby obtaining noise-free three-dimensional morphological data.
[0051] It should be noted that the fast Fourier transform (FFT) is used to convert the 3D height data lattice from the spatial domain to the frequency domain in order to analyze the frequency characteristics of the surface data. Through this frequency domain processing, useful morphological information and useless noise information can be effectively separated. In this process, the spatial frequency range is kept at 0.1μm. -1 To 10μm -1In between, extremely high-frequency and extremely low-frequency signals can be filtered out, corresponding to high-frequency noise introduced by the sensor or the environment and low-frequency errors caused by overall surface tilt or workpiece vibration. The noise in 3D height data may come from a variety of factors, including hardware errors of laser displacement sensors, environmental vibrations in industrial production, changes in lighting conditions, and other external interference. Through Fourier transform, noise signals are usually manifested as high-frequency components (such as sharp errors) or low-frequency components (such as large-scale surface offsets). Filtering out these high-frequency and low-frequency noises in the frequency domain can retain effective information in the mid-frequency range, that is, the true microstructure of the cylinder surface.
[0052] It should be understood that the filtering process of high-frequency and low-frequency noise is achieved by setting the spatial frequency range (0.1 to 10 μm) -1 ) to achieve. Higher than 10μm -1 The frequency components of the spectrum usually represent subtle random noise, while those below 0.1 μm -1 The frequency components of the noise may correspond to global deviations in the inspection process (such as workpiece tilt). By keeping the signal in the medium frequency range, it is ensured that only data information related to the real structure of the cylinder surface is retained. The key to this noise filtering is that it not only improves the accuracy of the data, but also enhances the effect of subsequent defect identification.
[0053] Step S30: using the Sobel algorithm based on edge detection to preliminarily process the three-dimensional shape data, combining the local area adaptive binarization method to determine the boundary of the defect and then determine the defect area, and matching the image with the pre-built standard template image library to identify the surface defects, including pores, scratches and cracks; wherein the standard template image library is established based on the statistics of historical data and is used to identify defects on the surfaces of different types of cylinder bodies;
[0054] It should be understood that the Sobel edge detection algorithm identifies the boundary of a defect by calculating the gradient of each pixel in the horizontal and vertical directions in the image. Specifically, the Sobel algorithm uses the following convolution operator to calculate the gradient in the horizontal direction (Gx) and the vertical direction (Gy) respectively.
[0055] It should be understood that the result of Sobel edge detection is only a preliminary detection. In order to further improve the accuracy of defect recognition, the present invention combines a standard template image library for image matching. The template image library is established based on the statistics of historical data and contains standard images of defect-free areas on the surface of different types of cylinder bodies. By matching with the standard template image, the difference between the current scanning area and the defect-free area can be detected, and surface defects such as pores, scratches and cracks can be identified.
[0056] The specific image matching process can use the normalized correlation coefficient NCC to calculate the similarity between the defect area and the template. The formula is:
[0057]
[0058] Among them, T i Represents the pixel value in the template image, T′ i Represents the corresponding pixel value in the detection image, and are the average pixel values of the template image and the detection image, respectively.
[0059] For example, suppose that the surface of an engine block is being inspected. The data sample is as follows, representing the three-dimensional height data and the corresponding image grayscale value obtained in a certain area:
[0060] 3D height data (μm):
[0061] X(μm) Y(μm) Z (height, μm) Gray value 0 0 0.1 120 1 0 0.12 90 2 0 0.08 115 0 1 0.09 122 1 1 0.07 125 2 1 0.1 118
[0062] (1) Preliminary processing of the Sobel algorithm: The Sobel operator is used to calculate the gradients in the horizontal direction (Gx) and the vertical direction (Gy).
[0063] Horizontal gradient (Gx):
[0064]
[0065]
[0066] Vertical gradient (Gy):
[0067] X(μm) Y(μm) Gx 0 0 0.03 1 0 0.05 2 0 0.02 0 1 0.01 1 1 -0.02 2 1 0.03
[0068] By calculating the gradient, we can further get the edge strength of the area:
[0069]
[0070] The edge strength calculation results are as follows:
[0071] X(μm) Y(μm) G 0 0 0.05 1 0 0.05 2 0 0.04 0 1 0.03 1 1 0.03 2 1 0.05
[0072] The edge intensity at the position X=1.0, Y=0.0 is higher, indicating that there may be a defect there.
[0073] According to the gray value of the region, use the adaptive binarization method to segment the image and select a dynamic threshold. Assume that the current local threshold is 100:
[0074] (2) Binarization results:
[0075] X(μm) Y(μm) Binarization result 0 0 1 1 0 0 2 0 1 0 1 1 1 1 1 2 1 1
[0076] X=1.0, Y=0.0 is marked as a suspected defect area after binarization.
[0077] (3) Matching with the standard template image library:
[0078] Assume that in the template image library, the grayscale value of the normal area is evenly distributed at 120.
[0079] Normalized cross-correlation coefficient (NCC):
[0080]
[0081] After calculation, if the NCC value is much lower than the set similarity threshold (e.g., 0.85), it is determined that there is a defect in the area and it is ultimately marked as a scratch.
[0082] Through the above process, the system identified that there was a scratch defect at the position of X=1.0, Y=0.0. Sobel edge detection identified that the edge strength of this area was high, and it was determined as a suspected defect area after binarization processing, and further confirmed that the defect nature of this area was a scratch by matching with the standard template image library.
[0083] Step S40: Fitting the boundary of the surface defect based on the third-order fitting polynomial, optimizing the fitting result by the least square method, and calculating the geometric characteristics of the surface defect, including the depth, width and perimeter information of the surface defect; wherein, the depth information of the defect must satisfy the depth greater than 0.05 mm to be regarded as a valid defect to ensure that the fitting error in the fitting process is within ±0.01 mm;
[0084] It should be noted that the use of third-order polynomials is to accurately describe the contours of surface defects when the boundaries are complex. Unlike linear or second-order fitting, third-order polynomials have better flexibility and can adapt to complex boundary shapes, such as the tortuous trend of surface cracks or the diverse changes of depressions. The application of the least squares method reduces the error so that the fitting result is as close to the actual boundary as possible. The optimized fitting error does not exceed ±0.01mm to ensure the fitting accuracy.
[0085] It should be understood that among the geometric features of defects, depth, width and circumference are important indicators, especially in quality control, defects with a depth greater than 0.05mm often affect the performance of the cylinder body, so the defect depth must meet this standard. In order to ensure the accuracy of the data, during the calculation process, the fitting results optimized by the least squares method can provide high-precision depth information to ensure that potential major defects are not missed.
[0086] For example, suppose the detected surface defect boundary data is as follows
[0087] X(mm) Y(mm) 0 0 0.5 0.1 1 0.15 1.5 0.12 2 0.05 2.5 0
[0088] A third-order polynomial is fitted to this boundary, and the polynomial obtained by fitting is:
[0089] y=-0.02x 3 +0.08x 2 -0.12x+0.05
[0090] The fitting polynomial fits the boundary changes of surface defects well. Next, the fitting results are optimized using the least squares method to ensure that the error is within ±0.01 mm.
[0091] Depth calculation: depth = 0.1-0.05 = 0.05 mm. This depth reaches the threshold of 0.05 mm and meets the standard of a valid defect.
[0092] Width calculation: Width = 2.5-0 = 2.5mm
[0093] Perimeter calculation: By integrating the fitting curve, the perimeter of the defect can be calculated. Assume that the integral result is: perimeter ≈ 3.2 mm
[0094] In summary, through the third-order fitting polynomial and least squares optimization, the defect depth was calculated to be 0.05 mm, the width was 2.5 mm, and the circumference was 3.2 mm, which met the quality control standards, and the fitting error was within ±0.01 mm.
[0095] Step S50: Generate a defect report based on the geometric features of the surface defect, and feed it back to the front-end operation screen in real time through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected.
[0096] Understandably, the defect report generated is to help the technicians on the production line to understand and deal with the detected surface defects in a timely manner. The report is automatically fed back to the central control system and displayed in real time on the front-end operation screen. The types of defects in the report can be divided into many categories, such as pores (usually small depressions on the surface with regular boundaries), scratches (sharp edges, shallow and slender) or cracks (deep and irregular). The three-dimensional coordinate accuracy of the defect location is required to be high in order to accurately locate and repair the problem area in actual operation. The geometric size of the defect helps to determine the severity of the defect, and the potential impact of the defect on the cylinder function will help the operator decide whether it is necessary to stop production immediately for repair or further inspection.
[0097] It should be understood that in order to ensure that the report generation and feedback process is efficient and accurate, the calculation of defect geometry must be accurate, especially the measurement of depth and location. The generated defect report can help the maintenance team quickly assess the severity of the defect. For example, a deeper crack may affect the structural integrity of the cylinder and must be repaired immediately, while a shallow scratch may not have a significant impact on the function of certain non-critical areas and can be postponed. The report will give corresponding prompts based on the potential impact of each defect on the functional area of the cylinder, helping the operator to make timely and correct judgments.
[0098] For example, suppose during the inspection process, the system identifies a crack with a depth of 0.06mm and a width of 3.0mm, located at X=15.2mm, Y=8.7mm, and Z=0.9mm on the cylinder body. The defect report automatically generated by the system is as follows:
[0099] Defect type: Crack
[0100] Position coordinates: X = 15.2 mm, Y = 8.7 mm, Z = 0.9 mm
[0101] Geometry:
[0102] Depth: 0.06mm
[0103] Width: 3.0mm
[0104] Circumference: 6.2mm
[0105] Affected area: The crack is located near the combustion chamber of the cylinder block, which may affect the sealing performance. It is recommended to deal with it immediately.
[0106] The report is fed back to the operator's screen in real time through the central control system, and the operator can immediately make a decision based on the content of the report to determine whether production needs to be stopped for repair or further inspection.
[0107] In this way, defect reports can be quickly delivered to production line operators after they are generated, providing the specific defect location, size and potential impact, ensuring that cylinder surface defects can be dealt with in a timely manner to avoid affecting product quality or causing more serious quality problems.
[0108] In addition, the present invention also provides an engine cylinder surface defect detection system, the engine cylinder surface defect detection system comprising:
[0109] The height acquisition module is used to obtain the height information of the defect points on the surface of the engine cylinder block based on the laser displacement sensor, and to collect data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generate a three-dimensional height data dot matrix;
[0110] The frequency domain processing module is used to perform three-dimensional frequency domain processing on the generated three-dimensional height data lattice through fast Fourier transform, and the spatial frequency range is kept within 0.1μm during the processing -1 To 10μm -1 After filtering out high-frequency and low-frequency noises, the three-dimensional frequency domain data is restored to three-dimensional space domain data by inverse Fourier transform, thereby obtaining noise-free three-dimensional morphological data.
[0111] A defect recognition module is used to perform preliminary processing on the three-dimensional shape data using the Sobel algorithm based on edge detection, determine the boundary of the defect and then the defect area by combining the local area adaptive binarization method, and identify surface defects, including pores, scratches and cracks, by performing image matching with a pre-built standard template image library; wherein the standard template image library is established based on the statistics of historical data and is used to perform defect recognition on the surfaces of different types of cylinder bodies;
[0112] The fitting and feature calculation module is used to fit the boundaries of surface defects based on the third-order fitting polynomial, optimize the fitting results through the least squares method, and calculate the geometric features of surface defects, including the depth, width and perimeter information of surface defects; among which, the depth information of the defect must satisfy the depth greater than 0.05mm to be considered as a valid defect to ensure that the fitting error during the fitting process is within ±0.01mm;
[0113] A report generation and feedback module, which is used to generate a defect report according to the geometric features of the surface defects, and to provide real-time feedback to the front-end operation screen through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected;
[0114] The engine cylinder surface defect detection system provided by the present invention adopts an engine cylinder surface defect detection method in the above embodiment, which can solve a technical problem of engine cylinder surface defect detection. Compared with the prior art, the beneficial effects of the engine cylinder surface defect detection system provided by the present invention are the same as the beneficial effects of the engine cylinder surface defect detection method provided by the above embodiment, and other technical features of the engine cylinder surface defect detection system are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0115] The present invention provides an engine cylinder surface defect detection device, please refer to Figure 2, an engine cylinder surface defect detection device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute an engine cylinder surface defect detection method in the above-mentioned embodiment 1. An engine cylinder surface defect detection device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. An engine cylinder surface defect detection device is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present invention. An engine block surface defect detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for the operation of an engine block surface defect detection device are also stored. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow an engine block surface defect detection device to communicate wirelessly or wired with other devices to exchange data. Although an engine block surface defect detection device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0116] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for detecting surface defects of an engine cylinder block are implemented. The computer program product provided by the present invention can solve the technical problem of detecting surface defects of an engine cylinder block. Compared with the prior art, the beneficial effects of the computer program product provided by the present invention are the same as the beneficial effects of the method for detecting surface defects of an engine cylinder block provided by the above-mentioned embodiment, and will not be described in detail here.
[0117] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present invention are executed.
[0118] It should be understood that the various parts disclosed in the present invention can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting surface defects of an engine cylinder block, characterized in that: The engine cylinder surface defect detection method comprises: Step S10: obtaining height information of defect points on the surface of the engine cylinder block based on the laser displacement sensor, and collecting data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generating a three-dimensional height data dot matrix; Step S20: Performing three-dimensional frequency domain processing on the generated three-dimensional height data lattice by fast Fourier transform, maintaining the spatial frequency range between 0.1 μm-1 and 10 μm-1 during the processing to filter out high-frequency and low-frequency noises, and after completing the filtering of high-frequency and low-frequency noises, restoring the three-dimensional frequency domain data to three-dimensional spatial domain data by inverse Fourier transform, thereby obtaining noise-free three-dimensional morphology data; Step S30: using the Sobel algorithm based on edge detection to preliminarily process the three-dimensional shape data, combining the local area adaptive binarization method to determine the boundary of the defect and then determine the defect area, and matching the image with the pre-built standard template image library to identify the surface defects, including pores, scratches and cracks; wherein the standard template image library is established based on the statistics of historical data and is used to identify defects on the surfaces of different types of cylinder bodies; Step S40: Fitting the boundary of the surface defect based on the third-order fitting polynomial, optimizing the fitting result by the least square method, and calculating the geometric characteristics of the surface defect, including the depth, width and perimeter information of the surface defect; wherein, the depth information of the defect must satisfy the depth greater than 0.05 mm to be regarded as a valid defect to ensure that the fitting error in the fitting process is within ±0.01 mm; Step S50: Generate a defect report based on the geometric features of the surface defect, and feed it back to the front-end operation screen in real time through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected.
2. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S30, the step of using the Sobel algorithm based on edge detection to preliminarily process the three-dimensional shape data includes: Step S301: Calculate the gradients in the horizontal and vertical directions to obtain edge strength; Among them, G x and G y Represent the gradients in the horizontal and vertical directions respectively, I represents the two-dimensional slice of the input three-dimensional shape data, and the matrix product represents the convolution operation; Step S302: Calculate the final edge strength G: Among them, G represents the edge strength, which is used to determine the boundary of the defect.
3. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S30, the step of performing image matching with a pre-built standard template image library includes: Step S303: extracting a template image corresponding to the cylinder body type and the processing surface area currently being inspected from a pre-built standard template image library, wherein the template image is a defect-free surface image collected based on historical data and standard processes; Step S304: grayscale normalization is performed on the defect area image and the template image. The grayscale normalization formula is: Among them, K is the input defect area image data, K min and K max are the minimum and maximum grayscale values of the input image, respectively, and K ′ is the standardized image; Step S305: Calculate the similarity between the detection image and the template image based on the normalized cross-correlation coefficient NCC, the formula is: Among them, T i represents the pixel value in the template image, T i ′ Represents the corresponding pixel value in the detection image, and are the average pixel values of the template image and the detection image respectively; Step S306: If the NCC value is less than the set threshold, it is determined that there is a defect in the area and marked as a suspected defect area.
4. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S10, the laser displacement sensor scans only the upper surface of the cylinder body, excluding the side and bottom surfaces of the cylinder body.
5. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S10, the scanning speed of the laser displacement sensor is 1 mm to 5 mm per second.
6. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S50, after the defect report is generated, it is updated in real time and displayed on the front-end screen.
7. The method for detecting surface defects of an engine cylinder block according to claim 1, characterized in that: In step S40, the calculation of the fitting polynomial is performed for a maximum of five iterations to avoid overfitting.
8. An engine cylinder surface defect detection system, characterized in that: The engine cylinder surface defect detection system comprises: The height acquisition module is used to obtain the height information of the defect points on the surface of the engine cylinder block based on the laser displacement sensor, and to collect data on the surface of the engine cylinder block at a resolution of 0.01 μm by scanning line by line along the axis of the cylinder block, and generate a three-dimensional height data dot matrix; The frequency domain processing module is used to perform three-dimensional frequency domain processing on the generated three-dimensional height data lattice through fast Fourier transform. During the processing, the spatial frequency range is maintained between 0.1μm-1 and 10μm-1 to filter out high-frequency and low-frequency noise. After the high-frequency and low-frequency noise are filtered out, the three-dimensional frequency domain data is restored to three-dimensional spatial domain data through inverse Fourier transform, thereby obtaining noise-free three-dimensional morphological data. A defect recognition module is used to perform preliminary processing on the three-dimensional shape data using the Sobel algorithm based on edge detection, determine the boundary of the defect and then the defect area by combining the local area adaptive binarization method, and identify surface defects, including pores, scratches and cracks, by performing image matching with a pre-built standard template image library; wherein the standard template image library is established based on the statistics of historical data and is used to perform defect recognition on the surfaces of different types of cylinder bodies; The fitting and feature calculation module is used to fit the boundaries of surface defects based on the third-order fitting polynomial, optimize the fitting results through the least squares method, and calculate the geometric features of surface defects, including the depth, width and perimeter information of surface defects; among which, the depth information of the defect must satisfy the depth greater than 0.05mm to be considered as a valid defect to ensure that the fitting error during the fitting process is within ±0.01mm; The report generation and feedback module is used to generate a defect report based on the geometric characteristics of the surface defects, and to provide real-time feedback to the front-end operation screen through the communication interface with the central control system. The report content includes the defect type, location coordinates, geometric dimensions of the defect and the cylinder functional area that may be affected.
9. An engine cylinder surface defect detection device, characterized in that: The engine cylinder surface defect detection device comprises: A memory, a processor, and an engine cylinder block surface defect detection program stored in the memory and executable on the processor, wherein the engine cylinder block surface defect detection program, when executed by the processor, implements the engine cylinder block surface defect detection method described in any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product comprises an engine block surface defect detection program, which, when executed by a processor, implements the engine block surface defect detection method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Fog level detection method based on longitudinal gray features
CN103927523A
Refractory brick measuring system based on machine vision
CN110286124A
Lithium battery electrode surface defect detection method based on background standardization and centralized compensation algorithm
CN110544231A
Ultra-micro glue drop shape parameter detection device and method based on machine vision
CN114923408A
Optimization method of industrial film characteristic curve mathematical model
CN116821634A
Cited By
Method and system for measuring deformation of photovoltaic module junction box
CN120043481A
Tablet defect detection method and system based on machine vision
CN120088505A
A tablet defect detection method and system based on machine vision
CN120088505B
Intelligent detection system and method for precision forging punch-formed motor gear
CN120190237A
Servomotor cylinder body inner wall scratch robot self-adaptive additive and subtractive material repairing method based on three-dimensional measurement
CN120362885A