Aluminum bar surface quality detection method

Through high-definition image acquisition and advanced image processing algorithms, combined with machine learning models, the accuracy and efficiency of aluminum rod surface quality detection are solved, and the accurate detection and quantitative evaluation of aluminum rod surface defects are realized to meet the real-time detection needs of large-scale production lines.

CN120471898APending Publication Date: 2025-08-12LUOYANG WANJI ALUMINUM PROCESSING CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510645906.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, aluminum rod surface quality detection has problems such as strong subjectivity, low efficiency, difficulty in accurately detecting small defects, and inability to quantify and evaluate.

Method used

The high-definition linear array camera is used to obtain the surface image of the aluminum rod with a multi-angle light source, and defect characteristics are extracted through image preprocessing, Canny edge detection and Hough transformation, and defect classification and evaluation are carried out in combination with the support vector machine algorithm to generate quality reports.

Benefits of technology

It realizes accurate detection and quantitative evaluation of tiny defects on the surface of aluminum rods, improves the accuracy and efficiency of detection, provides comprehensive and objective quality evaluation, and supports real-time inspection and automatic report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471898A_ABST
    Figure CN120471898A_ABST
Patent Text Reader

Abstract

The invention discloses an aluminum bar surface quality detection method in the field of aluminum bar production, and the method comprises the following steps: S101, image collection: employing a high-definition line-scan digital camera to move at a constant speed along the axial direction of an aluminum bar for shooting, and cooperating with a multi-angle annular light source to enhance the surface defect contrast, and obtaining a continuous image of the surface of the aluminum bar; step S102, image preprocessing: sequentially carrying out graying processing, median filtering denoising and histogram equalization enhancement on the acquired image; through high-definition image acquisition, an advanced image processing algorithm and a machine learning classification model, tiny defects on the surface of the aluminum bar can be accurately detected, the defect type and severity can be accurately judged, the detection accuracy and reliability are improved, an automatic image acquisition and processing system is adopted, and the detection efficiency is improved. The surface of the aluminum bar can be rapidly detected, compared with manual visual detection, the detection efficiency is greatly improved, and the real-time detection requirement on a large-scale production line can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of aluminum bar production, and in particular to a method for detecting the surface quality of an aluminum bar. Background Art

[0002] In the production process of aluminum bars, surface quality is an important indicator to measure their quality. Defects on the surface of aluminum bars, such as cracks, pinholes, and peeling, will seriously affect the subsequent processing performance of the aluminum bars as well as the quality and service life of the manufactured products. At present, common methods for detecting the surface quality of aluminum bars mainly include manual visual inspection and simple mechanical inspection. Manual visual inspection has the problems of strong subjectivity, low efficiency, and susceptibility to factors such as fatigue and experience of the inspectors. It is difficult to accurately detect minor defects and cannot quantitatively evaluate the surface quality of aluminum bars. Simple mechanical inspection, such as using tools such as calipers to measure dimensional deviations, can only detect some obvious defects. It is difficult to detect some defects hidden under the surface or with irregular shapes. Therefore, those skilled in the art provide a method for detecting the surface quality of aluminum bars to solve the problems raised in the above background technology. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for detecting the surface quality of an aluminum bar to solve the problems raised in the above background technology.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A method for detecting the surface quality of an aluminum bar comprises the following steps: Step S101, image acquisition: a high-definition linear array camera is used to uniformly move along the axis of the aluminum bar to capture images, and a multi-angle annular light source is used to enhance the contrast of surface defects to obtain continuous images of the aluminum bar surface;

[0006] Step S102, image preprocessing: grayscale processing, median filtering denoising, and histogram equalization enhancement are performed on the collected image in sequence;

[0007] Step S103, defect feature extraction: use the Canny edge detection algorithm to extract image edge information, combine with Hough transform to identify linear defects, and calculate the geometric features and grayscale features such as the area, perimeter, and circularity of the defect area;

[0008] Step S104, defect classification and evaluation: constructing a defect classification model based on the support vector machine algorithm, performing quantitative evaluation based on defect type, size, and severity, and generating an overall score for the aluminum bar surface quality;

[0009] Step S105, data storage and report generation: the inspection data is stored in a database, and an inspection report including defect type, location, severity and overall quality grade is automatically generated.

