A smart positioning method and system for can stamping

By employing adaptive threshold segmentation, subpixel edge detection, and pose correction technologies, the problem of edge extraction under reflective surfaces and complex backgrounds on the tank surface was solved. This enabled efficient and accurate quality inspection and defect identification of tank stamping parts, ensuring the accuracy of measurement results and real-time monitoring of the production process.

CN119295548BActive Publication Date: 2025-10-28DADI CAN MFG IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411788336.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-10-28
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

Traditional image processing methods struggle to accurately extract edge information from reflective surfaces and complex backgrounds on tank surfaces, leading to inaccurate measurement results during production and a tendency for tanks to shift or tilt.

Method used

An adaptive threshold segmentation algorithm and a moment-based subpixel edge detection method are adopted, combined with Hough transform and affine transform, to establish a tank coordinate system, correct the tank posture to make it perpendicular to the camera imaging plane, and identify texture features through gray-level co-occurrence matrix and local binary pattern algorithms, and perform defect detection by combining support vector machine classification model.

Benefits of technology

It enables efficient and precise quality inspection of tank stamping parts, improves the accuracy of tank contour positioning and defect detection, ensures the accuracy of measurement results, and can monitor dimensional deviations or defects that occur during the production process in real time, providing early warning signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295548B_ABST
    Figure CN119295548B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent positioning method and system for can stamping, relating to the field of image processing technology. It includes acquiring images of the stamped can parts; using an adaptive threshold segmentation algorithm to segment the stamped can parts from the background to obtain segmented can region image data; accurately locating the can contour edge coordinates using a moment-based subpixel edge detection method to obtain key dimensional parameters of the can; extracting texture features of the can surface using gray-level co-occurrence matrix and local binary mode algorithms; and determining whether a surface defect exists using a support vector machine classification model. This invention solves the problem of traditional image processing methods struggling to accurately extract edge information when faced with reflective surfaces and complex backgrounds. By establishing a can coordinate system and performing posture correction, it ensures the accuracy of measurement results and overcomes the tendency for cans to shift or tilt during production, achieving efficient and accurate quality inspection of stamped can parts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to an intelligent positioning method and system for can stamping. Background Technology

[0002] In the production process of tank stamping parts, it is necessary to perform precise dimensional measurement and defect detection on the tank to ensure product quality. However, due to factors such as surface reflection and complex background, traditional image processing methods are difficult to accurately extract the edge information of the tank. At the same time, the tank is prone to displacement or tilting during the production process, resulting in inaccurate measurement results. Summary of the Invention

[0003] The purpose of this invention is to provide an intelligent positioning method and system for can stamping, which solves the problem that traditional image processing methods are difficult to accurately extract edge information when faced with reflective surfaces and complex backgrounds on the can surface. At the same time, by establishing a can coordinate system and performing posture correction, the accuracy of the measurement results is ensured, thereby overcoming the problem of offset or tilting that can easily occur during the production process, and realizing efficient and accurate quality inspection of can stamping parts.

[0004] This application provides an intelligent positioning method for can stamping, comprising the following steps:

[0005] The outline of the tank area is determined; when the fitted edge curve is discontinuous, the missing part of the edge curve is supplemented according to the coordinates of the edge points to obtain the complete outline of the tank; the outline analysis algorithm is used to obtain the image of the tank stamping part captured by the high-resolution camera, and the adaptive threshold segmentation algorithm is used to segment the tank stamping part from the background, convert the image into a binary image, and extract the pixel coordinate set of the tank edge outline through the edge detection algorithm to obtain the segmented tank area image data;

[0006] Based on the segmented tank area image data, the gray-scale moments from zero to third order within the image window are calculated. By setting the tank edge to conform to the ideal step edge model, the sub-pixel level position of the edge is determined by utilizing the invariance of the gray-scale moments, and the sub-pixel edge points are fitted into a continuous edge curve.

[0007] On the fitted subpixel edge curve, the straight lines of the tank edge are extracted based on the Hough transform. The two longest edge lines are selected as the edges on both sides of the tank according to the length threshold, and the start and end coordinates of the two lines are obtained.

[0008] Calculate the distance from the endpoints of the two edge lines to the center point of the tank. Set the offset threshold to five percent of the tank width. When the difference between the distances from the center to the two sides exceeds the threshold or the tilt angle of the edge lines exceeds the preset angle, correction is performed and the corrected center point is used as the origin to establish the tank coordinate system.

[0009] Based on the established tank coordinate system, an affine transformation is performed on the tank region in the image to correct the tank's orientation so that it is perpendicular to the camera's imaging plane.

[0010] On the corrected tank image, the coordinates of the tank contour edges are accurately located using a moment-based subpixel edge detection method to obtain the tank's dimensional parameters.

[0011] Furthermore, an adaptive threshold segmentation algorithm is used to segment the tank stamping parts from the background, converting the image into a binary image. An edge detection algorithm is then used to extract the pixel coordinate set of the tank edge contour, yielding the segmented tank region image data, specifically including:

[0012] An adaptive threshold segmentation algorithm is used to adaptively determine the segmentation threshold based on the gray-scale distribution characteristics of local image regions, thereby segmenting the tank stamping parts from the background.

[0013] The segmented image is binarized to convert the grayscale image into a black and white binary image, highlighting the area of ​​the tank stamping parts;

[0014] An edge detection algorithm is used to process the binarized image to extract the set of pixel coordinates of the edge contour of the tank stamping part;

[0015] Based on the extracted set of edge contour pixel coordinates, the area range of the tank stamping part is determined, and the segmented tank area image data is obtained.

[0016] Morphological processing is performed on the segmented tank region image data, and the processed tank region image data is output.

[0017] Furthermore, after obtaining the segmented tank region image data, the process also includes: acquiring the segmented tank region image; calculating the zero-order to third-order gray-scale moments for the pixels within the image window; determining the sub-pixel level positions of the tank edges in the image based on the ideal step edge model and utilizing the invariance of the gray-scale moments; obtaining discrete edge points through the sub-pixel level coordinates of the edge positions; using a curve fitting algorithm to fit the discrete sub-pixel edge points into a continuous edge curve; and determining the geometric parameters of the tank region based on the fitted edge curve.

[0018] Furthermore, based on a length threshold, the two longest edge lines are selected as the edges on both sides of the tank, and the start and end coordinates of the two lines are obtained, specifically including:

[0019] Gaussian filtering is used to smooth the input image, the Canny edge detection algorithm is used to obtain the image edges, and the subpixel edge localization algorithm is used to accurately locate the edge points to obtain the subpixel edge image.

[0020] On the subpixel edge image, Hough transform is used to detect line segments. In the parameter space of Hough transform, the cumulative value of each line segment is counted. The cumulative values ​​are sorted from high to low, and the line segments with the highest cumulative values ​​are selected as candidate line segments.

[0021] Calculate the length of each candidate line segment, set a length threshold, and retain the line segment if its length is greater than the threshold; otherwise, discard the line segment. After filtering by the length threshold, a preliminary set of line segments is obtained.

[0022] The set of line segments after the initial screening is sorted in descending order according to the length of the line segments, and the two line segments with the longer lengths are selected as the straight lines on the two sides of the tank edge.

[0023] Obtain the coordinates of the starting and ending points of the straight lines on both sides of the tank. Store the coordinates of the starting and ending points of the two straight line segments as four coordinate points respectively, and sort them in ascending order according to the x-coordinate of the four coordinate points to obtain the sorted coordinate point sequence;

[0024] The diameter of the tank can be calculated by the difference between the x-coordinates of the starting points or the ending points of the straight lines on both sides of the tank. When the two sides of the tank are parallel, the two calculated results are equal.

[0025] Furthermore, after obtaining the start and end coordinates of the two lines, the process also includes:

[0026] Image processing technology is used to obtain the edge lines and their endpoint positions in the tank image, and the distance from the endpoint of each line to the center point of the tank is calculated.

[0027] Edge detection algorithms are used to identify straight lines, and Hough transform is used to determine the equation of the line, obtaining the tilt angle and position of the line. When the calculated endpoint distance difference or the tilt angle of the line exceeds the preset offset threshold, it is determined that the tank position has shifted. Based on the offset, the tank image is adjusted using an image translation transformation algorithm so that the center point of the tank is corrected to the center of the image. The tank coordinate system is re-established using the transformed image data.

[0028] Furthermore, an affine transformation is performed on the tank region in the image to correct the tank's orientation, making it perpendicular to the camera's imaging plane. Specifically, this includes:

[0029] An industrial camera is used to acquire images of the tank, resulting in a first image. The tank region is extracted from the first image using an image segmentation algorithm, resulting in a second image. If the segmentation result is unsatisfactory, morphological operations are used to optimize the second image, resulting in a third image. A tank coordinate system is established on the third image, and its parameters are determined. Camera calibration techniques are used to determine the camera's attitude parameters relative to the world coordinate system, obtaining the camera attitude parameters. Based on the pre-established tank coordinate system and the obtained camera attitude parameters, an affine transformation matrix is ​​calculated to correct the tank's attitude to be perpendicular to the camera's imaging plane. If the tank coordinate system and the camera coordinate system do not match, a coordinate system transformation is performed. The calculated affine transformation matrix is ​​used to perform an affine transformation on the tank region in the third image, resulting in a fourth image. The angle between the tank axis and the camera imaging plane in the fourth image is calculated to determine if the attitude correction was successful. If the angle is less than a preset threshold, the attitude correction is successful; otherwise, the affine transformation matrix is ​​recalculated and the affine transformation is repeated until the preset conditions are met.

[0030] Furthermore, a moment-based subpixel edge detection method is used to accurately locate the tank's contour edge coordinates. Specifically, this includes: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information of the tank edges; based on the preliminary contour information, using the moment-based subpixel edge detection method to accurately locate the tank edges and obtain subpixel-level edge coordinate data; fitting an ellipse using the least squares method, calculating the tank diameter using the fitted ellipse parameters, and outputting a deformation warning when the fitting error exceeds a preset threshold; determining the tank height and width using the maximum horizontal and vertical distances of the image, and calculating the tank's roundness based on the diameter; obtaining the coordinates of the tank's inner and outer edges, calculating the tank wall thickness by the difference in distance between the inner and outer edges, and marking the tank parameters on the tank image; when the tank is severely deformed, using the Hough transform to detect straight line segments to determine if the tank has experienced local depressions or bulges; and analyzing the changes in the tank wall thickness to determine if the tank has defects.

[0031] Furthermore, it also includes: extracting the texture features of the tank surface using gray-level co-occurrence matrix and local binary mode algorithms from the corrected image that obtains the key dimensional parameters of the tank.

[0032] Furthermore, it also includes: performing principal component analysis to reduce the dimensionality of the extracted texture features, selecting the feature subset with the highest contribution rate, using a support vector machine classification model to determine whether the dimensionality-reduced texture features belong to surface defects, marking the location coordinates of the defect area, and combining a pre-established defect type knowledge base of typical defect samples to identify and classify different types of defects to obtain defect detection results.

[0033] This invention also provides an intelligent positioning system for can stamping, which implements an intelligent positioning method for can stamping, specifically including:

[0034] Image acquisition and preprocessing: The original images of the tank stamping parts are acquired using a high-resolution industrial camera and distortion correction is performed. An adaptive threshold segmentation algorithm is used to segment the images, separating the tank from the complex background, and then binarization is performed.

[0035] Edge detection and contour extraction: An edge detection algorithm is applied to the binarized image to extract the set of pixel coordinates of the tank edge contour. The Canny operator is used for preliminary edge detection, and then a moment-based subpixel edge detection method is used for precise localization.

[0036] Subpixel edge curve fitting utilizes subpixel-level edge coordinate data and employs a curve fitting algorithm to fit discrete subpixel edge points into continuous edge curves.

[0037] Tank posture correction involves performing an affine transformation on the tank image to correct the tank posture, making it perpendicular to the camera imaging plane. This is achieved by calculating the distance from the endpoints of the straight lines on the tank edge to the center point and the tilt angle, performing translation and rotation transformations to establish an accurate tank coordinate system.

[0038] Size measurement and defect detection: Measure the key size parameters of the tank and detect surface defects. Extract edge lines through Hough transform and calculate size parameters. At the same time, extract texture features using gray-level co-occurrence matrix and local binary mode algorithms. Determine whether surface defects exist through support vector machine classification model.

[0039] The quality assessment and report generation process integrates dimensional parameters and defect detection results to construct a three-dimensional dimensional model. It employs three-dimensional scanning and point cloud data processing technologies, combined with principal component analysis and support vector machine classification models, to comprehensively assess the tank quality and record a detailed quality report.

[0040] The real-time monitoring and early warning module performs real-time detection and evaluation of each tank stamping part during continuous production, records the quality evaluation results, and triggers an early warning when multiple tanks have quality problems.

