Intelligent positioning method and system for can making stamping

Through intelligent positioning method, adaptive threshold segmentation and sub-pixel edge detection are used to accurately extract edge information under the reflection and complex background of the tank surface, solving the problem of edge extraction difficulties of traditional methods, and achieving efficient and accurate quality detection of the tank body and Defect identification.

CN119295548AActive Publication Date: 2025-01-10DADI CAN MFG IND

Patent Information

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

AI Technical Summary

Technical Problem

Traditional image processing methods are difficult to accurately extract edge information under the reflection of the tank surface and complex background, resulting in inaccurate measurement results and the tank body is prone to shift or tilt during the production process.

Method used

Using intelligent positioning methods, including adaptive threshold segmentation algorithm and moment-based subpixel edge detection, ensure the accuracy of edge information by establishing the tank coordinate system and attitude correction, and extracting texture features using Hough transform and grayscale symbiosis matrix. Perform defect detection.

Benefits of technology

It improves the accuracy of the contour positioning of the tank body, solves the problem of edge extraction difficulties in traditional methods in complex backgrounds, ensures the accuracy of measurement results, and achieves efficient and accurate quality detection and defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295548A_ABST
    Figure CN119295548A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent positioning method and system for can making stamping, and relates to the technical field of image processing. Comprising the following steps: acquiring a tank stamping part image, and segmenting the tank stamping part from a background by adopting a self-adaptive threshold segmentation algorithm to obtain segmented tank region image data; utilizing a moment-based sub-pixel edge detection method to accurately position the edge coordinates of the contour of the tank body, and obtaining the key dimension parameters of the tank body; extracting texture features of the surface of the tank body by adopting a gray-level co-occurrence matrix and a local binary pattern algorithm, and judging whether the texture features belong to surface defects or not through a support vector machine classification model; the method solves the problem that edge information is difficult to accurately extract when a traditional image processing method faces tank surface reflection and a complex background, ensures the accuracy of a measurement result by establishing a tank coordinate system and performing attitude correction, overcomes the problem that the tank is easy to deviate or incline in the production process, and improves the production efficiency. And high-efficiency and accurate quality detection of the tank stamping part is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to an intelligent positioning method and system for can making and stamping. Background Art

[0002] During the production process of can stamping parts, accurate dimensional measurement and defect detection of the can are required to ensure product quality. However, due to factors such as the reflective surface of the can and complex background, traditional image processing methods are difficult to accurately extract the edge information of the can. At the same time, the can is prone to offset or tilt during the production process, resulting in inaccurate measurement results. Summary of the invention

[0003] The purpose of the present invention is to provide an intelligent positioning method and system for canning and stamping, which solves the problem that traditional image processing methods are difficult to accurately extract edge information when facing the reflection on the surface of the can and the complex background. 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 displacement or tilt that is easy to occur in the production process of the can, and realizing efficient and accurate quality inspection of tank stamping parts.

[0004] The present application provides an intelligent positioning method for canning and stamping, comprising the following steps: Determine the contour of the tank area; when the fitted edge curve is discontinuous, supplement the missing part of the edge curve according to the coordinates of the edge points to obtain the complete tank contour; obtain the tank stamping part image captured by the high-resolution camera through the contour analysis algorithm, use the adaptive threshold segmentation algorithm to segment the tank stamping part from the background, convert the image into a binary image, extract the pixel coordinate set of the tank edge contour through the edge detection algorithm, and obtain the segmented tank area image data; According to the segmented tank area image data, the zero-order to third-order grayscale moments in the image window are calculated, and the sub-pixel position of the edge is determined by using the invariance of the grayscale moment by setting the tank edge to conform to the ideal step edge model, and the sub-pixel edge point is fitted into a continuous edge curve; On the fitted sub-pixel edge curve, the edge straight lines of the tank are extracted based on the Hough transform, and the two longest edge straight lines are selected as the edges of the two sides of the tank according to the length threshold, and the starting and ending coordinates of the two straight lines are obtained; Calculate the distance from the endpoints of the two edge lines to the center point of the tank body, set the offset threshold to 5% of the tank body width, and when the difference between the center and the two sides exceeds the threshold or the inclination angle of the edge line exceeds the preset angle, perform a correction and establish the tank body coordinate system with the corrected center point as the origin; According to the established tank coordinate system, an affine transformation is performed on the tank area in the image to correct the tank posture so that it is perpendicular to the camera imaging plane; On the corrected tank image, the moment-based sub-pixel edge detection method is used to accurately locate the edge coordinates of the tank contour and obtain the size parameters of the tank.

[0005] Furthermore, an adaptive threshold segmentation algorithm is used to segment the tank stamping from the background, the image is converted into a binary image, and the pixel coordinate set of the tank edge contour is extracted by an edge detection algorithm to obtain the segmented tank area image data, which specifically includes: Adopting the adaptive threshold segmentation algorithm, the segmentation threshold is adaptively determined according to the gray distribution characteristics of the local area of ​​the image to segment the tank stamping parts from the background. Binarization is performed on the segmented image to convert the grayscale image into a black-and-white binary image, highlighting the area of ​​the can body stamping parts; The edge detection algorithm is used to process the binary image and extract the pixel coordinate set of the edge contour of the can body stamping part; According to the extracted edge contour pixel coordinate set, the area range of the can body stamping part is determined to obtain the segmented can body area image data; The segmented tank area image data is subjected to morphological processing, and the processed tank area image data is output.

[0006] Furthermore, after obtaining the segmented tank area image data, it also includes: obtaining the segmented tank area image, calculating the zero-order to third-order grayscale moments for the pixels in the image window; according to the ideal step edge model, using the invariance of the grayscale moment, determining the sub-pixel position of the tank edge in the image; obtaining discrete edge points through the sub-pixel coordinates of the edge position; using a curve fitting algorithm to fit the discrete sub-pixel edge points into a continuous edge curve; and according to the fitted edge curve, the geometric parameters of the tank area.

