Intelligent detection system for surface defects of cylinder sleeve

The intelligent cylinder liner surface defect detection system combines the maximum inter-class variance method with a servo control system to achieve adaptive binarization and spiral scanning of the panoramic grayscale image of the cylinder liner outer circle. This accurately separates banded and local defects, solving the problems of low accuracy and poor adaptability in cylinder liner surface defect detection, and improving detection efficiency and accuracy.

CN121656288APending Publication Date: 2026-03-13ZYNP GRP ANHUI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511462984.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing cylinder liner surface defect detection technologies struggle to achieve complete and non-repeated image acquisition across the entire surface. Uneven light reflection leads to brightness fluctuations, reducing the distinction between defect and background grayscale features. Lacking a precise separation mechanism results in low recognition accuracy and poor adaptability, and it is unable to adaptively quantify the overall intensity of surface defects and subdivide local defect categories.

Method used

An intelligent cylinder liner surface defect detection system is adopted. The system obtains a panoramic grayscale image of the cylinder liner outer circle through a data preprocessing module. The system uses the maximum inter-class variance method to adaptively binarize and generate a binary defect image and a polarity image. Combined with a servo control system, the cylinder liner rotates and the linear array camera descends synchronously to perform spiral scanning acquisition. The system calculates the circumferential coverage and the comprehensive intensity value of the spiral texture, accurately separates banded and local defects, and classifies the defects.

Benefits of technology

It achieves high-quality imaging of the entire outer surface of the cylinder liner, accurately locates and classifies defects, avoids local missed detections and repeated sampling, improves detection efficiency and accuracy, and meets the quality control requirements of large-scale cylinder liner production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121656288A_ABST
    Figure CN121656288A_ABST
Patent Text Reader

Abstract

The invention discloses a cylinder sleeve surface defect intelligent detection system, relates to the technical field of cylinder sleeve surface defect detection, and realizes accurate detection of cylinder sleeve surface defects through cooperative work of a data acquisition module, a data preprocessing module, a defect positioning module and a discrimination module. A data acquisition module controls a cylinder sleeve to rotate at a preset angular speed, a linear array camera synchronously and axially moves, gray scale information of an annular strip of the outer circle of the cylinder sleeve is spirally scanned and acquired, and a cylinder sleeve outer circle panoramic gray scale map is spliced through normalized mapping; the preprocessing module performs row direction normalization on the panorama, solves an optimal threshold value by using a maximum between-class variance method, and generates a binary defect graph and a polarity graph; the defect positioning module calculates the circumferential coverage degree, determines the axial interval of the strip-shaped defect and the comprehensive strength of the spiral texture, and generates a residual image to separate local defects; the defect judgment module is used for subdividing strip-shaped defect types according to defect strength, local defect classification is completed in combination with connected domain analysis, and the detection efficiency and accuracy of the surface defects of the cylinder sleeve are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cylinder liner surface defect detection technology, and more specifically to an intelligent cylinder liner surface defect detection system. Background Technology

[0002] Cylinder liners are core components in internal combustion engines, hydraulic equipment, and other fields. The surface quality of cylinder liners directly affects the sealing performance, wear resistance, and overall operational reliability of the equipment. Therefore, in the mass production of cylinder liners, appearance defect detection is a crucial step in quality control. On automated cylinder liner production lines, the appearance inspection station must perform comprehensive inspections of the cylinder liners to identify any surface defects, thereby ensuring the consistency of cylinder liner product quality and the reliability of downstream assembly.

[0003] However, existing cylinder liner surface defect detection technologies have the following problems: Because the cylinder liner surface is a toroidal curved surface structure, conventional imaging and detection methods are difficult to achieve image acquisition that is complete, non-repetitive, and with uniform grayscale across the entire surface. Uneven illumination reflection and insufficient motion control precision can easily lead to brightness fluctuations in the acquired images, reducing the grayscale feature distinction between defects and the background. At the same time, the detection process lacks a precise separation mechanism for band-shaped defects and local defects in the cylinder liner, and it is also unable to adaptively quantify the comprehensive intensity of surface defects and subdivide local defect categories. This gradually exposes problems such as low accuracy and poor adaptability in cylinder liner surface defect identification, making it difficult to meet the high-efficiency detection requirements of automated production lines and seriously affecting the accuracy and practicality of cylinder liner surface defect detection. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes an intelligent detection system for cylinder liner surface defects, which solves the problems of low accuracy and poor adaptability in identifying cylinder liner surface defects.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an intelligent detection system for cylinder liner surface defects, comprising: The data preprocessing module obtains a panoramic grayscale image of the cylinder liner outer circle, calculates the mean grayscale value and standard deviation of each row of pixels in the panoramic grayscale image, subtracts the mean grayscale value of the row containing the pixel from the grayscale value of the pixel in the panoramic grayscale image, and then divides by the standard deviation of the row containing the pixel to obtain the normalized grayscale value of the pixel. The normalized grayscale values ​​of all pixels are combined to form a normalized grayscale image. The optimal threshold is obtained by solving the normalized grayscale image using the Otsu's method. The absolute value of the normalized grayscale value of the normalized grayscale image is taken. When the absolute value of the normalized grayscale value of the pixel in the normalized grayscale image is greater than or equal to the optimal threshold, a binary defect image is generated and the position of the pixel in the binary defect image is marked as 1. When the normalized grayscale value of the pixel in the normalized grayscale image is greater than 0, a polar image is generated and the position of the pixel in the polar image is marked as 1. The defect localization module marks the proportion of pixels marked as 1 in each row of the binary defect image as the circumferential coverage value. It calculates the strip defect judgment threshold using the Otsu's method based on the circumferential coverage value. The pixel row interval with the largest continuous length and circumferential coverage value greater than or equal to the strip defect judgment threshold is marked as the axial interval of the strip defect. The quotient obtained by summing the circumferential coverage values ​​corresponding to all pixel rows in the axial interval of the strip defect and dividing it by the number of pixel rows in the axial interval of the strip defect is marked as the average circumferential coverage. The quotient obtained by dividing the number of pixel rows in the axial interval of the strip defect by the total number of pixel rows in the panoramic grayscale image of the cylinder liner outer circle is marked as the axial proportion of the strip interval. The product of the average circumferential coverage and the axial proportion of the strip interval is marked as the comprehensive intensity value of the spiral texture.