[0041] The beneficial effects of this invention are as follows:

[0042] By employing an adaptive threshold segmentation algorithm and a moment-based subpixel edge detection method, the tank stamping parts are accurately segmented from complex backgrounds, and their edge contours are extracted. Then, by calculating the distance from the endpoint of the edge line to the center point of the tank and the tilt angle, the posture of the tank can be automatically corrected to ensure that it is perpendicular to the camera imaging plane. This not only improves the accuracy of tank contour positioning but also solves the problem that traditional image processing methods are difficult to accurately extract edge information when faced with tank surface reflections and complex backgrounds. At the same time, by establishing a tank coordinate system and performing posture correction, the accuracy of the measurement results is ensured, thereby overcoming the problem of tank offset or tilt that easily occurs during the production process, and realizing efficient and accurate quality inspection of tank stamping parts.

[0043] Texture features of the tank surface are extracted by using gray-level co-occurrence matrix and local binary pattern algorithms, and combined with support vector machine classification model to effectively identify defects on the tank surface, such as scratches, dents and cracks. Then, principal component analysis dimensionality reduction technology is used to select the most representative feature subset from a large number of texture features, which further improves the accuracy and efficiency of defect detection. At the same time, the system can comprehensively evaluate the quality of the tank and provide strong support for quality control.

[0044] During continuous production, each tank stamping part is inspected and evaluated in real time, and detailed quality assessment results are recorded. When multiple consecutive tanks are found to have dimensional deviations or surface defects exceeding the preset threshold, an early warning signal is triggered, indicating possible mold wear or equipment failure, thereby promptly notifying the equipment management system for diagnosis and maintenance. Attached Figure Description

[0045] To better understand and implement this application, the technical solution is described in detail below with reference to the accompanying drawings.

[0046] Figure 1 This is a flowchart illustrating an intelligent positioning method for can stamping provided in Embodiment 1 of this application.

[0047] Figure 2 A flowchart illustrating the segmentation of tank area image data using an intelligent positioning method for can stamping provided in Embodiment 1 of this application;

[0048] Figure 3 This is a schematic diagram of the structure of an intelligent positioning system for can stamping provided in Embodiment 2 of this application. Detailed Implementation

[0049] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description relating to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.

[0050] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0051] The following detailed description of the specific implementation methods, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided in detail.

[0052] Example 1

[0053] Please see Figures 1-2 This embodiment provides an intelligent positioning method for can stamping, including the following steps: S1, acquiring images of can stamping parts captured by a high-resolution camera, using an adaptive threshold segmentation algorithm to segment the can stamping parts from the background for reflective areas and complex backgrounds in the image, converting the image into a binary image, and extracting the pixel coordinate set of the can edge contour through an edge detection algorithm to obtain segmented can area image data.

[0054] Furthermore, an adaptive threshold segmentation algorithm may be used to segment the tank stamping parts from the background, convert the image into a binary image, and extract the pixel coordinate set of the tank edge contour using an edge detection algorithm to obtain the segmented tank region image data, specifically including:

[0055] S11. An adaptive threshold segmentation algorithm is adopted to adaptively determine the segmentation threshold based on the gray-scale distribution characteristics of the local region of the image, thereby segmenting the tank stamping parts from the background.

[0056] S12. Perform binarization on the segmented image to convert the grayscale image into a black and white binary image, highlighting the area of ​​the tank stamping parts.

[0057] S13. The binarized image is processed using an edge detection algorithm to extract the set of pixel coordinates of the edge contour of the tank stamping part;

[0058] S14. Based on the extracted set of edge contour pixel coordinates, determine the area range of the tank stamping part and obtain the segmented tank area image data.

[0059] S15. Perform morphological processing on the segmented tank area image data to eliminate noise and interference in the image, making the tank area more complete and accurate; output the processed tank area image data as input for subsequent defect detection and identification, laying the foundation for the automated quality inspection of tank stamping parts.

[0060] Specifically, a high-resolution camera, such as a 12-megapixel industrial camera, is used to acquire the original images of the tank stamping parts, achieving a resolution of 4000×3000. For reflective areas and complex backgrounds in the original images, an adaptive threshold segmentation algorithm, such as the Otsu algorithm, is employed. By calculating the inter-class variance of the image's grayscale histogram, a segmentation threshold of 6 is adaptively determined to separate the tank stamping parts from the background. The segmented image is then binarized using a fixed threshold method, setting pixels with grayscale values ​​greater than 128 to 255 and all other pixels to 0, converting the grayscale image into a black-and-white binary image to highlight the tank stamping parts. The Canny edge detection algorithm is then used to process the binarized image, extracting the edge contour pixel coordinates of the tank stamping parts through Gaussian filtering, gradient calculation, and non-maximum suppression. Based on the extracted edge contour pixel coordinates, a contour tracking algorithm, such as the Suzuki85 algorithm, is used to determine the region range of the tank stamping parts, resulting in the segmented tank region image data. Morphological processing was performed on the segmented tank region image data, employing opening and closing operations, and using 3×3 structuring elements for erosion and dilation operations to eliminate noise and interference in the image, making the tank region more complete and accurate. Finally, the processed tank region image data was output as input for subsequent defect detection and identification, laying the foundation for automated quality inspection of tank stamping parts.

[0061] S2. Based on the segmented tank area image data, calculate the gray-scale moments from zero to third order within the image window. By setting the tank edge to conform to the ideal step edge model, the sub-pixel level position of the edge is determined using the invariance of the gray-scale moments, and the sub-pixel edge points are fitted into a continuous edge curve.

[0062] Furthermore, after obtaining the segmented tank region image data, the process also includes: acquiring the segmented tank region image; calculating the zero- to third-order gray-scale moments for the pixels within the image window; determining the sub-pixel level positions of the tank edges in the image based on the ideal step edge model and utilizing the invariance of the gray-scale moments; obtaining discrete edge points through the sub-pixel level coordinates of the edge positions; using a curve fitting algorithm to fit the discrete sub-pixel edge points into a continuous edge curve; determining the contour of the tank region based on the fitted edge curve; when the fitted edge curve is discontinuous, supplementing the missing parts of the edge curve based on the coordinates of the edge points to obtain the complete tank contour; and obtaining the geometric parameters of the tank region, such as area and perimeter, through a contour analysis algorithm for subsequent tank defect detection.