[0007] Furthermore, two long edge lines are selected as the edges of the two sides of the tank body according to the length threshold, and the starting and ending coordinates of the two lines are obtained, specifically including: The input image is smoothed using Gaussian filtering, the image edge is obtained using the Canny edge detection algorithm, and the edge point is accurately located using the sub-pixel edge positioning algorithm to obtain a sub-pixel edge image. On the sub-pixel edge image, Hough transform is used to detect straight line segments. In the Hough transform parameter space, the accumulated value of each straight line segment is counted, and the accumulated values ​​are sorted from high to low. Several straight line segments with the highest accumulated values ​​are selected as candidate straight line segments. Calculate the length of each candidate straight line segment and set a length threshold. When the length of the straight line segment is greater than the threshold, the straight line segment is retained; otherwise, the straight line segment is discarded. After screening by the length threshold, a set of straight line segments after preliminary screening is obtained. The preliminarily screened straight line segment set is sorted in descending order according to the length of the straight line segment, and the two straight line segments with the longest length are selected as the edge straight lines on both sides of the tank body; Get 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, sort them in ascending order according to the size of the horizontal coordinates of the four coordinate points, and obtain the sorted coordinate point sequence; The diameter of the tank is calculated by the difference in the horizontal coordinates of the starting points or the ending points of the straight lines on both sides of the tank edge. When the two sides of the tank edge are parallel, the two calculation results are equal.

[0008] Furthermore, after obtaining the starting and ending coordinates of the two straight lines, it also includes: By using image processing technology, the edge straight lines and their endpoint positions in the tank image are obtained, and the distance from the endpoint of each straight line to the center point of the tank is calculated; The edge straight line is identified through the edge detection algorithm, and the straight line equation is determined using the Hough transform to obtain the inclination angle and position of the straight line; when the calculated endpoint distance difference or the straight line inclination angle exceeds the preset offset threshold, it is determined that the tank position has shifted, and the tank image is adjusted according to the offset through the 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 reestablished through the transformed image data.

[0009] Furthermore, an affine transformation is performed on the tank area in the image to correct the tank posture so that it is perpendicular to the camera imaging plane, specifically including: An industrial camera is used to obtain a tank image to obtain a first image; the tank area is extracted from the first image by an image segmentation algorithm to obtain a second image; when the segmentation result is not ideal, the second image is optimized by morphological operations to obtain a third image; a tank coordinate system is established on the third image to determine the coordinate system parameters; a camera calibration technology is used to determine the posture parameters of the camera imaging plane relative to the world coordinate system to obtain the camera posture parameters; according to the pre-established tank coordinate system and the obtained camera posture parameters, an affine transformation matrix is ​​calculated to correct the tank posture to be perpendicular to the camera imaging plane; when the tank coordinate system and the camera coordinate system do not match, a coordinate system conversion is performed; the calculated affine transformation matrix is ​​used to perform an affine transformation on the tank area in the third image to obtain a fourth image; by calculating the angle between the tank axis and the camera imaging plane in the fourth image, it is determined whether the posture correction is successful. When the angle is less than a preset threshold, the posture correction is successful; otherwise, the affine transformation matrix is ​​recalculated and the affine transformation is repeatedly performed until the preset conditions are met.

[0010] Furthermore, a moment-based sub-pixel edge detection method is used to accurately locate the edge coordinates of the tank contour, specifically including: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information of the tank edge; based on the preliminary contour information, using a moment-based sub-pixel edge detection method to accurately locate the tank edge to obtain edge coordinate data at the sub-pixel level; fitting an ellipse by the least squares method, and calculating the tank diameter by fitting the obtained ellipse parameters, and when the fitting error exceeds a preset threshold, it is determined that the tank is severely deformed and a deformation warning is output; the maximum distance in the horizontal and vertical directions of the image is used to determine the height and width of the tank, and the roundness of the tank is calculated based on the diameter; the inner and outer edge coordinates of the tank are obtained, and the wall thickness of the tank is obtained by calculating the difference in the distance between the inner and outer edges, and the tank parameters are marked on the tank image; when the tank is severely deformed, the Hough transform is used to detect the straight line segment to determine whether the tank is locally concave or convex; by analyzing the change in the tank wall thickness, it is determined whether the tank has defects.

[0011] Furthermore, the method also includes: in the correction image for obtaining the key size parameters of the tank body, using a gray level co-occurrence matrix and a local binary pattern algorithm to extract the texture features of the surface of the tank body.

[0012] Furthermore, it also includes: performing principal component analysis on the extracted texture features to reduce their dimensionality, selecting the feature subset with the highest contribution rate, judging whether the texture features after dimensionality reduction belong to surface defects through a support vector machine classification model, marking the position coordinates of the defect area, and identifying and classifying different types of defects in combination with a pre-established defect type knowledge base of typical defect samples to obtain defect detection results.

[0013] The present invention also provides an intelligent positioning system for canning and stamping, which is used to implement an intelligent positioning method for canning and stamping, specifically comprising: Image acquisition and preprocessing: use a high-resolution industrial camera to obtain the original image of the tank stamping, perform distortion correction, use an adaptive threshold segmentation algorithm to segment the image, separate the tank from the complex background, and perform binarization processing; Edge detection and contour extraction: Apply edge detection algorithm to the binary image, extract the pixel coordinate set of the tank edge contour, use Canny operator to perform preliminary edge detection, and then use moment-based sub-pixel edge detection method to accurately locate; Sub-pixel edge curve fitting uses sub-pixel edge coordinate data and a curve fitting algorithm to fit discrete sub-pixel edge points into a continuous edge curve; Tank posture correction: perform affine transformation on the tank image to correct the tank posture so that it is perpendicular to the camera imaging plane. By calculating the distance and inclination angle from the end point of the tank edge straight line to the center point, perform translation and rotation transformation to establish an accurate tank coordinate system. Dimension measurement and defect detection: measure the key dimensional parameters of the tank body and detect surface defects. Use Hough transform to extract edge lines and calculate dimensional parameters. Use gray-level co-occurrence matrix and local binary pattern algorithm to extract texture features. Use support vector machine classification model to determine whether there are surface defects. Quality assessment and report generation: integrate dimensional parameters and defect detection results, build a 3D dimensional model, use 3D scanning and point cloud data processing technology, combine principal component analysis and support vector machine classification model, comprehensively evaluate the tank quality, and record a detailed quality report; The real-time monitoring and early warning module performs real-time inspection and evaluation on each tank stamping part during the continuous production process, records the quality evaluation results, and triggers an early warning when quality problems occur in multiple tanks in succession.