[0006] Preferably, the data acquisition module activates the servo control system of the cylinder liner online fully automatic inspection machine, controls the cylinder liner to rotate at a preset angular velocity, and simultaneously controls the line scan camera to descend synchronously along the cylinder liner axis at a preset linear velocity. The line scan camera captures and outputs a line-by-line exposure sequence, which includes exposure data, rotation angle, and axial displacement. The rotation angle is the product of the exposure time of the line scan camera and the preset angular velocity, and the axial displacement is the product of the exposure time of the line scan camera and the preset linear velocity. The preset angular velocity and preset linear velocity are preset according to the detection speed requirements and the performance of the cylinder liner online fully automatic inspection machine, and the value range of the preset linear velocity must match the preset angular velocity. Each line of exposure data corresponds to the grayscale information of an annular strip on the outer circle of the cylinder liner. The annular strip is an image of an annular area that extends circumferentially along the outer circle of the cylinder liner and has a fixed narrow width along the axial direction, acquired by the line scan camera in a single exposure during the helical scanning process.

[0007] Preferably, a zero matrix with circumferential dimension W and axial dimension H is generated, and this zero matrix is ​​labeled as the cylinder liner outer circle panoramic grayscale image matrix T(θ,z), where W is the number of pixel columns of the matrix and is determined by the cylinder liner circumference and camera resolution, and H is the number of pixel rows of the matrix and is determined by the cylinder liner axial length and camera resolution. Each row of exposure data is filled into the cylinder liner outer circle panoramic grayscale matrix T(θ,z), where θ∈[1,W] is the circumferential pixel index and z∈[1,H] is the axial pixel row index. The specific filling method is as follows: The rotation angle θ corresponding to the exposure time t of the line scan camera t The circumferential pixel index θ is converted into the panoramic grayscale matrix of the cylinder liner outer circle by linear normalization; The axial displacement z corresponding to the exposure time t tThe data is converted into the axial pixel index z of the cylinder liner outer circle panoramic grayscale matrix by linear normalization. Each row of exposure data is then filled pixel by pixel into the (θ,z) position of the cylinder liner outer circle panoramic grayscale matrix T. The filling operation is repeated until all rows of exposure data are filled to obtain a cylinder liner outer circle panoramic grayscale image with dimension W×H.

[0008] Preferably, the normalized grayscale values ​​of all pixels are filled into the corresponding positions in the panoramic grayscale matrix of the cylinder liner outer circle to generate the normalized grayscale image J(θ,z); The optimal threshold is obtained by solving the normalized grayscale image using the maximum inter-class variance method. Take the absolute value of the normalized grayscale value of all pixels in the normalized grayscale image to obtain the normalized grayscale image after taking the absolute value. If the normalized grayscale value of a pixel in the normalized grayscale image after taking the absolute value is greater than or equal to the optimal threshold, generate a binary defect image B(θ,z) and mark the position of the pixel in the binary defect image as 1. B(θ,z)=1 indicates that the pixel belongs to the defect area. If the normalized grayscale value of a pixel in the normalized grayscale image after taking the absolute value is less than the optimal threshold, a binary defect image B(θ,z) is generated, and the position of the pixel in the binary defect image is marked as 0. B(θ,z)=0 indicates that the pixel belongs to the normal area.

[0009] Preferably, when the normalized gray value of a pixel in the normalized grayscale image is greater than 0, a polarimetric image S(θ,z) is generated, and the position of the pixel in the polarimetric image is marked as 1. Polarimetric image S(θ,z)=1 indicates that the gray value of the defective pixel is higher than the gray average value of its row. When the normalized gray value of a pixel in the normalized grayscale image is less than 0, a polar map S(θ,z) is generated, and the position of the pixel in the polar map is marked as -1. Polar map S(θ,z)=-1 indicates that the gray value of the defective pixel is lower than the gray average value of its row. When the normalized gray value of a pixel in the normalized grayscale image is equal to 0, a polarimetric image S(θ,z) is generated, and the position of the pixel in the polarimetric image is marked as 0. A polarimetric image S(θ,z) = -0 indicates that the gray value of the defective pixel is equal to the gray average value of its row.

[0010] Preferably, all pixel rows z that satisfy the circumferential coverage value ≥ the band defect determination threshold are extracted, and the interval with the largest continuous length is selected and marked as the axial interval of the band defect, which is [z1, z2]. The average circumferential coverage of the axial interval of the strip defect is obtained by summing the circumferential coverage values ​​corresponding to each pixel row z in the axial interval of the strip defect and then dividing by the number of pixel rows z in the axial interval of the strip defect. The number of pixel rows z in the axial interval of the strip defect is z2-z1+1. The axial proportion of the strip-shaped defect is obtained by dividing the number of pixel rows z in the axial region of the cylinder liner outer circle panoramic grayscale image by the axial dimension H. The product obtained by multiplying the average circumferential coverage by the axial proportion of the banded area is marked as the spiral texture comprehensive intensity value. The value of the spiral texture comprehensive intensity value ranges from 0 to 1. The spiral texture comprehensive intensity value is the quantitative value of the circumferential coverage of the banded defect. Residual maps are generated based on binary defect maps.