[0063] Specifically, after acquiring the segmented tank region image, the gray-scale moments from zero to third order are calculated for each pixel within the image window using the gray-scale moment method. The zero-order moment represents the average gray-scale value of the pixels within the image window, the first-order moment represents the centroid of the gray-scale values, and the second and third-order moments represent the variance and slope of the gray-scale value distribution within the image window, respectively. Based on the ideal step edge model, and utilizing the invariance of gray-scale moments under translation, rotation, and scaling transformations, the sub-pixel-level position of the tank edge in the image is determined by calculating the gray-scale moment changes of the image window in the horizontal and vertical directions, achieving a positioning accuracy of up to 1 pixel. A series of discrete edge points are obtained using the sub-pixel-level coordinates of the edge positions. Least squares and other curve fitting algorithms are used to fit the discrete sub-pixel edge points into a continuous edge curve, with the fitting error controlled within 5 pixels. The outline of the tank region is determined based on the fitted edge curve. If the fitted edge curve is discontinuous, spline interpolation and other methods are used to supplement the missing parts of the edge curve based on the coordinates of the edge points, resulting in a complete tank outline. Finally, using contour analysis algorithms, such as Green's formula, the geometric parameters of the tank area, such as area and perimeter, are accurately calculated, providing a reliable reference for subsequent tank defect detection.

[0064] S3. On the fitted subpixel edge curve, extract the straight lines of the tank edge based on Hough transform, and select the two longest edge lines as the edges on both sides of the tank according to the length threshold, and obtain the start and end coordinates of the two lines.

[0065] Furthermore, based on a length threshold, the two longest edge lines are selected as the edges on both sides of the tank, and the start and end coordinates of the two lines are obtained, specifically including:

[0066] Gaussian filtering is used to smooth the input image and reduce noise interference. Then, the Canny edge detection algorithm is used to obtain the image edges, and a sub-pixel edge localization algorithm is used to accurately locate the edge points, resulting in a sub-pixel edge image.

[0067] On the subpixel edge image, Hough transform is used to detect line segments. In the parameter space of Hough transform, the cumulative value of each line segment is counted. The cumulative values ​​are sorted from high to low, and the line segments with the highest cumulative values ​​are selected as candidate line segments.

[0068] Calculate the length of each candidate line segment, set a length threshold, and retain the line segment if its length is greater than the threshold; otherwise, discard the line segment. After filtering by the length threshold, a preliminary set of line segments is obtained.

[0069] The set of line segments after the initial screening is sorted in descending order according to the length of the line segments, and the two line segments with the longer lengths are selected as the straight lines on the two sides of the tank edge.

[0070] Obtain the coordinates of the starting and ending points of the straight lines on both sides of the tank. Store the coordinates of the starting and ending points of the two straight line segments as four coordinate points respectively, and sort them in ascending order according to the x-coordinate of the four coordinate points to obtain the sorted coordinate point sequence;

[0071] The sorted sequence of coordinate points represents the starting coordinates of the left edge, the ending coordinates of the left edge, the starting coordinates of the right edge, and the ending coordinates of the right edge, respectively.

[0072] The diameter of the tank can be calculated by the difference between the x-coordinates of the starting points or the ending points of the straight lines on both sides of the tank. When the two sides of the tank are parallel, the two calculated results are equal.

[0073] Specifically, the input image is first smoothed using a Gaussian filter, with a 5x5 Gaussian kernel and a standard deviation of 5. Then, the Canny algorithm is used to detect edges, with a high-to-low threshold ratio of 2:1 (e.g., a high threshold of 150 and a low threshold of 75). Next, Zernike moments are used for sub-pixel edge localization, improving edge accuracy to 1 pixel. Hough transform is then used to detect lines on the sub-pixel edge map, with Hough space quantization to 5 degrees and 1 pixel. The top 10 candidate lines are selected based on the accumulated values, and their lengths are calculated. A length threshold of half the image height is set, retaining lines greater than this threshold. The retained lines are then sorted in descending order of length, and the first two are selected as the tank edges. The endpoint coordinates of the two lines are extracted and sorted in ascending order of their x-coordinates. Finally, the tank diameter is calculated using the sorted x-coordinates, ensuring the difference between the left and right diameters is less than 1 pixel.

[0074] S4. Calculate the distance from the endpoints of the two edge lines to the center point of the tank, while considering the tilt angle and parallelism of the edge lines. Set the offset threshold to 5% of the tank width. When the difference between the distance from the center to the two sides exceeds the threshold or the tilt angle of the edge lines exceeds the preset angle, correction is performed, and the corrected center point is used as the origin to establish the tank coordinate system.

[0075] Furthermore, after obtaining the start and end coordinates of the two lines, the process also includes:

[0076] Image processing technology is used to obtain the edge lines and their endpoint positions in the tank image, and the distance from the endpoint of each line to the center point of the tank is calculated.

[0077] Edge detection algorithms identify straight lines, and Hough transform is used to determine the equation of the line, thus obtaining the tilt angle and position of the line. When the calculated endpoint distance difference or the tilt angle of the line exceeds a preset offset threshold, it is determined that the tank's position has shifted. Based on the offset, an image translation transformation algorithm is used to adjust the tank image, correcting the tank's center point to the image center. The tank's coordinate system is re-established using the transformed image data to ensure the accuracy of subsequent processing. Through this series of processes, the position and orientation of the tank in the image are correctly corrected, providing accurate data support for subsequent image analysis and processing.

[0078] Specifically, by calculating the distance and tilt angle from the endpoint of the edge line to the center of the tank and comparing them with a preset threshold, the system can automatically detect and correct the tank's offset, aligning the center point of the tank image with the center of the image. This establishes a more accurate tank coordinate system, providing a reliable basis for subsequent dimensional measurements, defect detection, and quality assessment, thereby improving the accuracy and efficiency of can stamping component inspection.

[0079] S5. Based on the established tank coordinate system, perform an affine transformation on the tank region in the image to correct the tank's orientation so that it is perpendicular to the camera's imaging plane.

[0080] Furthermore, an affine transformation is performed on the tank region in the image to correct the tank's orientation, making it perpendicular to the camera's imaging plane. Specifically, this includes:

[0081] An industrial camera is used to acquire images of the tank, resulting in a first image. The tank region is extracted from the first image using an image segmentation algorithm, such as the Canny algorithm based on edge detection or the watershed algorithm based on region growing, resulting in a second image. If the segmentation result is not ideal, morphological operations (such as erosion and dilation) are used to optimize the second image, resulting in a third image. A tank coordinate system is established on the third image based on the tank CAD model or prior knowledge. The coordinate system has the center of the tank as the origin, the tank axis as the Z-axis, and the X and Y axes defined according to the tank structure to determine the coordinate system parameters. Camera calibration technology is used to determine the attitude parameters (rotation matrix and translation vector) of the camera imaging plane relative to the world coordinate system, thus obtaining the camera attitude parameters. Based on the pre-established tank coordinate system and the obtained camera attitude parameters, an affine transformation matrix is ​​calculated to correct the tank attitude to be perpendicular to the camera imaging plane. If the tank coordinate system and the camera coordinate system do not match, a coordinate system transformation is performed. The calculated affine transformation matrix is ​​used to perform an affine transformation on the tank region in the third image to obtain the fourth image. The angle between the tank axis and the camera imaging plane in the fourth image is calculated to determine if the attitude correction is successful. If the angle is less than a preset threshold, the attitude correction is successful; otherwise, the affine transformation matrix needs to be recalculated and the affine transformation repeated until the preset conditions are met.

[0082] Specifically, by establishing a tank coordinate system and applying affine transformation, this process effectively corrects the tank's posture, ensuring that the tank is perpendicular to the camera's imaging plane in the image. This improves the accuracy of the tank image and the reliability of subsequent analysis. In detail, the tank region is extracted from the original image acquired by the industrial camera, the segmentation results are optimized, a coordinate system with the tank center as the origin is established, the camera's posture parameters are determined, the affine transformation matrix is ​​calculated, coordinate system transformation is performed, and then the affine transformation is implemented. The success of the posture correction is verified by measuring the angle between the tank axis and the imaging plane, ensuring that the angle is less than a preset threshold to achieve accurate posture correction.

[0083] S6. On the corrected tank image, the coordinates of the tank contour edge are accurately located using a moment-based subpixel edge detection method to obtain key dimensional parameters such as the tank's height, width, diameter, wall thickness, and roundness.

[0084] Furthermore, a moment-based subpixel edge detection method is used to accurately locate the tank's contour edge coordinates. Specifically, this includes: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information of the tank edges; based on the preliminary contour information, using the moment-based subpixel edge detection method to accurately locate the tank edges and obtain subpixel-level edge coordinate data; fitting an ellipse using the least squares method, calculating the tank diameter using the fitted ellipse parameters, and issuing a deformation warning when the fitting error exceeds a preset threshold; determining the tank height and width using the maximum horizontal and vertical distances of the image, and calculating the tank's roundness based on the diameter; obtaining the coordinates of the tank's inner and outer edges, calculating the tank wall thickness by the distance difference between the inner and outer edges, and labeling parameters such as tank height, width, diameter, wall thickness, and roundness on the tank image; when the tank is severely deformed, using the Hough transform to detect straight line segments to determine if the tank has experienced local depressions or bulges; and analyzing the changes in the tank wall thickness to determine if the tank has defects such as corrosion or wear.

[0085] Specifically, by applying a moment-based subpixel edge detection method to the corrected tank image, this process can accurately locate the tank's contour edge coordinates, thereby obtaining key dimensional parameters of the tank, including height, width, diameter, wall thickness, and roundness. First, the Canny operator is used for edge detection, then subpixel technology is used to refine the edge coordinates. The diameter is calculated and deformation is detected by fitting an ellipse using the least squares method, while simultaneously determining the tank's height and width, calculating roundness, and measuring wall thickness. Furthermore, when tank deformation is detected, Hough transform is used to identify local depressions or protrusions, and wall thickness variation analysis is used to identify defects such as corrosion or wear, thus providing a comprehensive dimensional and morphological analysis for tank quality control.

[0086] S7. In the corrected image of the tank with key dimensional parameters, the texture features of the tank surface are extracted using the gray-level co-occurrence matrix and local binary mode algorithm.

[0087] Furthermore, the texture features of the tank surface are extracted using the gray-level co-occurrence matrix and local binary pattern algorithms, specifically including:

[0088] The process involves acquiring the original image of the tank, performing distortion correction on the original image to obtain a corrected image of the tank, identifying the region of interest (ROI) in the corrected image based on the tank's key dimensional parameters, and converting the image within the ROI region into a grayscale image. A gray-level co-occurrence matrix (GLCM) algorithm is used to calculate the GLCM of adjacent pixels in the grayscale image, obtaining statistical features reflecting the image texture. A local binary pattern (LBI) algorithm is used to compare each pixel of the grayscale image with its neighboring pixels, obtaining binary pattern features reflecting the local texture. The GLCM features and LBI features are fused to obtain a comprehensive texture feature vector. This texture feature vector is then input into a pre-trained support vector machine (SVM) classifier to determine if there are defects on the tank surface. When the classifier determines that a defect exists, the defect area is marked in the corrected image, and the defect type and location information are output, providing a basis for subsequent defect processing.

[0089] Specifically, by employing the Gray-Level Co-occurrence Matrix (GLCM) and Local Binary Pattern (LBP) algorithms, this process effectively extracts surface texture features from the corrected image of the tank. First, distortion correction is performed on the original image to obtain a clear corrected image. Then, the image is converted to a grayscale image within the region of interest determined by key size parameters. Next, the GLCM algorithm is used to calculate the grayscale relationships between adjacent pixels, and the LBP algorithm is used to compare the grayscale differences between each pixel and its neighborhood, thereby obtaining statistical features reflecting the image texture and binary pattern features reflecting the local texture. These features are fused into a comprehensive texture feature vector, which is then input into a pre-trained support vector machine (SVM) classifier to determine whether there are defects on the tank surface. If defects are found, the system marks the defect area in the corrected image and outputs the type and location information of the defects, providing a precise basis for subsequent defect processing and quality control.

[0090] S8. Perform principal component analysis to reduce the dimensionality of the extracted texture features, select the feature subset with the highest contribution rate, and use a support vector machine classification model to determine whether the dimensionality-reduced texture features belong to surface defects. Mark the location coordinates of the defect area, and combine the pre-established defect type knowledge base containing typical defect samples such as scratches, dents, and cracks to identify and classify different types of defects to obtain defect detection results.