[0010] As a further solution of the present invention: in step S101, the multi-angle ring light source uniformly illuminates the surface of the aluminum rod from at least three different directions, the light source brightness is 500-2000 lux, the camera resolution is not less than 2048×2048 pixels, and the shooting speed matches the movement speed of the aluminum rod to ensure that the overlap rate of adjacent images is ≥30%.

[0011] As a further solution of the present invention: in step S103, for crack defects, the length, width, direction and depth characteristics of the cracks are further calculated; for sand hole defects, the diameter, area and distribution density of the sand holes are calculated.

[0012] As a further solution of the present invention: in step S104, the quantitative evaluation includes the following aspects:

[0013] 1) Defects with a crack length ≥5mm or a depth ≥0.5mm are considered serious defects;

[0014] 2) Defects with a sand hole area ≥ 2mm² or a density ≥ 3 / cm² are considered serious defects;

[0015] 3) Based on the number of serious defects, the number of general defects and the proportion of the total defect area, the quality grades of aluminum bars are divided into excellent, good, qualified and unqualified; no serious defects and the total defect area ratio is less than 0.1% is excellent, no serious defects and the total defect area ratio is 0.1%-0.5% is good, 1-2 serious defects or the total defect area ratio is 0.5%-1% is qualified, and ≥3 serious defects or the total defect area ratio is greater than 1% is unqualified.

[0016] As a further solution of the present invention: in step S105, the database adopts structured storage, including original image data, preprocessed images, defect feature vectors, classification results and evaluation parameters; the inspection report is output in PDF or XML format, including aluminum bar number, inspection time, inspection equipment information, defect distribution map and quality grade determination basis.

[0017] As a further solution of the present invention: the method also includes self-calibration of the detection system: regularly using standard defect templates (including cracks, pinholes, peeling and other defects of known sizes) to calibrate the detection system, adjust camera parameters and algorithm thresholds, and ensure that the detection error is ≤5%.

[0018] As a further solution of the present invention: in step S104, the support vector machine model uses a radial basis function as a kernel function and is trained with at least 1,000 groups of sample data of known defect types, and the model classification accuracy is ≥95%.

[0019] As a further solution of the present invention: the method also includes real-time early warning: when serious defects are detected or the quality grade of three consecutive aluminum bars is "unqualified", the system automatically triggers an audible and visual alarm and pushes the early warning information to the mobile terminal of the designated manager.

[0020] As a further solution of the present invention: in step S102, the median filtering adopts a 3×3 or 5×5 window size, and the histogram equalization adopts an adaptive local histogram equalization algorithm, including the following steps:

[0021] S1021, image segmentation: Divide the preprocessed image into non-overlapping 8×8 pixel sub-blocks, and perform histogram equalization on each sub-block independently;

[0022] S1022, contrast limitation: clip the histogram of each sub-block, with the clipping threshold being 1.2-1.8 times the global histogram mean to suppress noise amplification;

[0023] S1023, bilinear interpolation: using a bilinear interpolation method to smoothly transition the enhancement results of adjacent sub-blocks to eliminate blocking effects;

[0024] S1024, dynamic adjustment of enhancement factor: Dynamically adjust the enhancement factor according to the local entropy value of the sub-block. The local entropy value calculation formula is: in, is the probability of a pixel with gray value i in the sub-block, L is the total number of gray levels, usually 256;

[0025] When the local entropy value H(p)<2.0, the enhancement factor is 3.0;

[0026] When the local entropy value is 2.0≤H(p)<4.0, the enhancement factor is 2.0;

[0027] When the local entropy value H(p) ≥ 4.0, the enhancement factor is 1.5;

[0028] S1025, grayscale mapping: Map the sub-block pixel grayscale values to a new grayscale range using a cumulative distribution function. The mapping function is: Where f(x,y) is the original pixel grayscale value, g(x,y) is the grayscale value after mapping, CDFmin is the CDF minimum value, and CDFmax is the CDF maximum value.

[0029] As a further solution of the present invention: the method is implemented by a computer program, which is stored in a non-transitory computer-readable medium and implements detection when executed by a processor.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] 1. Through high-definition image acquisition, advanced image processing algorithms and machine learning classification models, the present invention can accurately detect tiny defects on the surface of aluminum bars and accurately determine the type and severity of defects, thereby improving the accuracy and reliability of detection. The use of an automated image acquisition and processing system can achieve rapid detection of the surface of aluminum bars. Compared with manual visual inspection, this greatly improves detection efficiency and can meet the real-time detection needs of large-scale production lines.