[0011] Preferably, the residual map is obtained after filtering the binary defect map. The specific filtering process is as follows: When pixel row z does not belong to the axial interval [z1, z2] of the band defect, the original position label value of pixel row z in the binary defect map B(θ, z) remains unchanged. When pixel row z belongs to the axial interval [z1, z2] of the band defect, the label of the corresponding position of pixel row z in the binary defect map B(θ, z) is set to 0. After filtering all pixel rows z, the residual map R(θ, z) is obtained. The residual map is a binary defect map that only contains local defects. Among them, residual map R(θ, z) = 1 is a suspected local defect, and residual map R(θ, z) = 0 is a normal or band defect area. Based on the axial interval of the banded defect and the residual map, the defect type is output by the defect discrimination module.

[0012] Preferably, in the defect discrimination module, when the axial interval [z1, z2] of the banded defect is not empty, the output defect type is a banded defect. The module judges and outputs the banded defect type based on the comprehensive intensity value of the spiral texture. It performs connected component analysis on the residual map to obtain the connected components. It calculates the area of ​​the connected components based on the number of pixels in the connected components. It counts the number of pixels in the connected components that are marked as +1 and -1 in the polarity map. The marker with the largest number is taken as the defect polarity of the connected components. The defect polarity includes two markers, +1 and -1, which reflect the degree of the defect gray level relative to the average gray level of the pixel row. Based on the area of ​​the connected components and the defect polarity, it judges and outputs the local defect type.

[0013] Preferably, the comprehensive intensity value of the spiral texture is marked as the intensity of the banded defect; Band-shaped defects include band-shaped defects, semi-coarse and semi-thin defects, and uneven bottom defects. Based on actual production experience and experiments, the following defect sub-classification and judgment methods are established: A banded defect is defined as having a strength ≥ 0.7. When the intensity fluctuation of a banded defect is ≥ ±0.2, it is judged as a semi-coarse and semi-fine defect; When the intensity of a band-shaped defect is ≥0.6 and the number of pixel rows z is ≥2 of the axial dimension H÷2 of the panoramic grayscale image of the cylinder liner outer circle, it is judged as an uneven bottom defect.

[0014] Preferably, a connected component analysis is performed on the residual map, and adjacent pixels marked as 1 in the residual map are regarded as a connected component, and each connected component represents a suspected local defect. The segmentation threshold is calculated using the Otsu's method based on the area of ​​all connected components. This threshold categorizes connected components into small and medium defects. Components with an area less than the segmentation threshold are marked as small defects, while those with an area greater than or equal to the threshold are marked as medium defects. Finally, defect polarity is used to determine the specific local defect category, as detailed below: When the defect polarity is -1 and it is a small defect, it is judged as a needle-like small defect or a hole defect. When the defect polarity is -1 and it belongs to the medium defect category, it is judged as a black slag defect. When the defect polarity is +1 and it belongs to the medium defect, it is judged as a paint eye defect, sintering defect or impact defect. When the defect polarity is +1 and it is a small defect, it is judged as a paint eye defect.

[0015] Compared with existing technologies, it has the following advantages: The intelligent cylinder liner surface defect detection system proposed in this solution effectively solves the technical pain point of difficulty in achieving high-quality full-surface imaging of the cylinder liner's outer circular annular surface through core data acquisition methods such as spiral scanning and panoramic stitching. The system utilizes a servo control system to synchronously control the cylinder liner's preset angular velocity rotation and the linear array camera's preset linear velocity axial descent, ensuring that the width of the annular strip corresponding to each line of exposure is consistent. Then, through linear normalization mapping of rotation angle and axial displacement, the line-by-line exposure sequence is stitched into a dimensionally defined panoramic grayscale image of the cylinder liner's outer circle. This achieves complete and non-repeating full-surface coverage of the cylinder liner's outer circle while accurately restoring its spatial geometric relationships, providing a unified and reliable coordinate benchmark for subsequent defect localization and analysis. This avoids the problems of localized missed detections, repeated acquisitions, or geometric distortion found in traditional imaging methods.

[0016] In the image data preprocessing stage, the system uses row-direction normalization combined with adaptive binarization based on the maximum inter-class variance method to simultaneously generate binary defect maps and polar maps. This highlights the grayscale difference between defects and normal areas while preserving the grayscale attributes of defects, solving the problem of defects being submerged due to brightness fluctuations in traditional detection. This lays a high-quality data foundation for subsequent defect extraction and classification. In the defect detection and separation stage, the system calculates the circumferential coverage value and uses the maximum inter-class variance method to locate the axial interval of banded defects. Then, it quantifies the intensity of banded defects using the comprehensive intensity value of spiral texture. Simultaneously, it generates a residual map to remove banded defects and retain local defects, achieving accurate separation of banded defects and local defects and avoiding misjudgments caused by mutual interference between the two types of defects. In the defect classification stage, the system classifies local defects based on the comprehensive intensity value of spiral texture and fluctuation subdivision of band defects. It combines connected component analysis with defect polarity and the maximum inter-class variance method to classify local defects, thus achieving refined defect classification and avoiding the subjectivity and single-condition judgment limitations of traditional manual inspection.