[0091] Furthermore, by combining a pre-established defect type knowledge base containing typical defect samples such as scratches, dents, and cracks, different types of defects are identified and classified to obtain defect detection results. Specifically, this includes: acquiring the image to be detected, extracting image texture features, such as the gray-level co-occurrence matrix, to obtain texture feature vectors; using principal component analysis to reduce the dimensionality of the texture feature vectors, calculating eigenvalues ​​and eigenvectors, sorting them according to the size of the eigenvalues, and selecting feature vectors with a cumulative contribution rate reaching a preset threshold (e.g., 95%) to form a new feature subspace, thus obtaining the dimensionality-reduced texture features; and using a trained support vector machine classification model to classify the dimensionality-reduced texture features. If the classification result is a defect, proceed to the next step; if the classification result is a non-defect, the result is... The process involves several steps: First, a defect detection method is used. Based on the support vector machine (SVM) classification results, the location coordinates of the defect region are marked, and an image of the defect region is obtained. The texture features of the defect region image are then matched with a pre-established defect type knowledge base. This knowledge base contains typical defect samples such as scratches, dents, and cracks, along with their corresponding texture features. The similarity between the texture features of the defect region image and each sample in the knowledge base is calculated. If the similarity between the texture features of the defect region image and a sample of a certain type of defect is higher than a preset threshold, the defect is determined to belong to that type. If the similarity is lower than the preset threshold, the defect is determined to be of an unknown type. Finally, combining the location coordinates of the defect region and the determined defect type, the final defect detection result is generated, including information such as defect type, location, and confidence level.

[0092] Specifically, this method enables efficient identification and classification of defects on the tank surface. Through principal component analysis dimensionality reduction and support vector machine classification, the process effectively identifies and classifies defects on the tank surface, such as scratches, dents, and cracks. It also marks the location coordinates of the defects and provides accurate identification of the defect type, thereby improving the efficiency and accuracy of defect detection.

[0093] S9. Integrate tank size parameters and defect detection results to construct a three-dimensional size model. Compare the measured values ​​with the standard size model to calculate the size deviation, determine whether the dimensions of the tank stamping parts are qualified, and at the same time count the number and area of ​​surface defects. Comprehensively evaluate the qualification of the tank quality and generate a quality assessment report for a single tank.

[0094] Furthermore, a quality assessment report for each individual tank is generated, specifically including:

[0095] Acquire point cloud data of the tank and construct a 3D dimensional model of the tank. The point cloud data is acquired through a 3D scanner. If the point cloud data is incomplete, it is supplemented. The point cloud data is aligned to a unified coordinate system using a point cloud registration algorithm to reduce errors and obtain the first point cloud.

[0096] Based on the first point cloud data, a triangular meshing algorithm is used to reconstruct the three-dimensional size model of the tank body. The triangular meshing algorithm generates triangular patches by connecting adjacent points, thereby constructing the surface model of the tank body and obtaining the first three-dimensional model;

[0097] Obtain the standard three-dimensional size model of the tank body. The standard model data is stored in the database. According to the tank body model number, the corresponding standard three-dimensional size model is obtained from the database to get the second three-dimensional model;

[0098] The Iterative Closest Point (ICP) algorithm is used to register the first three-dimensional model and the second three-dimensional model. The ICP algorithm minimizes the distance between corresponding points of the two models to achieve precise registration of the models. According to the registration result, the size deviation of the tank body is calculated. The formula for calculating the size deviation of the tank body is as follows: Size deviation = |Measured value - Standard value| / Standard value × 100%. Among them, the measured value is extracted from the first three-dimensional model, and the standard value is extracted from the second three-dimensional model; Calculate the size deviation of each part separately to obtain a list of deviation values. If all deviation values are less than the preset threshold, the size is qualified; otherwise, the size is unqualified;

[0099] Based on the first point cloud data, a defect detection algorithm is used to identify the surface defects of the tank body, and the number and area of the defects are counted. The defect detection algorithm identifies the defect area according to the local characteristics of the point cloud data on the surface of the tank body; The formula for calculating the defect area is as follows: Defect area = Number of point clouds in the defect area × Average point cloud area. Among them, the average point cloud area is calculated according to the scanner parameters and the point cloud density to obtain the defect area value and the defect number value;

[0100] Based on the size deviation and surface defect conditions of the tank body, the quality compliance of the tank body is judged. If the size is qualified and the defect area is less than the preset threshold, the quality of the tank body is qualified; otherwise, the quality of the tank body is unqualified; According to the preset rules, based on the list of deviation values, the defect area value, and the defect number value, determine the final quality evaluation result to obtain the final result;

[0101] Generate a quality assessment report for a single tank body. The report content includes the three-dimensional size model of the tank body, size deviation data, the number and area of surface defects, and the final quality assessment result. Generate the report according to the final result, the list of deviation values, the defect area value, the defect number value, etc.; The final result, the list of deviation values, the defect area value, and the defect number value are used as the data sources of the report. The report includes charts and text descriptions to clearly and intuitively display the quality information of the tank body.

[0102] Specifically, by integrating tank dimensional parameters and defect detection results, this invention can construct an accurate three-dimensional dimensional model, compare the measured values ​​with a standard model, calculate dimensional deviations, and thus determine whether the dimensions of the tank stamping parts are up to standard. Simultaneously, the system can also count the number and area of ​​surface defects, comprehensively evaluate the tank's quality compliance, and generate a detailed report containing the three-dimensional dimensional model, dimensional deviation data, the number and area of ​​surface defects, and the final quality assessment results, providing a clear and intuitive display of quality information for each tank.

[0103] Furthermore, after step S9, the process also includes: in the continuous production process, real-time detection and evaluation of each tank stamping part is carried out, and the quality evaluation results of a single tank are recorded. When five consecutive tanks have dimensional deviations or surface defects exceeding the preset threshold, an early warning signal is triggered, indicating that there may be mold wear or equipment failure. The equipment management system is notified to perform diagnosis and maintenance. The detection results of each tank stamping part are associated with the production batch, mold number, and timestamp and stored to form a quality traceability file.