[0014] The beneficial effects of the present invention are: By adopting the adaptive threshold segmentation algorithm and the moment-based sub-pixel edge detection method, the can body stamping parts are accurately segmented from the complex background and their edge contours are extracted. Then, by calculating the distance from the end point of the edge straight line to the center point of the can body and the tilt angle, the posture of the can body can be automatically corrected to ensure that it is perpendicular to the camera imaging plane. This not only improves the accuracy of the can body contour positioning, but also solves the problem that the traditional image processing method is difficult to accurately extract edge information when facing the reflection of the can body surface and the complex background. At the same time, by establishing the can body coordinate system and performing posture correction, the accuracy of the measurement results is ensured, thereby overcoming the problem of displacement or tilt that is easy to occur in the production process of the can body, and realizing efficient and accurate quality inspection of the can body stamping parts. The texture features of the can surface are extracted through the gray-level co-occurrence matrix and local binary pattern algorithm, and combined with the support vector machine classification model, the defects on the can surface, such as scratches, dents and cracks, are effectively identified. Then, the most representative feature subset is selected from a large number of texture features through the principal component analysis dimensionality reduction technology, which further improves the accuracy and efficiency of defect detection. At the same time, the system can comprehensively evaluate the quality of the can, providing strong support for quality control. During the continuous production process, each tank stamping part is inspected and evaluated in real time, and detailed quality assessment results are recorded. When it is detected that multiple consecutive tanks have dimensional deviations or surface defects exceeding the preset threshold, an early warning signal will be triggered to indicate possible mold wear or equipment failure, thereby notifying the equipment management system in time for diagnosis and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.

[0016] Figure 1A schematic flow chart of an intelligent positioning method for canning and stamping provided in Example 1 of the present application; Figure 2 A schematic diagram of a flow chart of can body area image data segmented by an intelligent positioning method for can making and stamping provided in Example 1 of the present application; Figure 3 A schematic diagram of the structure of an intelligent positioning system for canning and stamping provided in Example 2 of the present application. DETAILED DESCRIPTION

[0017] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.

[0018] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0019] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0020] Example 1 See also Figure 1-Figure 2 The present embodiment provides an intelligent positioning method for canning and stamping, comprising the following steps: S1, obtaining an image of a can body stamping part captured by a high-resolution camera, and using an adaptive threshold segmentation algorithm to segment the can body stamping part from the background for the reflective area and complex background in the image, converting the image into a binary image, and extracting a set of pixel coordinates of the can body edge contour through an edge detection algorithm to obtain segmented can body area image data.

[0021] Furthermore, an adaptive threshold segmentation algorithm is used to segment the tank stamping from the background, the image is converted into a binary image, and a pixel coordinate set of the tank edge contour is extracted by an edge detection algorithm to obtain segmented tank area image data, specifically including: S11, using an adaptive threshold segmentation algorithm, adaptively determining the segmentation threshold according to the grayscale distribution characteristics of the local area of ​​the image, and segmenting the tank body stamping part from the background; S12, performing binarization processing on the segmented image, converting the grayscale image into a black and white binary image, and highlighting the area of ​​the can body stamping part; S13, using an edge detection algorithm to process the binary image and extract a set of pixel coordinates of the edge contour of the can body stamping part; S14, determining the region range of the can body stamping part according to the extracted edge contour pixel coordinate set, and obtaining the segmented can body region image data; 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 realizing automated quality inspection of tank stamping parts.

[0022] Specifically, a high-resolution camera such as a 12-megapixel industrial camera is used to collect the original image of the tank stamping parts, and the image resolution can reach 4000×3000. For the reflective area and complex background in the original image, an adaptive threshold segmentation algorithm such as the Otsu algorithm is used. By calculating the inter-class variance of the image grayscale histogram, the segmentation threshold is adaptively determined to be 6, and the tank stamping parts are separated from the background. The segmented image is binarized, and the fixed threshold method is used to set the pixels with grayscale values ​​greater than 128 to 255, and the remaining pixels are set to 0. The grayscale image is converted into a black and white binary image to highlight the area of ​​the tank stamping parts; the Canny edge detection algorithm is then used to process the binary image, and the edge contour pixel coordinate set of the tank stamping parts is extracted through Gaussian filtering, gradient calculation, non-maximum suppression and other steps. According to the extracted edge contour pixel coordinates, the contour tracking algorithm such as the Suzuki85 algorithm is used to determine the area range of the tank stamping parts, and the segmented tank area image data is obtained. The segmented tank area image data is morphologically processed, using open and close operations, and 3×3 structural elements for corrosion and expansion operations to eliminate noise and interference in the image, making the tank area more complete and accurate. Finally, the processed tank area image data is output as input for subsequent defect detection and identification, laying the foundation for the realization of automated quality inspection of tank stamping parts.

[0023] S2. According to the segmented tank area image data, the zero-order to third-order grayscale moments in the image window are calculated, and the sub-pixel position of the edge is determined by setting the tank edge to conform to the ideal step edge model using the invariance of the grayscale moment, and the sub-pixel edge points are fitted into a continuous edge curve.

[0024] Furthermore, after obtaining the segmented tank area image data, it also includes: obtaining the segmented tank area image, calculating the zero-order to third-order grayscale moments for the pixels in the image window; according to the ideal step edge model, using the invariance of the grayscale moment, determining the sub-pixel position of the tank edge in the image; obtaining discrete edge points through the sub-pixel coordinates of the edge position; using a curve fitting algorithm to fit the discrete sub-pixel edge points into a continuous edge curve; judging the contour of the tank area according to the fitted edge curve; when the fitted edge curve is discontinuous, supplementing the missing part of the edge curve according to the coordinates of the edge point to obtain a complete tank contour; obtaining the geometric parameters of the tank area, such as area, perimeter, etc., through the contour analysis algorithm, for subsequent tank defect detection.