[0017] The system automates and improves the accuracy of the entire process of cylinder liner outer diameter defect detection, from acquisition to preprocessing to detection and classification. This significantly improves the efficiency and accuracy of cylinder liner surface defect detection, meets the quality control requirements of large-scale cylinder liner production lines, and provides strong support for the reliability of downstream assembly. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the system framework of the present invention; Figure 2 This is a schematic diagram of the online fully automatic cylinder liner inspection machine of the present invention; Figure 3 This is a schematic diagram of the surface defect types of the cylinder liner of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] First Embodiment This application provides an intelligent detection system for cylinder liner surface defects; As an embodiment of this application, the system specifically includes: The data preprocessing module obtains a panoramic grayscale image of the cylinder liner outer circle, calculates the mean grayscale value and standard deviation of each row of pixels in the panoramic grayscale image, subtracts the mean grayscale value of the row containing the pixel from the grayscale value of the pixel in the panoramic grayscale image, and then divides by the standard deviation of the row containing the pixel to obtain the normalized grayscale value of the pixel. The normalized grayscale values ​​of all pixels are combined to form a normalized grayscale image. The optimal threshold is obtained by solving the normalized grayscale image using the Otsu's method. The absolute value of the normalized grayscale value of the normalized grayscale image is taken. When the absolute value of the normalized grayscale value of the pixel in the normalized grayscale image is greater than or equal to the optimal threshold, a binary defect image is generated and the position of the pixel in the binary defect image is marked as 1. When the normalized grayscale value of the pixel in the normalized grayscale image is greater than 0, a polar image is generated and the position of the pixel in the polar image is marked as 1. The defect localization module marks the proportion of pixels marked as 1 in each row of the binary defect image as the circumferential coverage value. It calculates the strip defect judgment threshold using the Otsu's method based on the circumferential coverage value. The pixel row interval with the largest continuous length and circumferential coverage value greater than or equal to the strip defect judgment threshold is marked as the axial interval of the strip defect. The quotient obtained by summing the circumferential coverage values ​​corresponding to all pixel rows in the axial interval of the strip defect and dividing it by the number of pixel rows in the axial interval of the strip defect is marked as the average circumferential coverage. The quotient obtained by dividing the number of pixel rows in the axial interval of the strip defect by the total number of pixel rows in the panoramic grayscale image of the cylinder liner outer circle is marked as the axial proportion of the strip interval. The product of the average circumferential coverage and the axial proportion of the strip interval is marked as the comprehensive intensity value of the spiral texture.

[0021] Second Embodiment As a second embodiment of this application, this embodiment is implemented based on the first embodiment. Please refer to [link / reference]. Figure 1 The intelligent cylinder liner surface defect detection system provided in this embodiment includes a data acquisition module, a data preprocessing module, a defect location module, and a defect discrimination module; For the data acquisition module, please refer to [link / reference]. Figure 2 The servo control system of the cylinder liner online fully automatic inspection machine is started. When the V-arm pushes the cylinder liner to the appearance inspection station, the servo descends to the system's set starting section and rotates the servo spiral downwards, controlling the cylinder liner to rotate at a preset angular velocity. The range of the constant angular velocity is determined by the mechanical performance of the equipment. It is necessary to ensure smooth rotation to guarantee the circumferential uniformity of the image. At the same time, the line scan camera is controlled to descend synchronously along the cylinder liner axis at a preset linear velocity, so that the field of view of the line scan camera forms a full-coverage scan of the spiral trajectory along the outer circle of the cylinder liner. The range of the preset linear velocity must match the preset angular velocity to ensure that the width of the annular strip on the outer circle of the cylinder liner is consistent for each line of exposure. The annular strip on the outer circle of the cylinder liner refers to the image of the annular area that extends circumferentially along the outer circle of the cylinder liner and has a fixed narrow width along the axial direction, which is acquired by the line scan camera in a single exposure during the spiral scanning process. After acquisition, a line-by-line exposure sequence is obtained from the line scan camera. The line-by-line exposure sequence includes exposure data, the rotation angle corresponding to the exposure time, and the axial displacement. Each exposure time (in seconds, with a value range of the total scanning time, determined by the cylinder liner axial length and preset linear velocity) corresponds to the cylinder liner rotation angle = exposure time × preset angular velocity (in radians, used as the circumferential position index) and axial displacement = exposure time × preset linear velocity (in millimeters, used as the axial position index). Each line of exposure data corresponds to the grayscale information of an annular strip on the outer circle of the cylinder liner. Specifically, through servo control of synchronous rotation and axial movement, it is ensured that every annular area on the outer circle of the cylinder liner can be acquired line by line by the line scan camera, providing complete and non-repeating original exposure data for subsequent panoramic stitching, ensuring the integrity of image coverage. Define a zero matrix named "Cylinder Liner Outer Circle Panoramic Gray Matrix". The circumferential dimension of the cylinder liner outer circle panoramic gray matrix is ​​W (the number of pixel columns in the cylinder liner outer circle panoramic gray matrix along the cylinder liner circumference, determined by the cylinder liner circumference and camera resolution, W > 0 and is an integer), and the axial dimension is H (the number of pixel rows in the cylinder liner outer circle panoramic gray matrix along the cylinder liner height, determined by the cylinder liner axial length and camera resolution, H > 0 and is an integer). Fill each row of exposure data into the cylinder liner outer circle panoramic gray matrix T(θ,z), where θ∈[1,W] is the circumferential pixel column index, and z∈[1,H] is the axial pixel row index. The specific filling method is as follows: The rotation angle θ corresponding to the exposure time t t The circumferential pixel index θ is converted to the outer circle panoramic grayscale matrix of the cylinder liner through linear normalization. The formula is: θ=round(θ t ÷2π×W) where round(·) is a rounding operation that can discretize continuous angle values ​​into circumferential pixel positions of the cylinder liner outer circle panoramic grayscale matrix; The axial displacement z corresponding to the exposure time t t The axial pixel index z of the cylinder liner outer circle panoramic grayscale matrix is ​​converted through linear normalization, and the formula is: z = round(z t ÷L×H) where L is the total axial length of the cylinder liner in millimeters. The continuous axial displacement can be discretized into the axial pixel position of the panoramic grayscale matrix of the outer circle of the cylinder liner through the axial pixel index z. For each row of exposure data in this exposure, fill the (θ,z) position of the cylinder liner outer circle panoramic grayscale matrix T pixel by pixel. Repeat this operation until all exposure data rows are filled. Mark the cylinder liner outer circle panoramic grayscale matrix after filling as the cylinder liner outer circle panoramic grayscale image T(θ,z). The dimension of the cylinder liner outer circle panoramic grayscale image is W×H. The value of each pixel T(θ,z) is a grayscale value, ranging from 0 to 255. Specifically, by using the linear mapping rule from kinematic parameters to image pixel indices, seamless stitching of helical scan data into panoramic images was achieved, solving the problem of converting the cylinder liner outer circular annular surface into a planar panoramic image. The precise mapping from circumferential angle to circumferential pixel index and from axial displacement to axial pixel index stitched the line-by-line exposed annular strips into a complete panoramic image, ensuring that the spatial geometric relationship of the cylinder liner outer circle is accurately restored in the image, and providing a unified coordinate reference for the subsequent positioning and analysis of defects in the circumferential and axial directions.