[0104] Specifically, Step 1: Obtain real-time inspection data for each tank stamping part, including measurements of dimensional deviations and surface defects; Step 2: Using a preset quality assessment model, assess the quality of each tank stamping part based on the obtained dimensional deviation and surface defect measurements, obtaining the quality assessment result for a single tank; Step 3: Link and store the quality assessment result, production batch, mold number, and timestamp of a single tank to form a quality traceability database; Step 4: Obtain the quality assessment results of the five most recently produced tank stamping parts to determine whether the dimensional deviation or surface defect exceeds a preset threshold; if the dimensional deviation or surface defect measurement exceeds the preset threshold, proceed to Step 5; if the dimensional deviation or surface defect measurement does not exceed the preset threshold... If a preset threshold is reached, return to step one; Step five: Trigger an early warning signal and send the warning information to the equipment management system; the warning information includes the production batch, mold number, timestamp, and measured values ​​of dimensional deviation and surface defects of the tank stamping part that triggered the warning; Step six: Based on the received warning information, the equipment management system performs fault diagnosis to determine potential mold wear or equipment failure; the diagnosis results include the specific fault type, fault severity, and recommended maintenance plan; Step seven: By analyzing historical data related to the diagnosis results in the quality traceability database, including the quality assessment results of tank stamping parts with the same mold number and the same production batch, further determine the cause of the failure, optimize the maintenance plan, and update the preset threshold.

[0105] Specifically, the entire process achieves closed-loop management from data collection and quality assessment to early warning, diagnosis and optimization, thereby improving the quality control level of the stamping process.

[0106] This embodiment acquires tank images using a high-resolution camera, extracts the tank contour using adaptive threshold segmentation and edge detection, and then achieves sub-pixel-level precise positioning based on gray-scale moments and Hough transform. By establishing a tank coordinate system and performing attitude correction, key dimensional parameters of the tank are accurately measured. Simultaneously, texture feature extraction and machine learning methods are used to detect surface defects. This invention integrates dimensional measurement and defect detection results to construct a 3D model to evaluate tank quality and monitors it in real time during continuous production, triggering an alert when consecutive anomalies occur. This method achieves high-precision automated inspection of tank stampings, improving production efficiency and product quality, and providing strong support for manufacturing process optimization and quality traceability.

[0107] Example 2

[0108] Please see Figure 3 This embodiment also provides an intelligent positioning system for can stamping, which implements an intelligent positioning method for can stamping, specifically including:

[0109] Image acquisition and preprocessing: The original images of the tank stamping parts are acquired using a high-resolution industrial camera and distortion correction is performed. An adaptive threshold segmentation algorithm is used to segment the images, separating the tank from the complex background, and then binarization is performed.

[0110] Edge detection and contour extraction: An edge detection algorithm is applied to the binarized image to extract the set of pixel coordinates of the tank edge contour. The Canny operator is used for preliminary edge detection, and then a moment-based subpixel edge detection method is used for precise localization.

[0111] Subpixel edge curve fitting utilizes subpixel-level edge coordinate data and employs curve fitting algorithms such as the least squares method to fit discrete subpixel edge points into continuous edge curves.

[0112] Tank posture correction involves performing an affine transformation on the tank image to correct the tank posture, making it perpendicular to the camera imaging plane. This is achieved by calculating the distance from the endpoints of the straight lines on the tank edge to the center point and the tilt angle, performing translation and rotation transformations to establish an accurate tank coordinate system.

[0113] Size measurement and defect detection: Measure the key size parameters of the tank and detect surface defects. Extract edge lines through Hough transform and calculate size parameters. At the same time, extract texture features using gray-level co-occurrence matrix and local binary mode algorithms. Determine whether surface defects exist through support vector machine classification model.

[0114] The quality assessment and report generation process integrates dimensional parameters and defect detection results to construct a three-dimensional dimensional model. It employs three-dimensional scanning and point cloud data processing technologies, combined with principal component analysis and support vector machine classification models, to comprehensively assess the tank quality and record a detailed quality report.

[0115] The real-time monitoring and early warning module performs real-time detection and evaluation of each tank stamping part during continuous production, records the quality evaluation results, and triggers an early warning when multiple tanks have quality problems.

[0116] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An intelligent positioning method for can stamping, characterized in that: Includes the following steps: The outline of the tank area is determined; when the fitted edge curve is discontinuous, the missing part of the edge curve is supplemented according to the coordinates of the edge points to obtain the complete outline of the tank; the outline analysis algorithm is used to obtain the image of the tank stamping part captured by the high-resolution camera, and the adaptive threshold segmentation algorithm is used to segment the tank stamping part from the background, convert the image into a binary image, and extract the pixel coordinate set of the tank edge outline through the edge detection algorithm to obtain the segmented tank area image data; The process involves acquiring a segmented image of the tank region, calculating the gray-scale moments from zero to third order for each pixel within the image window, determining the sub-pixel level positions of the tank edges in the image based on the ideal step edge model and the invariance of the gray-scale moments, obtaining discrete edge points using the sub-pixel level coordinates of the edge positions, fitting the discrete sub-pixel edge points into a continuous edge curve using a curve fitting algorithm, and determining the geometric parameters of the tank region based on the fitted edge curve. On the fitted subpixel edge curve, the straight lines of the tank edge are extracted based on the Hough transform. The two longest edge lines are selected as the edges on both sides of the tank according to the length threshold, and the start and end coordinates of the two lines are obtained. Image processing techniques are used to acquire the edge lines and their endpoint positions in the tank image, and the distance from the endpoint of each line to the center point of the tank is calculated. Edge detection algorithms are used to identify the edge lines, and Hough transform is used to determine the equation of the lines, obtaining the tilt angle and position of the lines. When the calculated endpoint distance difference or the tilt angle of the line exceeds a preset offset threshold, it is determined that the tank position has shifted. Based on the offset, the tank image is adjusted using an image translation transformation algorithm so that the center point of the tank is corrected to the center of the image. The tank coordinate system is re-established using the transformed image data. Based on the established tank coordinate system, an affine transformation is performed on the tank region in the image to correct the tank's orientation so that it is perpendicular to the camera's imaging plane. On the corrected tank image, the coordinates of the tank contour edges are accurately located using a moment-based subpixel edge detection method to obtain the tank's dimensional parameters.

2. The intelligent positioning method for can stamping according to claim 1, characterized in that: An adaptive threshold segmentation algorithm is used to segment the tank stamping parts from the background, convert the image into a binary image, and extract the pixel coordinate set of the tank edge contour through an edge detection algorithm to obtain the segmented tank area image data. Specifically, the adaptive threshold segmentation algorithm is used to adaptively determine the segmentation threshold based on the gray-scale distribution characteristics of the local area of ​​the image to segment the tank stamping parts from the background. The segmented image is binarized to convert the grayscale image into a black and white binary image, highlighting the area of ​​the tank stamping parts; An edge detection algorithm is used to process the binarized image to extract the set of pixel coordinates of the edge contour of the tank stamping part; Based on the extracted set of edge contour pixel coordinates, the area range of the tank stamping part is determined, and the segmented tank area image data is obtained. Morphological processing is performed on the segmented tank region image data, and the processed tank region image data is output.