[0025] Specifically, after obtaining the segmented tank area image, the grayscale moment method is used to calculate the zero-order to third-order grayscale moments for the pixels in the image window, where the zero-order moment represents the average value of the pixel grayscale value in the image window, the first-order moment represents the center of gravity of the pixel grayscale value in the image window, and the second-order and third-order moments represent the variance and slope of the pixel grayscale value distribution in the image window, respectively. According to the ideal step edge model, the invariance of the grayscale moment under translation, rotation and scale transformation is used to calculate the grayscale moment change in the horizontal and vertical directions of the image window to determine the sub-pixel position of the tank edge in the image, and the positioning accuracy can reach 1 pixel. A series of discrete edge points are obtained through the sub-pixel coordinates of the edge position. The least squares method and other curve fitting algorithms are used to fit the discrete sub-pixel edge points into a continuous edge curve, and the fitting error is controlled within 5 pixels. According to the fitted edge curve, the contour of the tank area is judged. If the fitted edge curve is discontinuous, the missing part of the edge curve is supplemented according to the coordinates of the edge points by using methods such as spline interpolation to obtain the complete tank contour. Finally, through 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.

[0026] S3. On the fitted sub-pixel edge curve, extract the edge straight lines of the tank body based on Hough transform, select the two longest edge straight lines as the edges of both sides of the tank body according to the length threshold, and obtain the starting and ending coordinates of the two straight lines.

[0027] Furthermore, two long edge lines are selected as the edges of the two sides of the tank body according to the length threshold, and the starting and ending coordinates of the two lines are obtained, specifically including: Gaussian filtering is used to smooth the input image to reduce noise interference. The Canny edge detection algorithm is then used to obtain the image edge, and the sub-pixel edge positioning algorithm is used to accurately locate the edge point to obtain a sub-pixel edge image. On the sub-pixel edge image, Hough transform is used to detect straight line segments. In the Hough transform parameter space, the accumulated value of each straight line segment is counted, and the accumulated values ​​are sorted from high to low. Several straight line segments with the highest accumulated values ​​are selected as candidate straight line segments. Calculate the length of each candidate straight line segment and set a length threshold. When the length of the straight line segment is greater than the threshold, the straight line segment is retained; otherwise, the straight line segment is discarded. After screening by the length threshold, a set of straight line segments after preliminary screening is obtained. The preliminarily screened straight line segment set is sorted in descending order according to the length of the straight line segment, and the two straight line segments with the longest length are selected as the edge straight lines on both sides of the tank body; Get 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, sort them in ascending order according to the size of the horizontal coordinates of the four coordinate points, and obtain the sorted coordinate point sequence; The sorted coordinate point sequence respectively represents the starting coordinate of the left edge of the tank body, the ending coordinate of the left edge, the starting coordinate of the right edge, and the ending coordinate of the right edge; The diameter of the tank can be calculated by the difference in the horizontal coordinates of the starting points or the ending points of the straight lines on both sides of the tank. When the edges on both sides of the tank are parallel, the two calculation results are equal.

[0028] Specifically, firstly, the input image is smoothed by Gaussian filtering. A 5x5 Gaussian kernel can be selected with a standard deviation of 5. Then the Canny algorithm is used to detect the edge, and the ratio of high and low thresholds is 2:1, such as a high threshold of 150 and a low threshold of 75. Then the Zernike moment is used to locate the sub-pixel edge, and the edge accuracy is improved to 1 pixel. The Hough transform is used to detect the straight line on the sub-pixel edge map, and the Hough space is quantized to 5 degrees and 1 pixel. The first 10 candidate straight lines are selected according to the accumulated value, and their lengths are calculated. The length threshold is set to 1 / 2 of the image height, and the straight lines greater than this threshold are retained. The retained straight lines are arranged in descending order by length, and the first two are taken as the edges of the tank. The endpoint coordinates of the two straight lines are extracted and arranged in ascending order by the horizontal coordinate. Finally, the diameter of the tank is calculated using the sorted horizontal coordinate, and the difference between the left and right diameters should be less than 1 pixel.

[0029] S4. Calculate the distance from the endpoints of the two edge lines to the center point of the tank, taking into account the inclination angle and parallelism of the edge lines. Set the offset threshold to 5% of the tank width. When the difference between the center and the two sides exceeds the threshold or the inclination angle of the edge line exceeds the preset angle, make a correction and establish the tank coordinate system with the corrected center point as the origin.

[0030] Furthermore, after obtaining the starting and ending coordinates of the two straight lines, it also includes: By using image processing technology, the edge straight lines and their endpoint positions in the tank image are obtained, and the distance from the endpoint of each straight line to the center point of the tank is calculated; The edge detection algorithm is used to identify the edge straight line, and the Hough transform is used to determine the straight line equation, thereby obtaining the inclination angle and position of the straight line; when the calculated endpoint distance difference or the straight line inclination angle exceeds the preset offset threshold, the tank position is judged to be offset, and the tank image is adjusted according to the offset through the 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 reestablished through the transformed image data to ensure the accuracy of subsequent processing. Through this series of processing, the position and direction of the tank in the image are correctly corrected, providing accurate data support for subsequent image analysis and processing.

[0031] Specifically, by calculating the distance and inclination angle from the end point of the edge line to the center of the can body and comparing it with the preset threshold, the system can automatically detect and correct the offset of the can body so that the center point of the can body image is aligned with the center of the image. In this way, the established can body coordinate system will be more accurate, providing a reliable basis for subsequent dimensional measurement, defect detection and quality assessment, thereby improving the accuracy and efficiency of canning stamping parts inspection.

[0032] S5. According to the established tank coordinate system, an affine transformation is performed on the tank area in the image to correct the tank posture so that it is perpendicular to the camera imaging plane.