[0022] The data preprocessing module calculates the mean gray value and standard deviation of the z-th row for each fixed axial height z in the cylinder liner outer circle panoramic grayscale image, which is also the pixel row of the cylinder liner outer circle panoramic grayscale image and the corresponding annular strip at the same height on the cylinder liner outer circle. The normalized gray value of the pixel is obtained by subtracting the mean gray value of the z-th row corresponding to the pixel at the circumferential pixel index θ and axial pixel index z in the cylinder liner outer circle panoramic grayscale image and then dividing it by the standard deviation of the z-th row. All the normalized gray values ​​are filled into the corresponding positions in the cylinder liner outer circle panoramic grayscale matrix to generate the normalized grayscale image J(θ,z), where θ∈[1,W], z∈[1,H], and the values ​​are real numbers. The defect area is represented by a value deviating from 0. The normalized grayscale image J(θ,z) can eliminate the brightness fluctuations in the z-th row circumferentially, making the grayscale abrupt change in the defect area more prominent. Specifically, by calculating the mean and standard deviation of each row and then normalizing, the interference of uneven circumferential illumination under the same axial height is eliminated, making the gray-scale abrupt change in the defect area more significant, thus laying the foundation for subsequent binarization and defect extraction. The optimal threshold is obtained by solving the normalized grayscale image J(θ,z) using the Otsu's method. Specifically, Otsu's method is an adaptive image thresholding method that can find an optimal threshold that maximizes the inter-class variance between suspected defective regions and normal regions and minimizes the intra-class variance by analyzing the grayscale histogram of the image. This allows the image to be divided into two parts by the threshold: the foreground (target) and the background, thereby achieving binary segmentation of the image. Take the absolute value of the normalized gray values ​​of all pixels in the normalized grayscale image J(θ,z) to obtain the normalized grayscale image J(θ,z) after taking the absolute value. If the gray value of a pixel in the normalized grayscale image J(θ,z) after taking the absolute value is greater than or equal to the optimal threshold, then generate a binary defect image B(θ,z)=1. B(θ,z)=1 indicates that the pixel belongs to the defect region. If the gray value of a pixel in the normalized grayscale image J(θ,z) after taking the absolute value is less than the optimal threshold, then a binary defect image B(θ,z)=0 is generated. B(θ,z)=0 indicates that the pixel belongs to the normal area. When the normalized grayscale value of a pixel in the normalized grayscale image J(θ,z) is greater than 0, a polarimetric image S(θ,z)=1 is generated; when the normalized grayscale value of a pixel in the normalized grayscale image J(θ,z) is less than 0, a polarimetric image S(θ,z)=-1 is generated; and when the normalized grayscale value of a pixel in the normalized grayscale image J(θ,z) is equal to 0, a polarimetric image S(θ,z)=0 is generated. Specifically, a polarimetric image S(θ,z)=1 indicates that the grayscale value of a defective pixel is higher than the mean of its row, and a polarimetric image S(θ,z)=-1 indicates that the grayscale value of a defective pixel is lower than the mean of its row, which is used for subsequent defect classification. Specifically, leveraging the characteristic that normalized defect grayscale can be positive or negative, the maximum inter-class variance method is used for adaptive segmentation to accurately extract suspected defects, simultaneously covering both bright and dark defects. The resulting binary defect map, through binarization marking, clearly extracts the spatial distribution contours of all suspected defects. This map can then be used to statistically analyze the proportion of defects in each row along the circumference, providing a basis for quantifiable analysis of the circumferential coverage of banded defects, such as banded, semi-thick / semi-thin, and uneven-bottomed banded defects. It reflects which areas are suspected defects, providing a foundation for subsequent spatial distribution analysis of defects. The generated polarity map, through polarity marking, preserves the grayscale attributes of defects, such as bright or dark defects. This polarity information, combined with the area and span of the defect, can be used to accurately distinguish different types of local defects. For example, a polarity marking of -1 for a small area may indicate a needle-like or pore defect, while a polarity marking of +1 for a medium area may indicate a paint hole or sintering defect. This reflects whether the defect is brighter or darker than the surrounding normal area, providing a grayscale attribute basis for defect classification. This achieves synergy between the extraction and classification of cylinder liner surface defects, making defect type judgment more accurate.