3. The intelligent positioning method for can stamping according to claim 1, characterized in that: Based on the length threshold, the two longest edge lines are selected as the edges on both sides of the tank. The start and end coordinates of the two lines are obtained. Specifically, the input image is smoothed by Gaussian filtering, the image edges are obtained by Canny edge detection algorithm, and the edge points are accurately located by subpixel edge localization algorithm to obtain subpixel edge images. On the subpixel edge image, Hough transform is used to detect line segments. In the parameter space of Hough transform, the cumulative value of each line segment is counted. The cumulative values ​​are sorted from high to low, and several line segments with high cumulative values ​​are selected as candidate line segments. Calculate the length of each candidate line segment, set a length threshold, and retain the line segment if its length is greater than the threshold; otherwise, discard the line segment. After filtering by the length threshold, a preliminary set of line segments is obtained. The set of line segments after the initial screening is sorted in descending order according to the length of the line segments, and the two line segments with the longer lengths are selected as the straight lines on the two sides of the tank edge. Obtain the coordinates of the starting and ending points of the straight lines on both sides of the tank. Store the coordinates of the starting and ending points of the two straight line segments as four coordinate points. Sort the four coordinate points in ascending order according to their x-coordinates to obtain the sorted coordinate point sequence. The diameter of the tank can be calculated by the difference between the x-coordinates of the starting points or the ending points of the straight lines on both sides of the tank. When the two sides of the tank are parallel, the two calculated results are equal.

4. The intelligent positioning method for can stamping according to claim 1, characterized in that: Affine transformation is performed on the tank region in the image to correct the tank's posture, making it perpendicular to the camera's imaging plane. Specifically, this includes: acquiring a tank image using an industrial camera to obtain a first image; extracting the tank region from the first image using an image segmentation algorithm to obtain a second image; if the segmentation result is unsatisfactory, morphological operations are used to optimize the second image to obtain a third image; a tank coordinate system is established on the third image, and its parameters are determined; camera calibration techniques are used to determine the camera's imaging plane's posture parameters relative to the world coordinate system, obtaining the camera's posture parameters; and based on the pre-established... Using the tank coordinate system and the acquired camera attitude parameters, calculate the affine transformation matrix to correct the tank attitude to be perpendicular to the camera imaging plane. If the tank coordinate system and the camera coordinate system do not match, perform a coordinate system transformation. Apply the calculated affine transformation matrix to the tank region in the third image to obtain the fourth image. Determine whether the attitude correction is successful by calculating the angle between the tank axis and the camera imaging plane in the fourth image. If the angle is less than a preset threshold, the attitude correction is successful. Otherwise, recalculate the affine transformation matrix and repeat the affine transformation until the preset conditions are met.

5. The intelligent positioning method for can stamping according to claim 1, characterized in that: A moment-based subpixel edge detection method is used to accurately locate the edge coordinates of a tank's contour. Specifically, this involves: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information; based on this preliminary contour information, using the moment-based subpixel edge detection method to accurately locate the tank edge and obtain subpixel-level edge coordinate data; fitting an ellipse using the least squares method, calculating the tank diameter using the fitted ellipse parameters, and issuing a deformation warning if the fitting error exceeds a preset threshold; determining the tank height and width using the horizontal and vertical distances of the image, and calculating the tank's roundness based on the diameter; obtaining the coordinates of the tank's inner and outer edges, calculating the tank wall thickness by the distance difference between the inner and outer edges, and marking the tank parameters on the tank image; when the tank is severely deformed, using the Hough transform to detect straight line segments to determine if the tank has experienced local depressions or bulges; and analyzing the changes in the tank wall thickness to determine if the tank has defects.

6. The intelligent positioning method for can stamping according to claim 1, characterized in that: Also includes: In the corrected image that yields the key dimensional parameters of the tank, the texture features of the tank surface are extracted using the gray-level co-occurrence matrix and local binary mode algorithms.

7. The intelligent positioning method for can stamping according to claim 1, characterized in that: Also includes: Principal component analysis is used to reduce the dimensionality of the extracted texture features. A subset of features with high contribution rates is selected. A support vector machine classification model is used to determine whether the dimensionality-reduced texture features belong to surface defects. The location coordinates of the defect area are marked. Combined with a pre-established defect type knowledge base of typical defect samples, different types of defects are identified and classified to obtain defect detection results.

8. An intelligent positioning system for can stamping, applied to the intelligent positioning method for can stamping as described in any one of claims 1-7, characterized in that: include: Image acquisition and preprocessing: The original images of the tank stamping parts are acquired using a high-resolution industrial camera and distortion correction is performed. An adaptive threshold segmentation algorithm is used to segment the images, separating the tank from the complex background, and then binarization is performed. Edge detection and contour extraction: An edge detection algorithm is applied to the binarized image to extract the set of pixel coordinates of the tank edge contour. The Canny operator is used for preliminary edge detection, and then a moment-based subpixel edge detection method is used for precise localization. Subpixel edge curve fitting utilizes subpixel-level edge coordinate data and employs a curve fitting algorithm to fit discrete subpixel edge points into continuous edge curves. Tank posture correction involves performing an affine transformation on the tank image to correct the tank posture, making it perpendicular to the camera imaging plane. This is achieved by calculating the distance from the endpoints of the straight lines on the tank edge to the center point and the tilt angle, performing translation and rotation transformations to establish an accurate tank coordinate system. Size measurement and defect detection: Measure the key size parameters of the tank and detect surface defects. Extract edge lines through Hough transform and calculate size parameters. At the same time, extract texture features using gray-level co-occurrence matrix and local binary mode algorithms. Determine whether surface defects exist through support vector machine classification model. The quality assessment and report generation process integrates dimensional parameters and defect detection results to construct a three-dimensional dimensional model. It employs three-dimensional scanning and point cloud data processing technologies, combined with principal component analysis and support vector machine classification models, to comprehensively assess the tank quality and record a detailed quality report. The real-time monitoring and early warning module performs real-time detection and evaluation of each tank stamping part during continuous production, records the quality evaluation results, and triggers an early warning when multiple tanks have quality problems.

Citation Information

Patent Citations

  • Stamping part circular hole positioning and deformation detection method based on sub-pixel edge extraction

    CN116542910A

  • Part surface quality detection method and system based on machine vision

    CN118608504A