[0033] Furthermore, an affine transformation is performed on the tank area in the image to correct the tank posture so that it is perpendicular to the camera imaging plane, specifically including: An industrial camera is used to acquire an image of the tank to obtain a first image; an image segmentation algorithm, such as a Canny algorithm based on edge detection or a watershed algorithm based on region growing, is used to extract the tank region from the first image to obtain a second image; when the segmentation result is not ideal, morphological operations (such as corrosion and expansion) are used to optimize the second image to obtain 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 takes the center of the tank as the origin, the tank axis as the Z axis, and defines the X axis and Y axis according to the tank structure to determine the coordinate system parameters; the 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, and obtain the camera attitude parameters; according to the pre-established tank coordinate system and the obtained camera attitude parameters, the affine transformation matrix that corrects the tank attitude to be perpendicular to the camera imaging plane is calculated; when the tank coordinate system and the camera coordinate system do not match, the coordinate system conversion is performed; the calculated affine transformation matrix is ​​used to perform an affine transformation on the tank area in the third image to obtain a fourth image; by calculating the angle between the tank axis and the camera imaging plane in the fourth image, it is determined whether the attitude correction is successful. When 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 is repeatedly implemented until the preset conditions are met.

[0034] Specifically, by establishing a tank coordinate system and applying affine transformation, the process effectively corrects the posture of the tank and ensures that the tank is perpendicular to the camera imaging plane in the image, thereby improving the accuracy of the tank image and the reliability of subsequent analysis. Specifically, the tank area is extracted from the original image acquired by the industrial camera, the segmentation result is optimized, a coordinate system with the center of the tank as the origin is established, the camera's posture parameters are determined, the affine transformation matrix is ​​calculated, the coordinate system is converted, 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 to ensure that the angle is less than the preset threshold to achieve accurate posture correction.

[0035] S6. On the corrected tank image, the moment-based sub-pixel edge detection method is used to accurately locate the edge coordinates of the tank contour, and obtain key dimensional parameters such as the height, width, diameter, wall thickness and roundness of the tank.

[0036] Furthermore, a moment-based sub-pixel edge detection method is used to accurately locate the edge coordinates of the tank contour, specifically including: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information of the tank edge; based on the preliminary contour information, using a moment-based sub-pixel edge detection method to accurately locate the tank edge to obtain edge coordinate data at the sub-pixel level; fitting an ellipse by the least squares method, and calculating the tank diameter by fitting the obtained ellipse parameters, and when the fitting error exceeds a preset threshold, it is determined that the tank is severely deformed and a deformation warning is output; the maximum distance in the horizontal and vertical directions of the image is used to determine the height and width of the tank, and the roundness of the tank is calculated based on the diameter; the inner and outer edge coordinates of the tank are obtained, and the wall thickness of the tank is obtained by calculating the difference in the distance between the inner and outer edges, and the parameters such as the tank height, width, diameter, wall thickness and roundness are marked on the tank image; when the tank is severely deformed, Hough transform is used to detect straight line segments to determine whether the tank is locally concave or convex; by analyzing the change in the tank wall thickness, it is determined whether the tank has defects such as corrosion or wear.

[0037] Specifically, by applying a moment-based sub-pixel edge detection method on the corrected tank image, the process can accurately locate the edge coordinates of the tank contour, thereby obtaining the key dimensional parameters of the tank, including height, width, diameter, wall thickness and roundness; first, the Canny operator is used for edge detection, and then the edge coordinates are refined using sub-pixel technology, and the diameter is calculated and deformation is detected by fitting an ellipse using the least squares method, while the height and width of the tank are determined, the roundness is calculated, and the wall thickness is measured. In addition, when the deformation of the tank is detected, the Hough transform is used to identify local depressions or protrusions, and defects such as corrosion or wear are identified through wall thickness variation analysis, thus providing a comprehensive set of dimensional and morphological analysis for the quality control of the tank.

[0038] S7. In the correction image for obtaining the key size parameters of the tank body, the texture features of the tank body surface are extracted using the gray level co-occurrence matrix and the local binary pattern algorithm.

[0039] Furthermore, the gray-level co-occurrence matrix and local binary pattern algorithm are used to extract the texture features of the tank surface, including: The original image of the tank body is obtained, and the distortion of the original image is corrected to obtain the corrected image of the tank body; the region of interest is determined in the corrected image according to the key size parameters of the tank body, and the image in the region of interest is converted into a grayscale image; the grayscale co-occurrence matrix algorithm is used to calculate the grayscale co-occurrence matrix of adjacent pixels in the grayscale image to obtain statistical features reflecting the image texture; the local binary pattern algorithm is used to compare each pixel of the grayscale image with its neighboring pixels to obtain binary pattern features reflecting the local texture; the grayscale co-occurrence matrix features and the local binary pattern features are fused to obtain a comprehensive texture feature vector; the texture feature vector is input into a pre-trained support vector machine classifier to determine whether there are defects on the surface of the tank body; when the classifier determines that there are defects, the defective area is marked in the corrected image, and the defect type and location information are output to provide a basis for subsequent defect processing.

[0040] Specifically, by using the gray-level co-occurrence matrix and local binary pattern algorithm, the process effectively extracts surface texture features from the corrected image of the tank. First, the original image is distortion corrected to obtain a clear corrected image, and then the image is converted into a grayscale image within the region of interest determined by the key size parameters. Next, the gray-level co-occurrence matrix algorithm is used to calculate the grayscale relationship between adjacent pixels, and the local binary pattern algorithm is used to compare the grayscale difference between each pixel and its neighborhood, thereby obtaining statistical features reflecting the image texture and binary pattern features of the local texture. These features are fused into a comprehensive texture feature vector, which is then input into a pre-trained support vector machine classifier to determine whether there are defects on the surface of the tank. If there are defects, the system will mark the defective area in the corrected image and output the type and location information of the defect, providing an accurate basis for subsequent defect processing and quality control.

[0041] S8. Perform principal component analysis on the extracted texture features to reduce their dimensionality, select the feature subset with the highest contribution rate, and use the support vector machine classification model to determine whether the texture features after dimensionality reduction 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, cracks, etc. to identify and classify different types of defects to obtain defect detection results.