[0023] The defect localization module calculates the proportion of B(θ,z)=1 relative to all pixels at each axial height z for the binary defect image B(θ,z). That is, it calculates the proportion of pixels belonging to the defect area at each axial height z. The calculated proportion is marked as the circumferential coverage value, where the circumferential coverage value ∈ [0,1]. Each axial height z corresponds to a circumferential coverage value. The larger the circumferential coverage value, the wider the circumferential defect coverage at that axial height. Specifically, considering the characteristics of the wide circumferential coverage and axial continuity of the band-shaped defect on the outer circle of the cylinder liner, a circumferential coverage index is proposed. The binary defect image is compressed into a single-axis coverage curve along the axis, and the circumferential defect distribution is transformed into the defect coverage degree of the axial height. This realizes the axial dimension quantification of the circumferential distribution of the defect and provides a quantitative basis for the determination of the axial continuity interval of the band-shaped defect. The circumferential coverage value is used to solve for the band defect detection threshold. This threshold distinguishes between high-coverage band defect intervals and low-coverage local defect intervals. All axial heights *z* satisfying a circumferential coverage value ≥ the band defect detection threshold are extracted. The interval with the largest continuous length is selected and marked as the axial interval of the band defect, where [z1, z2] is the largest continuous interval of axial height *z* with a circumferential coverage value ≥ the band defect detection threshold. For example, in the axial height *z*... If there are 10 consecutive axial heights z with circumferential coverage values ​​greater than or equal to the band defect judgment threshold, and other axial heights z with circumferential coverage values ​​less than the band defect judgment threshold, then the starting interval of these 10 consecutive axial heights z is [z1, z2]. Combining the adaptive capability of the Otsu's method with continuous interval filtering, it automatically distinguishes between band-shaped (axially continuous, circumferentially wide coverage) and local (axially scattered, circumferentially narrow coverage) defects, accurately locates the axial range of band-shaped defects, eliminates interference from local defects, and ensures the continuity and representativeness of the band-shaped interval. The circumferential coverage values ​​corresponding to each axial height z within the axial interval of the band defect = [z1, z2] are added together, and then divided by the number of axial height z in the axial interval of the band defect to obtain the average circumferential coverage within the axial interval of the band defect. The number of axial height z in the axial interval of the band defect = z2 - z1 + 1. The axial proportion of the strip-shaped defect is obtained by dividing the number of axial heights z of the axial interval by the axial dimension H of the panoramic grayscale image of the cylinder liner outer circle. The product obtained by multiplying the average circumferential coverage by the axial proportion of the banded area is marked as the spiral texture comprehensive intensity value. The value of the spiral texture comprehensive intensity value ranges from 0 to 1. The larger the spiral texture comprehensive intensity value, the wider the circumferential coverage of the banded defect, the longer the axial continuous length, and the more significant the defect. Specifically, the average circumferential coverage is the average of the circumferential coverage corresponding to each axial height within the axial range of the banded defect. This quantifies the coverage breadth of the banded defect in the circumferential dimension, reflecting the average circumferential defect coverage ratio at each axial height within the banded defect range. The axial proportion of the banded range is the ratio of the axial range length of the banded defect to the total axial height H of the cylinder liner outer circle panoramic grayscale image. This quantifies the continuous length proportion of the banded defect in the axial dimension, reflecting the proportion of the axial coverage area of ​​the banded defect to the total axial length of the cylinder liner. (The spiral texture is then integrated.) The intensity value is the product of the two, which is a comprehensive index that integrates the circumferential coverage and the axial continuous length. It is used to quantify the overall intensity of banded defects. The larger the comprehensive intensity value of the spiral texture, the wider the circumferential coverage and the longer the axial extension of the banded defect, and the more significant the overall performance of the defect. By using the average circumferential coverage, the axial proportion of the banded area and the comprehensive intensity value of the spiral texture, it provides a precise and quantifiable basis for the intensity assessment of banded defects from the circumferential, axial and comprehensive dimensions, so that the defect judgment can be shifted from qualitative to quantitative, and the objectivity and accuracy of cylinder liner surface defect detection can be improved. The binary defect map B(θ,z) is filtered to remove defects within the axial interval [z1,z2] of the banded defect (these are banded defects). Only suspected defects whose axial height z is not within the axial interval [z1,z2] of the banded defect are retained (these are local defects). Specifically, when the axial height z does not belong to the axial interval of the banded defect, the original value of the binary defect map B(θ,z) is retained. When the axial height z belongs to the axial interval of the banded defect, all binary defect maps B(θ,z) at that axial height z are set to 0 (filtering out banded defects), resulting in a residual map R(θ,z). The residual map R(θ,z) is a binary defect map B(θ,z) containing only local defects. Among them, residual map R(θ,z)=1 indicates suspected local defects, and residual map R(θ,z)=0 indicates normal or banded defect areas. Specifically, the residual map R(θ,z) separates banded defects from local defects, so that the subsequent classification of local defects is not affected by banded defects.

[0024] For the defect detection module, please refer to [link / reference]. Figure 3 When the axial interval [z1, z2] of the banded defect is not empty, it indicates the existence of the axial interval of the banded defect. The output defect type is banded defect. Based on the resolution of the linear array camera and the actual size of the cylinder liner, the axial interval [z1, z2] of the banded defect is mapped to the actual cylinder liner height range, for example, 50mm to 70mm from the top of the cylinder liner. After mapping, the axial range of the banded defect is obtained. At the same time, the comprehensive intensity value of the spiral texture is used as the intensity of the banded defect. For example, if the comprehensive intensity value of the spiral texture is 0.85, it means that the defect has an average circumferential coverage of 85% and an axial proportion of 85%. Specifically, band-like defects include band-like defects, semi-coarse and semi-fine defects, and uneven bottom defects. Based on actual production experience and experiments, the following defect subdivision and judgment rules are set: if the intensity of a band-like defect is ≥0.7, it is judged as a band-like defect; if the intensity fluctuation of a band-like defect is ≥±0.2, it is judged as a semi-coarse and semi-fine defect; if the intensity of a band-like defect is ≥0.6 and the number of axial heights z, z2-z1+1≥H÷2, it is judged as an uneven bottom defect. Through interval existence and intensity quantification and defect subdivision, the accurate judgment and classification of band-like defects can be achieved, covering the band-like, semi-coarse and semi-fine, and uneven bottom defect types on the cylinder liner surface, meeting the industry's needs for detecting large-area texture anomalies in cylinder liners. Perform connected component analysis on the residual map R(θ,z) to find all interconnected residual map R(θ,z)=1 pixel clusters. Adjacent residual map R(θ,z)=1 pixels are regarded as a whole, i.e. a connected component. Each connected component represents a suspected local defect and is labeled. For each connected component, the area of ​​the connected component is calculated based on the number of pixels in the connected component. The mode of all polar graphs S(θ,z) in the connected component is taken, that is, the number of +1 and -1 pixels in the polar graphs in the connected component is counted. The polarity with the largest number is taken as the defect polarity of the connected component. The defect polarity reflects the level of the defect gray level relative to the average gray level of the pixel row. The areas of all connected components are statistically analyzed, and the segmentation threshold is calculated using the Otsu's method. The connected components are then classified into small and medium defects based on this threshold. Small defects are defined as connected component areas less than the segmentation threshold, while medium defects are defined as connected component areas greater than or equal to the segmentation threshold. Finally, the specific defect category is determined by combining the defect polarity, as follows: When the defect polarity is -1 (indicating that the gray level is lower than the row average) and it is a small defect, it is judged as a needle-like small defect or a hole defect. Both are low-gray-level tiny defects, which can be further distinguished in combination with the actual production scenario. When the defect polarity is -1 and it belongs to the medium defect, it is judged as a black slag defect (indicating black impurity residue, low grayness and large area). When the defect polarity is +1 (indicating that the gray level is higher than the row average) and it belongs to the medium defect category, it is judged as a paint eye defect, sintering defect, or impact defect. All three are high gray level medium area defects. When the defect polarity is +1 and it is a small defect, it is judged as a paint eye defect (indicating paint accumulation, high grayness and small area). Specifically, by using connected component analysis and the maximum inter-class variance method for adaptive classification, local defects such as paint holes, black slag, sintering, pores, pinholes, and impact damage on the cylinder liner surface are accurately identified, improving the automation and accuracy of local defect classification on the cylinder liner surface and meeting the needs of defect tracing and judgment on the production site.