[0032] 2. The present invention has established a complete defect quantitative assessment system, which can not only evaluate individual defects, but also give an overall score and grade of the surface quality of aluminum bars, providing enterprises with a comprehensive and objective basis for quality evaluation, helping them to better control product quality, and realizing the storage of test data and automatic generation of reports, making it convenient for enterprises to query, analyze and compile historical data, helping enterprises to discover potential problems in the production process, optimize production processes, and improve product quality stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of the method of the present invention; DETAILED DESCRIPTION

[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0035] See also Figure 1 In an embodiment of the present invention, a method for detecting the surface quality of an aluminum bar includes the following steps: Step S101, image acquisition: a high-definition linear array camera is used to uniformly move along the axis of the aluminum bar to capture images, and a multi-angle annular light source is used to enhance the contrast of surface defects to obtain continuous images of the aluminum bar surface;

[0036] Step S102, image preprocessing: grayscale processing, median filtering denoising, and histogram equalization enhancement are performed on the collected image in sequence;

[0037] Step S103, defect feature extraction: use the Canny edge detection algorithm to extract image edge information, combine with Hough transform to identify linear defects, and calculate the geometric features and grayscale features such as the area, perimeter, and circularity of the defect area;

[0038] Step S104, defect classification and evaluation: constructing a defect classification model based on the support vector machine algorithm, performing quantitative evaluation based on defect type, size, and severity, and generating an overall score for the aluminum bar surface quality;

[0039] Step S105, data storage and report generation: the inspection data is stored in a database, and an inspection report including defect type, location, severity and overall quality grade is automatically generated.

[0040] In step S101, the multi-angle ring light source uniformly illuminates the surface of the aluminum rod from at least three different directions, the brightness of the light source is 500-2000 lux, the camera resolution is not less than 2048×2048 pixels, and the shooting speed matches the movement speed of the aluminum rod to ensure that the overlap rate of adjacent images is ≥30%.

[0041] In step S103, for crack defects, the length, width, direction and depth characteristics of the cracks are further calculated; for sand hole defects, the diameter, area and distribution density of the sand holes are calculated.

[0042] In step S104, the quantitative evaluation includes the following aspects:

[0043] 1) Defects with a crack length ≥5mm or a depth ≥0.5mm are considered serious defects;

[0044] 2) Defects with a sand hole area ≥ 2mm² or a density ≥ 3 / cm² are considered serious defects;

[0045] 3) Based on the number of serious defects, the number of general defects and the proportion of the total defect area, the quality grades of aluminum bars are divided into excellent, good, qualified and unqualified; no serious defects and the total defect area ratio is less than 0.1% is excellent, no serious defects and the total defect area ratio is 0.1%-0.5% is good, 1-2 serious defects or the total defect area ratio is 0.5%-1% is qualified, and ≥3 serious defects or the total defect area ratio is greater than 1% is unqualified.

[0046] In step S105, the database adopts structured storage, including original image data, pre-processed images, defect feature vectors, classification results and evaluation parameters; the inspection report is output in PDF or XML format, including aluminum bar number, inspection time, inspection equipment information, defect distribution map and quality grade determination basis.

[0047] The method also includes self-calibration of the detection system: regularly using standard defect templates (containing defects such as cracks, pinholes, and peeling of known sizes) to calibrate the detection system, adjust camera parameters and algorithm thresholds, and ensure that the detection error is ≤5%.

[0048] Wherein, in step S104, the support vector machine model uses radial basis function as kernel function and is trained by at least 1000 groups of sample data of known defect types, and the model classification accuracy is ≥95%.

[0049] The method also includes real-time warning: when serious defects are detected or the quality grade of three consecutive aluminum bars is "unqualified", the system automatically triggers an audible and visual alarm and pushes the warning information to the mobile terminal of the designated manager.

[0050] In step S102, the median filter adopts a 3×3 or 5×5 window size, and the histogram equalization adopts an adaptive local histogram equalization algorithm, including the following steps:

[0051] S1021, image segmentation: Divide the preprocessed image into non-overlapping 8×8 pixel sub-blocks, and perform histogram equalization on each sub-block independently;

[0052] S1022, contrast limitation: clip the histogram of each sub-block, with the clipping threshold being 1.2-1.8 times the global histogram mean to suppress noise amplification;

[0053] S1023, bilinear interpolation: using a bilinear interpolation method to smoothly transition the enhancement results of adjacent sub-blocks to eliminate blocking effects;