[0042] Furthermore, a pre-established defect type knowledge base containing typical defect samples such as scratches, dents, cracks, etc. is combined to identify and classify different types of defects to obtain defect detection results, which specifically includes: obtaining the image to be detected, extracting image texture features, such as grayscale co-occurrence matrix, and obtaining texture feature vectors; using principal component analysis to reduce the dimension of the texture feature vectors, calculating eigenvalues ​​and eigenvectors, sorting them according to the size of the eigenvalues, and selecting eigenvectors whose cumulative contribution rate reaches a preset threshold (for example, 95%) to form a new feature subspace to obtain the texture features after dimensionality reduction; using the trained support vector machine classification model to classify the texture features after dimensionality reduction, if the classification result is a defect, proceed to the next step; if the classification result is not a defect, conclude. beam detection; according to the classification result of the support vector machine, the position coordinates of the defect area are marked, and the image of the defect area is obtained; the image texture features of the defect area are matched with the pre-established defect type knowledge base, which contains typical defect samples such as scratches, dents, cracks and their corresponding texture features, and the similarity between the image texture features of the defect area and each sample in the knowledge base is calculated; if the similarity between the image texture features of the defect area and a certain type of defect sample is higher than a preset threshold, it is judged that the defect belongs to this type and the defect type is determined; if the similarity is lower than the preset threshold, it is judged as an unknown type defect; combined with the position coordinates of the defect area and the determined defect type, the final defect detection result is generated, including information such as defect type, position and confidence.

[0043] Specifically, efficient identification and classification of can surface defects is achieved. Through principal component analysis dimensionality reduction and support vector machine classification, the process effectively identifies and classifies can surface defects such as scratches, dents and cracks, while marking the location coordinates of the defects and providing accurate identification of the defect type, thereby improving the efficiency and accuracy of defect detection.

[0044] S9. Integrate the tank size parameters and defect detection results, build a three-dimensional size model, compare the measured value with the standard size model, calculate the size deviation, determine whether the size of the tank stamping parts is qualified, and count the number and area of ​​surface defects to comprehensively evaluate the quality of the tank and generate a quality assessment report for a single tank.

[0045] Furthermore, a quality assessment report for a single tank is generated, including: Obtain the point cloud data of the tank and build a three-dimensional model of the tank; the point cloud data is obtained through a three-dimensional scanner. If the point cloud data is incomplete, the data is completed; through the point cloud registration algorithm, the point cloud data is aligned to a unified coordinate system to reduce errors and obtain the first point cloud; Reconstructing the three-dimensional size model of the tank body by using a triangular meshing algorithm according to the first point cloud data. The triangular meshing algorithm generates triangular facets by connecting adjacent points, thereby constructing a surface model of the tank body and obtaining a first three-dimensional model. Obtain a standard tank 3D size model, the standard model data is stored in a database, and the corresponding standard 3D size model is obtained from the database according to the tank model to obtain a second 3D model; The iterative closest point algorithm (ICP) is used to align the first 3D model and the second 3D model. The ICP algorithm achieves accurate model alignment by minimizing the distance between the corresponding points of the two models. According to the alignment results, the tank size deviation is calculated. The formula for calculating the tank size deviation is as follows: size deviation = |measured value - standard value| / standard value × 100%. Among them, the measured value is extracted from the first 3D model, and the standard value is extracted from the second 3D model. The size deviation of each part is calculated 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. According to the first point cloud data, the defect detection algorithm is used to identify the surface defects of the tank body, and the number and area of ​​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 defect area calculation formula is as follows: defect area = number of point clouds in the defect area × average area of ​​point clouds. Among them, the average area of ​​point clouds is calculated according to the scanner parameters and point cloud density, and the defect area value and defect number value are obtained; The quality of the tank is judged based on the size deviation and surface defects of the tank. If the size is qualified and the defect area is smaller than the preset threshold, the tank quality is qualified, otherwise the tank quality is unqualified. According to the preset rules, the final quality assessment result is determined based on the deviation value list, defect area value and defect quantity value to obtain the final result; Generate a single tank quality assessment report, which includes the tank 3D model, dimensional deviation data, surface defect quantity and area, and the final quality assessment results. Generate a report based on the final results and deviation value list, defect area value, defect quantity value, etc. The final results, deviation value list, defect area value, and defect quantity value are used as the data source of the report. The report contains charts and text descriptions to clearly and intuitively display the tank quality information.

[0046] Specifically, by integrating the tank size parameters and defect detection results, the present invention can construct an accurate three-dimensional size model, compare the measured value with the standard model, calculate the size deviation, and thus determine whether the size of the tank stamping parts is qualified. At the same time, the system can also count the number and area of ​​surface defects, comprehensively evaluate the quality of the tank, and generate a detailed report containing the three-dimensional size model, size deviation data, number and area of ​​surface defects, and the final quality assessment results, providing a clear and intuitive quality information display for each tank.

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

[0048] Specifically, step one: obtain real-time inspection data of each tank stamping part, including the measurement values ​​of dimensional deviation and surface defects; step two: use the preset quality assessment model to conduct quality assessment on each tank stamping part according to the obtained dimensional deviation and surface defect measurement values, and obtain the quality assessment result of a single tank; step three: associate and store the quality assessment result, production batch, mold number, and timestamp of a single tank to form a quality traceability database; step four: obtain the quality assessment results of the last five consecutively produced tank stamping parts to determine whether the dimensional deviation or surface defect exceeds the preset threshold; if the dimensional deviation or surface defect measurement value exceeds the preset threshold, proceed to step five; if the dimensional deviation or surface defect measurement value does not exceed If the preset threshold is exceeded, return to step one; step five: trigger the warning signal and send the warning information to the equipment management system; the warning information includes the production batch, mold number, timestamp, and measurement values ​​of dimensional deviation and surface defects of the tank body stamping parts 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 result includes the specific fault type, fault degree and recommended maintenance plan; step seven: by analyzing the historical data related to the diagnosis result in the quality traceability database, including the quality assessment results of tank body stamping parts with the same mold number and the same production batch, further determine the cause of the fault, optimize the maintenance plan, and update the preset threshold.

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

[0050] This embodiment uses a high-resolution camera to capture the image of the tank body, uses adaptive threshold segmentation and edge detection to extract the contour of the tank body, and then achieves sub-pixel precision positioning based on grayscale moment and Hough transform. By establishing a tank body coordinate system and performing posture correction, the key dimensional parameters of the tank body are accurately measured. At the same time, texture feature extraction and machine learning methods are used to detect surface defects. The present invention integrates the results of dimensional measurement and defect detection, constructs a three-dimensional model to evaluate the quality of the tank body, and monitors in real time during continuous production, triggering an early warning when anomalies occur continuously. This method realizes high-precision automated detection of tank body stampings, improves production efficiency and product quality, and provides strong support for manufacturing process optimization and quality traceability.