[0025] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. An intelligent detection system for cylinder liner surface defects, characterized in that, include: The data preprocessing module obtains a panoramic grayscale image of the cylinder liner outer circle, calculates the mean grayscale value and standard deviation of each row of pixels in the panoramic grayscale image, subtracts the mean grayscale value of the row containing the pixel from the grayscale value of the pixel in the panoramic grayscale image, and then divides by the standard deviation of the row containing the pixel to obtain the normalized grayscale value of the pixel. The normalized grayscale values ​​of all pixels are combined to form a normalized grayscale image. The optimal threshold is obtained by solving the normalized grayscale image using the Otsu's method. The absolute value of the normalized grayscale value of the normalized grayscale image is taken. When the absolute value of the normalized grayscale value of the pixel in the normalized grayscale image is greater than or equal to the optimal threshold, a binary defect image is generated and the position of the pixel in the binary defect image is marked as 1. When the normalized grayscale value of the pixel in the normalized grayscale image is greater than 0, a polar image is generated and the position of the pixel in the polar image is marked as 1. The defect localization module marks the proportion of pixels marked as 1 in each row of the binary defect image as the circumferential coverage value. It calculates the strip defect judgment threshold using the Otsu's method based on the circumferential coverage value. The pixel row interval with the largest continuous length and circumferential coverage value greater than or equal to the strip defect judgment threshold is marked as the axial interval of the strip defect. The quotient obtained by summing the circumferential coverage values ​​corresponding to all pixel rows in the axial interval of the strip defect and dividing it by the number of pixel rows in the axial interval of the strip defect is marked as the average circumferential coverage. The quotient obtained by dividing the number of pixel rows in the axial interval of the strip defect by the total number of pixel rows in the panoramic grayscale image of the cylinder liner outer circle is marked as the axial proportion of the strip interval. The product of the average circumferential coverage and the axial proportion of the strip interval is marked as the spiral texture comprehensive intensity value.

2. The intelligent detection system for cylinder liner surface defects according to claim 1, characterized in that, Also includes: The data acquisition module activates the servo control system of the cylinder liner online fully automatic inspection machine, controlling the cylinder liner to rotate at a preset angular velocity. Simultaneously, it controls the line scan camera to descend synchronously along the cylinder liner axis at a preset linear velocity. The line scan camera captures and outputs a progressive exposure sequence, which includes exposure data, rotation angle, and axial displacement. The rotation angle is the product of the exposure time of the line scan camera and the preset angular velocity, and the axial displacement is the product of the exposure time of the line scan camera and the preset linear velocity. The preset angular velocity and preset linear velocity are preset according to the detection speed requirements and the performance of the cylinder liner online fully automatic inspection machine, and the value range of the preset linear velocity must match the preset angular velocity. Each line of exposure data corresponds to the grayscale information of an annular strip on the outer circle of the cylinder liner. The annular strip is an image of an annular area that extends circumferentially along the outer circle of the cylinder liner and has a fixed narrow width along the axial direction, acquired by the line scan camera in a single exposure during the helical scanning process.

3. The intelligent detection system for cylinder liner surface defects according to claim 2, characterized in that, include: Generate a zero matrix with circumferential dimension W and axial dimension H, and label this zero matrix as the cylinder liner outer circle panoramic grayscale image matrix T(θ,z), where W is the number of pixel columns in the matrix and is determined by the cylinder liner circumference and camera resolution, and H is the number of pixel rows in the matrix and is determined by the cylinder liner axial length and camera resolution. Fill each row of exposure data into the cylinder liner outer circle panoramic grayscale matrix T(θ,z), where θ∈[1,W] is the circumferential pixel index and z∈[1,H] is the axial pixel row index. The specific filling method is as follows: The rotation angle θ corresponding to the exposure time t of the line scan camera t The circumferential pixel index θ is converted into the panoramic grayscale matrix of the cylinder liner outer circle by linear normalization; The axial displacement z corresponding to the exposure time t t The data is converted into the axial pixel index z of the cylinder liner outer circle panoramic grayscale matrix by linear normalization. Each row of exposure data is then filled pixel by pixel into the (θ,z) position of the cylinder liner outer circle panoramic grayscale matrix T. The filling operation is repeated until all rows of exposure data are filled to obtain a cylinder liner outer circle panoramic grayscale image with dimension W×H.