[0054] S1024, dynamic adjustment of enhancement factor: Dynamically adjust the enhancement factor according to the local entropy value of the sub-block. The local entropy value calculation formula is: in, is the probability of a pixel with gray value i in the sub-block, L is the total number of gray levels, usually 256;

[0055] When the local entropy value H(p)<2.0, the enhancement factor is 3.0;

[0056] When the local entropy value is 2.0≤H(p)<4.0, the enhancement factor is 2.0;

[0057] When the local entropy value H(p) ≥ 4.0, the enhancement factor is 1.5;

[0058] S1025, grayscale mapping: Map the sub-block pixel grayscale values to a new grayscale range using a cumulative distribution function. The mapping function is: Where f(x,y) is the original pixel grayscale value, g(x,y) is the grayscale value after mapping, CDFmin is the CDF minimum value, and CDFmax is the CDF maximum value.

[0059] After adopting the above technical solution, the block size (8×8) and bilinear interpolation method are clarified to solve the blocking effect problem of traditional CLAHE. The cropping threshold is dynamically set by multiples of the global histogram mean (1.2-1.8) to balance detail enhancement and noise suppression. The local entropy value is introduced as an adaptive parameter. A high enhancement factor is used for low-entropy areas (few details) and a low enhancement factor is used for high-entropy areas (rich details) to avoid excessive enhancement. However, the accuracy of the technical solution is enhanced through the dynamic allocation of entropy values.

[0060] The method is implemented by a computer program, which is stored in a non-transitory computer-readable medium and implements detection when executed by a processor.

[0061] The working principle of the present invention is:

[0062] Preparation: Install a high-definition line array camera, a multi-angle ring light source, and related image acquisition and processing equipment on the aluminum bar production line. Adjust the camera's shooting parameters, light source brightness, and angle based on the aluminum bar specifications and production speed to ensure high-quality image capture.

[0063] Image acquisition: When the aluminum bar moves at a constant speed on the production line, the high-definition linear array camera continuously shoots the surface of the aluminum bar according to the set parameters, obtains a series of image data of the aluminum bar surface, and transmits the data in real time to the computer for subsequent processing.

[0064] Image preprocessing: After receiving the image data, the computer first grayscales the image, then uses a median filter algorithm to remove noise, and then enhances the image using a histogram equalization algorithm. The processed image is clearer and the defect features are more distinct.

[0065] Defect feature extraction: The Canny edge detection algorithm is used to extract edge information from the image. For detected edges, algorithms such as the Hough transform are used to extract the features of linear defects. For irregular defects, their geometric and grayscale features are calculated. The extracted defect features are then organized and analyzed.

[0066] Defect Classification and Assessment: Extracted defect features are fed into a pre-trained support vector machine (SVM) model to classify defects. Each defect is evaluated based on its type and characteristics, according to established quantitative assessment criteria. The overall score and grade of the aluminum bar surface quality is then derived by combining the assessment results of all defects.

[0067] Data Storage and Report Generation: Image data, defect feature data, and assessment results from the inspection process are stored in a database. Based on the report template, an aluminum bar surface quality inspection report is automatically generated and output to relevant personnel or departments for production quality monitoring and management.

[0068] Through high-definition image acquisition, advanced image processing algorithms and machine learning classification models, this application can accurately detect tiny defects on the surface of aluminum bars and accurately determine the type and severity of defects, thereby improving the accuracy and reliability of detection. The use of an automated image acquisition and processing system can achieve rapid detection of the surface of aluminum bars. Compared with manual visual inspection, it greatly improves detection efficiency and can meet the real-time detection needs of large-scale production lines.

[0069] A complete defect quantitative assessment system has been established, which can not only evaluate individual defects, but also give an overall score and grade of the surface quality of aluminum bars, providing enterprises with a comprehensive and objective basis for quality evaluation, helping them to better control product quality, and realizing the storage of test data and automatic generation of reports, making it convenient for enterprises to query, analyze and compile historical data, helping enterprises to discover potential problems in the production process, optimize production processes, and improve product quality stability.