[0051] Example 2 See also Figure 3 This embodiment also provides an intelligent positioning system for canning and stamping, which is used to implement an intelligent positioning method for canning and stamping, specifically including: Image acquisition and preprocessing: use a high-resolution industrial camera to obtain the original image of the tank stamping, perform distortion correction, use an adaptive threshold segmentation algorithm to segment the image, separate the tank from the complex background, and perform binarization processing; Edge detection and contour extraction: Apply edge detection algorithm to the binary image, extract the pixel coordinate set of the tank edge contour, use Canny operator to perform preliminary edge detection, and then use moment-based sub-pixel edge detection method to accurately locate; Sub-pixel edge curve fitting uses sub-pixel edge coordinate data and adopts least squares method and other curve fitting algorithms to fit discrete sub-pixel edge points into continuous edge curves; Tank posture correction: perform affine transformation on the tank image to correct the tank posture so that it is perpendicular to the camera imaging plane. By calculating the distance and inclination angle from the end point of the tank edge straight line to the center point, perform translation and rotation transformation to establish an accurate tank coordinate system. Dimension measurement and defect detection: measure the key dimensional parameters of the tank body and detect surface defects. Use Hough transform to extract edge lines and calculate dimensional parameters. Use gray-level co-occurrence matrix and local binary pattern algorithm to extract texture features. Use support vector machine classification model to determine whether there are surface defects. Quality assessment and report generation: integrate dimensional parameters and defect detection results, build a 3D dimensional model, use 3D scanning and point cloud data processing technology, combine principal component analysis and support vector machine classification model, comprehensively evaluate the tank quality, and record a detailed quality report; The real-time monitoring and early warning module performs real-time inspection and evaluation on each tank stamping part during the continuous production process, records the quality evaluation results, and triggers an early warning when quality problems occur in multiple tanks in succession.

[0052] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. An intelligent positioning method for canning and stamping, characterized in that: The steps include: Determine the contour of the tank area; when the fitted edge curve is discontinuous, supplement the missing part of the edge curve according to the coordinates of the edge points to obtain the complete tank contour; obtain the tank stamping part image captured by the high-resolution camera through the contour analysis algorithm, use the adaptive threshold segmentation algorithm to segment the tank stamping part from the background, convert the image into a binary image, extract the pixel coordinate set of the tank edge contour through the edge detection algorithm, and obtain the segmented tank area image data; According to the segmented tank area image data, the zero-order to third-order grayscale moments in the image window are calculated, and the sub-pixel position of the edge is determined by using the invariance of the grayscale moment by setting the tank edge to conform to the ideal step edge model, and the sub-pixel edge point is fitted into a continuous edge curve; On the fitted sub-pixel edge curve, the edge straight lines of the tank are extracted based on the Hough transform, and the two longest edge straight lines are selected as the edges of the two sides of the tank according to the length threshold, and the starting and ending coordinates of the two straight lines are obtained; Calculate the distance from the endpoints of the two edge lines to the center point of the tank body, set the offset threshold to 5% of the tank body width, and when the difference between the center and the two sides exceeds the threshold or the inclination angle of the edge line exceeds the preset angle, perform a correction and establish the tank body coordinate system with the corrected center point as the origin; According to the established tank coordinate system, an affine transformation is performed on the tank area in the image to correct the tank posture so that it is perpendicular to the camera imaging plane; On the corrected tank image, the moment-based sub-pixel edge detection method is used to accurately locate the edge coordinates of the tank contour and obtain the size parameters of the tank.

2. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: Adaptive threshold segmentation algorithm is used to segment the tank stamping parts from the background, and the image is converted into a binary image. The pixel coordinate set of the tank edge contour is extracted through the edge detection algorithm to obtain the segmented tank area image data, which includes: Adopting the adaptive threshold segmentation algorithm, the segmentation threshold is adaptively determined according to the gray distribution characteristics of the local area of ​​the image to segment the tank stamping parts from the background. Binarization is performed on the segmented image to convert the grayscale image into a black-and-white binary image, highlighting the area of ​​the can body stamping parts; The edge detection algorithm is used to process the binary image and extract the pixel coordinate set of the edge contour of the can body stamping part; According to the extracted edge contour pixel coordinate set, the area range of the can body stamping part is determined to obtain the segmented can body area image data; The segmented tank area image data is subjected to morphological processing, and the processed tank area image data is output.

3. The intelligent positioning method for canning and stamping according to claim 2, characterized in that: After obtaining the segmented tank area image data, the method also includes: obtaining the segmented tank area image, calculating the zero-order to third-order grayscale moments for the pixels in the image window; determining the sub-pixel position of the tank edge in the image based on the ideal step edge model and the invariance of the grayscale moment; obtaining discrete edge points through the sub-pixel coordinates of the edge position; using a curve fitting algorithm to fit the discrete sub-pixel edge points into a continuous edge curve; and obtaining the geometric parameters of the tank area based on the fitted edge curve.

4. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: According to the length threshold, two long edge lines are selected as the edges on both sides of the tank body, and the starting and ending coordinates of the two lines are obtained, including: The input image is smoothed using Gaussian filtering, the image edge is obtained using the Canny edge detection algorithm, and the edge point is accurately located using the sub-pixel edge positioning algorithm to obtain a sub-pixel edge image. On the sub-pixel edge image, Hough transform is used to detect straight line segments. In the Hough transform parameter space, the accumulated value of each straight line segment is counted, and the accumulated values ​​are sorted from high to low, and several straight line segments with high accumulated values ​​are selected as candidate straight line segments; Calculate the length of each candidate straight line segment and set a length threshold. When the length of the straight line segment is greater than the threshold, the straight line segment is retained; otherwise, the straight line segment is discarded. After screening by the length threshold, a set of straight line segments after preliminary screening is obtained. The preliminarily screened straight line segment set is sorted in descending order according to the length of the straight line segment, and the two straight line segments with the longest length are selected as the edge straight lines on both sides of the tank body; Obtain the coordinates of the starting point and the ending point of the straight lines on both sides of the tank body, store the coordinates of the starting point and the ending point of the two straight line segments as four coordinate points respectively, sort the four coordinate points in ascending order according to the size of the horizontal coordinates, and obtain a sorted coordinate point sequence; The diameter of the tank is calculated by the difference in the horizontal coordinates of the starting points or the ending points of the straight lines on both sides of the tank edge. When the two sides of the tank edge are parallel, the two calculation results are equal.