4. The intelligent detection system for cylinder liner surface defects according to claim 3, characterized in that, include: The normalized grayscale values ​​of all pixels are filled into the corresponding positions in the panoramic grayscale matrix of the cylinder liner outer circle to generate the normalized grayscale image J(θ,z); The optimal threshold is obtained by solving the normalized grayscale image using the maximum inter-class variance method. Take the absolute value of the normalized grayscale value of all pixels in the normalized grayscale image to obtain the normalized grayscale image after taking the absolute value. If the normalized grayscale value of a pixel in the normalized grayscale image after taking the absolute value is greater than or equal to the optimal threshold, generate a binary defect image B(θ,z) and mark the position of the pixel in the binary defect image as 1. B(θ,z)=1 indicates that the pixel belongs to the defect area. If the normalized grayscale value of a pixel in the normalized grayscale image after taking the absolute value is less than the optimal threshold, a binary defect image B(θ,z) is generated, and the position of the pixel in the binary defect image is marked as 0. B(θ,z)=0 indicates that the pixel belongs to the normal area.

5. The intelligent detection system for cylinder liner surface defects according to claim 4, characterized in that, include: When the normalized gray value of a pixel in the normalized grayscale image is greater than 0, a polar map S(θ,z) is generated, and the position of the pixel in the polar map is marked as 1. Polar map S(θ,z)=1 indicates that the gray value of the defective pixel is higher than the gray average value of its row. When the normalized gray value of a pixel in the normalized grayscale image is less than 0, a polar map S(θ,z) is generated, and the position of the pixel in the polar map is marked as -1. Polar map S(θ,z)=-1 indicates that the gray value of the defective pixel is lower than the gray average value of its row. When the normalized gray value of a pixel in the normalized grayscale image is equal to 0, a polarimetric image S(θ,z) is generated, and the position of the pixel in the polarimetric image is marked as 0. A polarimetric image S(θ,z) = -0 indicates that the gray value of the defective pixel is equal to the gray average value of its row.

6. The intelligent detection system for cylinder liner surface defects according to claim 5, characterized in that, include: Extract all pixel rows z that satisfy the circumferential coverage value ≥ the band defect determination threshold, select the interval with the longest continuous length and mark it as the axial interval of the band defect, the axial interval of the band defect is [z1, z2]; The average circumferential coverage of the axial interval of the strip defect is obtained by summing the circumferential coverage values ​​corresponding to each pixel row z in the axial interval of the strip defect and then dividing by the number of pixel rows z in the axial interval of the strip defect. The number of pixel rows z in the axial interval of the strip defect is z2-z1+1. The axial proportion of the strip-shaped defect is obtained by dividing the number of pixel rows z in the axial region of the cylinder liner outer circle panoramic grayscale image by the axial dimension H. The product obtained by multiplying the average circumferential coverage by the axial proportion of the banded area is marked as the spiral texture comprehensive intensity value. The value of the spiral texture comprehensive intensity value ranges from 0 to 1. The spiral texture comprehensive intensity value is the quantitative value of the circumferential coverage of the banded defect. Residual maps are generated based on binary defect maps.

7. The intelligent detection system for cylinder liner surface defects according to claim 6, characterized in that, The defect location module, residual map, includes: The residual map is obtained after filtering the binary defect map. The specific filtering process is as follows: When pixel row z does not belong to the axial interval [z1, z2] of the band defect, the original position label value of pixel row z in the binary defect map B(θ, z) remains unchanged. When pixel row z belongs to the axial interval [z1, z2] of the band defect, the label of the corresponding position of pixel row z in the binary defect map B(θ, z) is set to 0. After filtering all pixel rows z, the residual map R(θ, z) is obtained. The residual map is a binary defect map that only contains local defects. Among them, residual map R(θ, z) = 1 is a suspected local defect, and residual map R(θ, z) = 0 is a normal or band defect area. Based on the axial interval of the banded defect and the residual map, the defect type is output by the defect discrimination module.

8. The intelligent detection system for cylinder liner surface defects according to claim 7, characterized in that, The defect discrimination module outputs a defect type of "band-shaped defect" when the axial interval [z1, z2] of the band-shaped defect is not empty. It judges and outputs the band-shaped defect type based on the comprehensive intensity value of the spiral texture. It performs connected component analysis on the residual map to obtain connected components. It calculates the area of ​​the connected component based on the number of pixels in the connected component. It counts the number of pixels in the connected component that are marked as +1 and -1 in the polarity map. The marked with the largest number is taken as the defect polarity of the connected component. The defect polarity includes two types of markings, +1 and -1, which reflect the degree of the defect gray level relative to the average gray level of the pixel row. It judges and outputs the local defect type based on the area of ​​the connected component and the defect polarity.

9. The intelligent detection system for cylinder liner surface defects according to claim 8, characterized in that, include: The overall intensity value of the spiral texture is labeled as the intensity of a banded defect. Band-shaped defects include band-shaped defects, semi-coarse and semi-thin defects, and uneven bottom defects. Based on actual production experience and experiments, the following defect sub-classification and judgment methods are established: A banded defect is defined as having a strength ≥ 0.

7. When the intensity fluctuation of a banded defect is ≥ ±0.2, it is judged as a semi-coarse and semi-fine defect; When the intensity of a band-shaped defect is ≥0.6 and the number of pixel rows z is ≥2 of the axial dimension H÷2 of the panoramic grayscale image of the cylinder liner outer circle, it is judged as an uneven bottom defect.

10. The intelligent detection system for cylinder liner surface defects according to claim 8, characterized in that, include: Connectivity analysis is performed on the residual map, and adjacent pixels marked as 1 in the residual map are regarded as a connected component. Each connected component represents a suspected local defect. The segmentation threshold is calculated using the Otsu's method based on the area of ​​all connected components. This threshold categorizes connected components into small and medium defects. Components with an area less than the segmentation threshold are marked as small defects, while those with an area greater than or equal to the threshold are marked as medium defects. Finally, defect polarity is used to determine the specific local defect category, as detailed below: When the defect polarity is -1 and it is a small defect, it is judged as a needle-like small defect or a hole defect. When the defect polarity is -1 and it belongs to the medium defect category, it is judged as a black slag defect. When the defect polarity is +1 and it belongs to the medium defect, it is judged as a paint eye defect, sintering defect or impact defect. When the defect polarity is +1 and it is a small defect, it is judged as a paint eye defect.