[0070] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A method for detecting the surface quality of an aluminum bar, characterized by: The steps include: Step S101, image acquisition: a high-definition linear array camera is used to uniformly move along the axis of the aluminum bar to capture images, and a multi-angle annular light source is used to enhance the contrast of surface defects to obtain continuous images of the aluminum bar surface; Step S102, image preprocessing: grayscale processing, median filtering denoising, and histogram equalization enhancement are performed on the collected image in sequence; Step S103, defect feature extraction: use the Canny edge detection algorithm to extract image edge information, combine with Hough transform to identify linear defects, and calculate the geometric features and grayscale features such as the area, perimeter, and circularity of the defect area; Step S104, defect classification and evaluation: constructing a defect classification model based on the support vector machine algorithm, performing quantitative evaluation based on defect type, size, and severity, and generating an overall score for the aluminum bar surface quality; Step S105, data storage and report generation: the inspection data is stored in a database, and an inspection report including defect type, location, severity and overall quality grade is automatically generated.

2. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S101, the multi-angle ring light source uniformly illuminates the surface of the aluminum rod from at least three different directions, the light source brightness is 500-2000 lux, the camera resolution is not less than 2048×2048 pixels, and the shooting speed matches the movement speed of the aluminum rod to ensure that the overlap rate of adjacent images is ≥30%.

3. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S103, for crack defects, the length, width, direction and depth characteristics of the cracks are further calculated; for sand hole defects, the diameter, area and distribution density of the sand holes are calculated.

4. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S104, the quantitative evaluation includes the following aspects: 1) Defects with a crack length ≥5mm or a depth ≥0.5mm are considered serious defects; 2) Defects with a sand hole area ≥ 2mm² or a density ≥ 3 / cm² are considered serious defects; 3) Based on the number of serious defects, the number of general defects and the proportion of the total defect area, the quality grades of aluminum bars are divided into excellent, good, qualified and unqualified; no serious defects and the total defect area ratio is less than 0.1% is excellent, no serious defects and the total defect area ratio is 0.1%-0.5% is good, 1-2 serious defects or the total defect area ratio is 0.5%-1% is qualified, and ≥3 serious defects or the total defect area ratio is greater than 1% is unqualified.

5. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S105, the database adopts structured storage, including original image data, pre-processed images, defect feature vectors, classification results and evaluation parameters; the inspection report is output in PDF or XML format, including aluminum bar number, inspection time, inspection equipment information, defect distribution map and quality grade determination basis.

6. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: The method also includes self-calibration of the detection system: regularly calibrating the detection system using standard defect samples, adjusting camera parameters and algorithm thresholds, and ensuring that the detection error is ≤5%.

7. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S104, the support vector machine model uses a radial basis function as a kernel function and is trained using at least 1,000 groups of sample data of known defect types, with a model classification accuracy of ≥95%.

8. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: The method also includes real-time early warning: when serious defects are detected or the quality grade of three consecutive aluminum bars is "unqualified", the system automatically triggers an audible and visual alarm and pushes the early warning information to the mobile terminal of the designated manager.

9. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: In step S102, the median filter adopts a 3×3 or 5×5 window size, and the histogram equalization adopts an adaptive local histogram equalization algorithm, including the following steps: S1021, image segmentation: Divide the preprocessed image into non-overlapping 8×8 pixel sub-blocks, and perform histogram equalization on each sub-block independently; S1022, contrast limitation: clip the histogram of each sub-block, with the clipping threshold being 1.2-1.8 times the global histogram mean to suppress noise amplification; S1023, bilinear interpolation: using a bilinear interpolation method to smoothly transition the enhancement results of adjacent sub-blocks to eliminate blocking effects; S1024, dynamic adjustment of enhancement factor: Dynamically adjust the enhancement factor according to the local entropy value of the sub-block. The local entropy value calculation formula is: in, is the probability of a pixel with gray value i in the sub-block, L is the total number of gray levels, usually 256; When the local entropy value H(p)<2.0, the enhancement factor is 3.0; When the local entropy value is 2.0≤H(p)<4.0, the enhancement factor is 2.0; When the local entropy value H(p) ≥ 4.0, the enhancement factor is 1.5; S1025, grayscale mapping: Map the sub-block pixel grayscale values to a new grayscale range using a cumulative distribution function. The mapping function is: Where f(x,y) is the original pixel grayscale value, g(x,y) is the grayscale value after mapping, CDFmin is the CDF minimum value, and CDFmax is the CDF maximum value.

10. The method for detecting the surface quality of an aluminum bar according to claim 1, wherein: The method is implemented by a computer program, which is stored in a non-transitory computer-readable medium. When executed by a processor, the detection method steps according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Aluminum bar surface quality detection method and system based on visual detection

    CN121114144A