5. The intelligent positioning method for canning and stamping according to claim 4, characterized in that: After getting the starting and ending coordinates of the two lines, it also includes: Through image processing technology, the edge straight lines and their endpoint positions in the tank image are obtained, and the distance from the endpoint of each straight line to the center point of the tank is calculated; the edge straight lines are identified through the edge detection algorithm, and the straight line equation is determined using Hough transform to obtain the inclination angle and position of the straight line; when the calculated endpoint distance difference or the straight line inclination angle exceeds the preset offset threshold, it is determined that the tank position has shifted, and the tank image is adjusted according to the offset through the image translation transformation algorithm so that the position of the tank center point is corrected to the center of the image; the tank coordinate system is reestablished through the transformed image data.

6. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: The tank area in the image is subjected to affine transformation, and the tank posture is corrected to make it perpendicular to the camera imaging plane, which specifically includes: using an industrial camera to obtain the tank image to obtain a first image; extracting the tank area from the first image through an image segmentation algorithm to obtain a second image; when the segmentation result is not ideal, the second image is optimized by morphological operation to obtain a third image; wherein a tank coordinate system is established on the third image, and the coordinate system parameters are determined; using camera calibration technology to determine the posture parameters of the camera imaging plane relative to the world coordinate system, and obtaining the camera posture parameters; according to the pre-established The tank coordinate system and the obtained camera posture parameters are used to calculate the affine transformation matrix for correcting the tank posture to be perpendicular to the camera imaging plane; when the tank coordinate system and the camera coordinate system do not match, the coordinate system conversion is performed; the calculated affine transformation matrix is ​​used to perform affine transformation on the tank area in the third image to obtain a fourth image; by calculating the angle between the tank axis and the camera imaging plane in the fourth image, it is determined whether the posture correction is successful, and when the angle is less than a preset threshold, the posture correction is successful; otherwise, the affine transformation matrix is ​​recalculated and the affine transformation is repeatedly performed until the preset conditions are met.

7. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: The edge coordinates of the tank contour are precisely located using a moment-based sub-pixel edge detection method, specifically including: using the Canny operator to perform edge detection on the corrected tank image to obtain preliminary contour information of the tank edge; based on the preliminary contour information, using a moment-based sub-pixel edge detection method to precisely locate the tank edge to obtain edge coordinate data at the sub-pixel level; fitting an ellipse using the least squares method, and calculating the tank diameter using the fitted ellipse parameters; when the fitting error exceeds a preset threshold, it is determined that the tank is severely deformed and a deformation warning is output; the height and width of the tank are determined using the horizontal and vertical distances of the image, and the roundness of the tank is calculated based on the diameter; the inner and outer edge coordinates of the tank are obtained, the tank wall thickness is obtained by calculating the distance difference between the inner and outer edges, and the tank parameters are marked on the tank image; when the tank is severely deformed, Hough transform is used to detect straight line segments to determine whether the tank is locally concave or convex; and by analyzing the change in the tank wall thickness, it is determined whether the tank has defects.

8. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: Also includes: In the rectified image to obtain the key dimensional parameters of the tank, the gray level co-occurrence matrix and local binary pattern algorithm are used to extract the texture features of the tank surface.

9. The intelligent positioning method for canning and stamping according to claim 1, characterized in that: Also includes: The extracted texture features are subjected to principal component analysis and dimensionality reduction, and feature subsets with high contribution rates are selected. The support vector machine classification model is used to determine whether the texture features after dimensionality reduction belong to surface defects, and the position coordinates of the defect area are marked. Different types of defects are identified and classified in combination with the defect type knowledge base of pre-established typical defect samples to obtain defect detection results.

10. An intelligent positioning system for canning and stamping, applied to an intelligent positioning method for canning and stamping as claimed in any one of claims 1 to 9, characterized in that: include: Image acquisition and preprocessing: use a high-resolution industrial camera to obtain the original image of the tank stamping, perform distortion correction, use an adaptive threshold segmentation algorithm to segment the image, separate the tank from the complex background, and perform binarization processing; Edge detection and contour extraction: Apply edge detection algorithm to the binary image, extract the pixel coordinate set of the tank edge contour, use Canny operator to perform preliminary edge detection, and then use moment-based sub-pixel edge detection method to accurately locate; Sub-pixel edge curve fitting uses sub-pixel edge coordinate data and a curve fitting algorithm to fit discrete sub-pixel edge points into a continuous edge curve; Tank posture correction: perform affine transformation on the tank image to correct the tank posture so that it is perpendicular to the camera imaging plane. By calculating the distance and inclination angle from the end point of the tank edge straight line to the center point, perform translation and rotation transformation to establish an accurate tank coordinate system. Dimension measurement and defect detection: measure the key dimensional parameters of the tank body and detect surface defects. Use Hough transform to extract edge lines and calculate dimensional parameters. Use gray-level co-occurrence matrix and local binary pattern algorithm to extract texture features. Use support vector machine classification model to determine whether there are surface defects. Quality assessment and report generation: integrate dimensional parameters and defect detection results, build a 3D dimensional model, use 3D scanning and point cloud data processing technology, combine principal component analysis and support vector machine classification model, comprehensively evaluate the tank quality, and record a detailed quality report; The real-time monitoring and early warning module performs real-time inspection and evaluation on each tank stamping part during the continuous production process, records the quality evaluation results, and triggers an early warning when quality problems occur in multiple tanks in succession.

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

Cited By

  • Relay surface detection system based on machine vision technology

    CN119827508A

  • A relay surface detection system based on machine vision technology

    CN119827508B

  • Ice bag size image recognition method and device and computer

    CN120375341A

  • An ice bag size image recognition method, device and computer

    CN120375341B

  • Deep learning-based can making defect detection method, system and equipment

    CN120471892A