Aluminum alloy pipe compression molding defect classification method

By shifting and matching the centroid and central moment feature sequences of the outer contour of the aluminum alloy shell, the problem of detecting surface defects of the aluminum alloy shell was solved, accurate and automatic classification of shape defects was achieved, and detection efficiency and accuracy were improved.

CN120807532AActive Publication Date: 2025-10-17SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511319122.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-10-17
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

During the extrusion molding process of aluminum alloy tubes, shape defects such as pits or protrusions may appear on the surface of the aluminum alloy shell, affecting the appearance quality and structural strength. Existing technologies make it difficult to effectively classify and detect these defects.

Method used

By acquiring the front surface image of the aluminum alloy shell, determining the center of mass and central moment of the outer contour, constructing a feature sequence, and performing shift matching with the feature sequence of a standard aluminum alloy shell, the DTW distance and weighted sum method are used to determine the contour defect value, thereby realizing automatic detection and classification of shape defects.

Benefits of technology

It achieves accurate and automated detection and classification of shape defects in aluminum alloy shells, avoids the influence of camera shooting angle and equipment vibration, and improves the accuracy and efficiency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807532A_ABST
    Figure CN120807532A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an aluminum alloy pipe compression molding defect classification method. The method comprises the steps of obtaining a front surface image of a to-be-detected aluminum alloy shell obtained by performing extrusion treatment on an aluminum alloy pipe, and obtaining a first outer contour of the front surface image; determining a mass center of an outer contour pixel point of the first outer contour, and respectively determining central moments of different outer contour segments of the first outer contour relative to the mass center of the first outer contour; constructing a first feature sequence according to the central moments of different outer contour segments of the first outer contour, and obtaining a second feature sequence of the standard aluminum alloy shell; performing shift matching on the first feature sequence and the second feature sequence, and determining a contour defect value according to a DTW distance of a shift matching result; and classifying shape defects according to the contour defect values. By means of the technical scheme, classification of shape defects of the aluminum alloy shell made of the aluminum alloy pipe can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and particularly relates to an aluminum alloy pipe compression molding defect classification method. BACKGROUND

[0002] GIS (Gas Insulated Switch gear) is a kind of power equipment in which multiple high-voltage electrical equipment is integrated in a closed metal shell and insulation gas is used as insulation medium; a three-way valve or a four-way valve can regulate the flow direction, flow rate and pressure distribution of insulation gas in GIS.

[0003] The shell of the three-way valve or the four-way valve is an external protective structure of the valve, which needs to withstand the high pressure of the internal insulation gas, ensure the mechanical strength and sealing property of the valve in the GIS closed environment, and prevent the leakage of the insulation gas.

[0004] The shell of the three-way valve or the four-way valve can be obtained by extruding the aluminum alloy pipe; for example, the end of the aluminum alloy pipe is subjected to pressure by using a press, and the displacement and deformation direction of the aluminum alloy pipe during the pressure process are limited by using a die; the aluminum alloy pipe can generate plastic deformation under the pressure of the press and the limitation of the die, so as to obtain the required shape of the three-way valve or the four-way valve; through further processing of the obtained aluminum alloy shell after extrusion, the three-way valve or the four-way valve of GIS can be manufactured.

[0005] In the process of extruding the aluminum alloy pipe to obtain the shell, the surface of the obtained aluminum alloy shell can have shape defects such as pits or protrusions; the defects existing on the surface of the aluminum alloy shell can affect the appearance quality, structural strength of the aluminum alloy shell and the air tightness of the subsequently manufactured three-way valve or four-way valve, therefore, it is necessary to classify the possible defects of the aluminum alloy pipe after being subjected to pressure. SUMMARY

[0006] To classify the defects possibly existing in the aluminum alloy shell obtained after the aluminum alloy pipe is pressed, the application provides an aluminum alloy pipe pressure forming defect classification method, which comprises the following steps: obtaining a front surface image of a to-be-detected aluminum alloy shell obtained after an aluminum alloy pipe is extruded, and obtaining a first outer contour of the to-be-detected aluminum alloy shell according to the front surface image; determining the center of mass of the outer contour pixel points of the first outer contour, and determining the central moments of different outer contour segments of the first outer contour relative to the center of mass of the first outer contour respectively; taking the central moments of the different outer contour segments of the first outer contour as elements to construct a first feature sequence, and obtaining a second feature sequence constructed in advance for a standard aluminum alloy shell; the second feature sequence is determined according to a second outer contour of the standard aluminum alloy shell; performing shift matching on the first feature sequence and the second feature sequence, and determining a contour defect value according to the DTW distance of the shift matching result; and determining whether there is a shape defect on the two sides of the front surface of the to-be-detected aluminum alloy shell by using the contour defect value, and classifying the shape defect in the case of the shape defect.

[0007] In this way, the automatic detection and classification of the shape defect possibly existing in the aluminum alloy pipe after being pressed can be realized more accurately.

[0008] Optionally, the central moments of the different outer contour segments of the first outer contour are determined by the following method: taking the center of mass of the first outer contour as the coordinate origin to construct a polar coordinate system, and dividing the first outer contour into a plurality of outer contour segments according to the corresponding angles in the polar coordinate system; for a target outer contour segment in the plurality of outer contour segments of the first outer contour, determining the average distance of the pixel points of the target outer contour segment to the center of mass in the polar coordinate system and the average angle; and determining the normalized central moment of the target outer contour segment according to the difference between the distance of the pixel points of the target outer contour segment to the center of mass and the average distance, the difference between the angle of the pixel points to the center of mass and the average angle, and the gradient value of the pixel points in the front surface image.

[0009] Optionally, the shift matching on the first feature sequence and the second feature sequence comprises the following steps: performing a shift operation on the first feature sequence, and determining the similarity between the sequence obtained after the shift operation and the second feature sequence; the shift operation comprises shifting the element at the end position of the sequence to the start position of the sequence; performing the shift operation again on the sequence obtained after the shift operation, and performing again the step of determining the similarity between the sequence obtained after the shift operation and the second feature sequence; in the case where the number of shift operations reaches the number of elements in the first feature sequence, taking the sequence corresponding to the minimum similarity in all shift operations as the target feature sequence after shift matching.

[0010] In this way, by performing multiple shift operations on the first feature sequence, the sequence most matched with the second feature sequence can be obtained, and the influence of the shooting direction of the camera or the vibration suffered by the device on the detection result can be avoided.

[0011] Optionally, the profile defect value is determined according to the DTW distance of the shift matching result, and the method comprises: taking the DTW distance of the shift matching result as the profile defect value.

[0012] In this way, the profile defect value corresponding to the front side of the aluminum alloy shell to be detected can be determined simply and effectively, so as to determine whether there is a defect on the two sides of the front side of the aluminum alloy shell to be detected.

[0013] Optionally, the shift matching result comprises a matched first matching sequence and a second matching sequence; and the profile defect value is determined by: determining a weight value between a matched element pair in the first matching sequence and the second matching sequence according to the difference between the local shape features of the outer contour segments corresponding to the element pair; and performing weighted summation on the distance between the matched element pair by using the weight value between the matched element pair to obtain the profile defect value.

[0014] In this way, the weight value of the matched element pair can be adaptively determined, the distance between the matched element pair is weighted and summed to obtain the profile defect value, the contribution degree of the profile defect value can be determined according to the actual situation of the element pair, and a more accurate profile defect value can be obtained.

[0015] Optionally, the weight value between the matched element pair in the first matching sequence and the second matching sequence is determined by: wherein, is the weight value between the i th element pair in the first matching sequence and the second matching sequence, exp is an exponential function with a natural constant as a base number, is an average angle value of the outer contour segment corresponding to the element from the first matching sequence in the i th element pair, is an average angle value of the outer contour segment corresponding to the element from the second matching sequence in the i th element pair, is a standard deviation of the difference between the matched element pairs in the corresponding average angle values, is a preset positive number.

[0016] Optionally, in the case that it is determined that the two sides of the front face of the aluminum alloy shell to be detected do not have shape defects, the method further comprises: determining, for a target pixel point in the front face surface gray image, an LBP value of the target pixel point according to gray values of pixel points in a neighborhood range of the target pixel point; determining an information entropy of the LBP values of the pixel points in the neighborhood range of the target pixel point, the information entropy being used to represent a complexity of the LBP values of the pixel points in the neighborhood range; and in the case that the information entropy of the target pixel point is greater than a preset information entropy threshold, determining that the aluminum alloy shell to be detected has a crack defect at the target pixel point.

[0017] In this way, in the case that it is determined that the two sides of the front face of the aluminum alloy shell to be detected do not have shape defects, the detection of the crack defect possibly existing in the front face of the aluminum alloy shell to be detected can be further implemented.

[0018] Optionally, in the case that it is determined that the two sides of the front face of the aluminum alloy shell to be detected do not have shape defects, the method further comprises: acquiring a side surface image of the aluminum alloy shell to be detected, and determining a contour defect degree value of the side surface image, so as to determine whether the two sides of the side face of the aluminum alloy shell to be detected have shape defects.

[0019] Optionally, the shift matching result comprises a first matching sequence and a second matching sequence; and in the case that it is determined that the two sides of the front face of the aluminum alloy shell to be detected have shape defects, the method further comprises: according to distances between matched elements in the first matching sequence and the second matching sequence, taking, as an outer contour segment in which a position of the shape defect existing in the aluminum alloy shell to be detected is located, an outer contour segment corresponding to at least one distance which is the largest among distances between different pairs of matched elements.

[0020] Optionally, in the case that the two sides of the front face have shape defects, the classification of the shape defects comprises: determining a classification result of the shape defects according to the contour defect value; and different contour defect values in different value ranges correspond to different classification results of the shape defects.

[0021] The technical scheme provided by the embodiment of the present application can have the following beneficial effects: by determining the first outer contour of the aluminum alloy shell to be detected and determining the centroid of the first outer contour, the center moments of different outer contour segments of the first outer contour relative to the centroid of the first outer contour can better reflect different outer contour segments of the aluminum alloy shell to be detected relative to the shape feature, by determining the first feature sequence according to the different outer contour segments of the first outer contour, and by performing shift matching on the first feature sequence and the second feature sequence which is determined in advance according to the standard aluminum alloy shell, the influence of possible rotation of the first outer contour on the detection result can be avoided, and by determining the contour defect value according to the DTW distance of the shift matching result, a more accurate classification result of the shape defect of the aluminum alloy shell to be detected can be obtained.

[0022] It should be understood that the general description above and the detailed description below are only exemplary and explanatory and are not restrictive of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a schematic diagram of an extrusion forming process of an aluminum alloy pipe according to an exemplary embodiment.

[0024] Figure 2 is a schematic diagram of an extruded aluminum alloy shell according to an exemplary embodiment.

[0025] Figure 3 is a flowchart of an aluminum alloy pipe compression molding defect classification method according to an exemplary embodiment.

[0026] Figure 4 is a schematic diagram of an aluminum alloy pipe that is not subjected to pressure placed in a limiting mold.

[0027] Figure 5 is a schematic diagram of an aluminum alloy pipe that is subjected to pressure placed in a limiting mold.

[0028] Figure 6 is a schematic diagram of a comparison result of a first matching sequence and a second matching sequence. DETAILED DESCRIPTION

[0029] First, the application scenario of the embodiments of the present application is briefly introduced. In the application scenario of the present application, Figure 1 is a schematic diagram of an extrusion forming process of an aluminum alloy pipe according to an exemplary embodiment, as Figure 1 indicated, the aluminum alloy pipe can be extruded by a press machine, so that the aluminum alloy pipe produces plastic deformation in a pressed state, and through the limitation of the limiting mold during the pressing process, the shape of the aluminum alloy pipe after being pressed can be limited.

[0030] The limiting mold is placed on the base of the press machine, and the limiting mold is provided with a cavity for placing the aluminum alloy pipe; the aluminum alloy pipe is placed in the cavity of the limiting mold, and under the vertical downward pressure applied by the top of the press machine, the aluminum alloy pipe can be pressed to gradually form an aluminum alloy shell with a target shape.

[0031] Figure 2 is a schematic diagram of an extruded aluminum alloy shell according to an exemplary embodiment, as Figure 2 indicated, the shape of the bottom of the aluminum alloy pipe that is limited by the limiting mold does not change, and the shape of the upper part of the aluminum alloy pipe deforms under the action of the pressure.

[0032] Compared with injecting molten liquid aluminum into a mold consistent with a target shape, the liquid aluminum is cooled in the mold to form an aluminum alloy shell; in the production process of the aluminum alloy shell shown in the embodiments of the present application, the aluminum alloy shell is obtained by plastic deformation of the aluminum alloy pipe under the restriction of the limiting mold and the pressure applied by the press, which can shorten the time required to generate the aluminum alloy shell at the production end.

[0033] In the embodiments of the present application, the extrusion of the aluminum alloy pipe causes plastic deformation of the aluminum alloy pipe under the applied pressure. Compared with the aluminum alloy shell obtained in the casting process, the aluminum alloy shell obtained in the production process of the embodiments of the present application has a more compact structure, which can effectively improve the mechanical properties such as tensile strength, yield strength and hardness of the obtained aluminum alloy shell.

[0034] In the aluminum alloy shell obtained by extrusion treatment of the aluminum alloy pipe, there may be shape defects such as protrusions or depressions, which will affect the appearance quality and structural strength of the aluminum alloy shell. Therefore, it is necessary to detect defects in the obtained aluminum alloy shell and classify the aluminum alloy shells determined to have defects, so as to timely and targetedly treat the existing shape defects.

[0035] To solve the above technical problems, the embodiments of the present application provide an aluminum alloy pipe pressure plastic forming defect classification method, Figure 3 is a flow chart of an aluminum alloy pipe pressure plastic forming defect classification method according to an example embodiment, as Figure 3 shown, the method comprises the following steps.

[0036] In step S101, the front surface image of the aluminum alloy shell to be detected obtained by extrusion treatment of the aluminum alloy pipe is acquired, and the first outer contour of the aluminum alloy shell to be detected is obtained according to the front surface image.

[0037] The aluminum alloy pipe extruded in the embodiments of the present application is a circular cross-section aluminum alloy pipe; by applying pressure to the top of the formed aluminum alloy pipe and limiting the bottom of the aluminum alloy pipe during the pressure process by using the limiting mold, plastic deformation of the aluminum alloy pipe can be caused during the pressure process, so that the shape of the obtained aluminum alloy shell is consistent with the shape of the required standard aluminum alloy shell after extrusion.

[0038] An image acquisition device can be provided on the front of the aluminum alloy shell obtained after extrusion to realize the acquisition of the front surface image of the aluminum alloy shell; wherein the components other than the aluminum alloy shell within the field of view of the image acquisition device can be removed in advance.

[0039] Alternatively, the initial image collected by the image collection device can be subjected to image segmentation, so that only the aluminum alloy shell to be detected is retained in the obtained front surface image, avoiding interference from other background information other than the aluminum alloy shell. For details of the image segmentation process, reference can be made to the prior art, which will not be described herein again.

[0040] The first outer contour corresponds to the outer contour of the aluminum alloy shell to be detected in the front surface image, and the first outer contour includes pixel points corresponding to different position points of the outer contour of the aluminum alloy shell to be detected in the front surface image.

[0041] The outer contour of the aluminum alloy shell obtained after extrusion has a large difference between the features in the front surface image and the surrounding other pixel points. The front surface image can be subjected to gray scale processing to obtain a gray scale image, and the gray scale image can be subjected to edge detection using Sobel, Prewitt, Canny, Laplacian and other operators to obtain an edge image.

[0042] After the edge detection of the gray scale image, the pixel points with a gradient value greater than a preset gradient threshold value in the front surface image can be retained in the edge image. The outermost and closed edge of the plurality of edges of the edge image is taken as the first outer contour corresponding to the aluminum alloy shell to be detected.

[0043] In step S102, the center of mass of the outer contour pixel points of the first outer contour is determined, and the central moments of different outer contour segments of the first outer contour relative to the center of mass of the first outer contour are determined.

[0044] The aluminum alloy pipe used in the embodiments of the present application is a circular cross-section aluminum alloy pipe. Since the cross-section of the aluminum alloy pipe is circular, the cross-section of the aluminum alloy shell obtained after the pressure plane of the press applies pressure to the top of the aluminum alloy pipe is also circular in normal cases. When there is no defect on the surface of the aluminum alloy shell, the profile of the aluminum alloy shell under the side view or front view is the same.

[0045] When there is a pit or protrusion or other defects on the surface of the aluminum alloy shell, the outer contour line where the pit or protrusion or other defects is located will exhibit a difference from the contour line under other views; or the outer contour line where the pit or protrusion or other defects is located will exhibit a difference from the outer contour line of the standard aluminum alloy shell.

[0046] For example, for the position point H1 where there is a pit on the surface of the aluminum alloy shell, under the side view with the edge line where the position point H1 is located as the outer contour line, there is a pit at the position point H1, and the outer contour line at the position point H1 is closer to the inner side of the aluminum alloy shell than other outer contour lines.

[0047] For example, for the protruding position point H2 on the surface of the aluminum alloy shell, in the side view angle with the edge line where the position point H2 is located as the outer contour line, there is a protrusion at the position point H2, and the outer contour line at the position point H2 is farther away from the inner side of the aluminum alloy shell than other outer contour lines.

[0048] The center of mass of the outer contour pixel points of the first outer contour can facilitate the description of the shape of the first outer contour, so as to determine whether there is a pit defect or a protrusion defect on the two side edges of the front face; the center of mass of the outer contour pixel points of the first outer contour can refer to the center of mass of the closed area surrounded by the first outer contour as the boundary.

[0049] In an embodiment, the central moment of different outer contour segments of the first outer contour is determined by: constructing a polar coordinate system with the center of mass of the first outer contour as the coordinate origin, and equally dividing the first outer contour into a plurality of outer contour segments according to the corresponding angles in the polar coordinate system; for a target outer contour segment in the plurality of outer contour segments of the first outer contour, determining the average distance of the pixel points of the target outer contour segment in the polar coordinate system to the center of mass and the average angle; and determining the normalized central moment of the target outer contour segment according to the difference between the distance of the pixel points of the target outer contour segment to the center of mass and the average distance, the difference between the angle of the pixel points to the center of mass and the average angle, and the gradient value of the pixel points in the front surface image.

[0050] The center of mass of the first outer contour is taken as the coordinate origin to construct a polar coordinate system, and the first outer contour is equally divided into a plurality of outer contour segments according to the corresponding angles in the polar coordinate system, and the total angle of all outer contour segments is 360 degrees.

[0051] The preset number can be selected according to actual needs, and a larger preset number corresponds to more accurate division precision, and a smaller preset number corresponds to longer outer contour segments after division. The preset number can be between 36 and 50, for example.

[0052] The average distance of the pixel points of the target outer contour segment in the polar coordinate system to the center of mass and the average angle can reflect the characteristics of the target outer contour segment in the distance to the center of mass.

[0053] The difference between the angle of the pixel points of the target outer contour segment to the center of mass and the average angle can reflect the curvature characteristics of the target outer contour segment; the gray value difference of the pixel points at the pit or protrusion and other surrounding pixel points is higher, so that the gradient value of the pixel points at the pit or protrusion is higher, and therefore, according to the gradient value of the pixel points in the front surface image, the probability of defects of the pixel points of the target outer contour segment can be reflected.

[0054] The normalized central moment of the target outer contour segment is determined according to the distance of the target outer contour segment relative to the centroid, the curvature feature of the target outer contour segment, and the gradient feature. With the rotation of the aluminum alloy shell to be detected or the rotation of the camera angle, the angle of the target outer contour segment in the polar coordinate system and the angle of the centroid will change consistently, so that the relative angle of the angle of the target outer contour segment and the centroid is unchanged, so that the normalized central moment has rotation invariance. Therefore, the obtained central moment can adapt to the rotation of the camera angle of the image acquisition device.

[0055] The following is an example of a calculation formula to illustrate the process of obtaining the central moment of the embodiment of the application: ; wherein, is the normalized central moment of the target outer contour segment, n is the number of pixel points in the target outer contour segment, is the distance of the i th pixel point in the target outer contour segment to the centroid, is the average distance of all pixel points in the target outer contour segment to the centroid, is the angle of the i th pixel point in the target outer contour segment in the polar coordinate system, is the average angle of all pixel points in the target outer contour segment in the polar coordinate system, p is the first order, and q is the second order, is the gray gradient value of the i th pixel point in the target outer contour segment in the front surface image.

[0056] When different outer contour segments have different shape features, the difference in the angle of the pixel points in the outer contour segment relative to the average angle will change, so that the normalized central moment of the outer contour segment changes. When the distance features of different outer contour segments to the centroid are different, the distance of the pixel points in the outer contour segment to the centroid will change, so that the normalized central moment of the outer contour segment changes.

[0057] When the edge features of the pixel points in different outer contour segments are different, the gray gradient value of the pixel points in the outer contour segment will change, so that the normalized central moment of the outer contour segment changes. Therefore, the normalized central moment of the target outer contour segment can obtain a value matching the features of the outer contour segment when the target outer contour segment has different features. The normalized central moment of the outer contour segment can realize the description of the features of the outer contour segment.

[0058] In step S103, the central moments of different outer contour segments of the first outer contour are constructed as elements to form a first feature sequence, and a second feature sequence constructed in advance for the standard aluminum alloy shell is obtained.

[0059] The second outer contour of the standard aluminum alloy shell can be obtained in advance according to the obtaining step of the first feature sequence corresponding to the first outer contour of the aluminum alloy shell to be detected; the standard aluminum alloy shell can be a qualified aluminum alloy shell; the standard aluminum alloy shell has a shape expected to be reached after extrusion of the aluminum alloy pipe, and the second outer contour of the standard aluminum alloy shell can provide a better reference for defects of the aluminum alloy shell to be detected.

[0060] The second feature sequence is determined according to the second outer contour of the standard aluminum alloy shell; the second feature sequence corresponding to the second outer contour of the standard aluminum alloy shell can be obtained in advance according to the obtaining step of the first feature sequence corresponding to the first outer contour of the aluminum alloy shell to be detected.

[0061] For example, the central moments of different outer contour segments of the second outer contour of the standard aluminum alloy shell can be obtained in advance according to the obtaining process of the central moments of different outer contour segments of the first outer contour of the aluminum alloy shell to be detected; the second feature sequence corresponding to the second outer contour of the standard aluminum alloy shell can be obtained in advance according to the central moments of different outer contour segments of the second outer contour of the standard aluminum alloy shell, according to the obtaining step of the first feature sequence corresponding to the first outer contour of the aluminum alloy shell to be detected.

[0062] The first feature sequence determined according to different outer contour segments of the first outer contour of the aluminum alloy shell to be detected can realize the description of the features of different outer contour segments of the aluminum alloy shell to be detected; and the second feature sequence determined according to different outer contour segments of the second outer contour of the standard aluminum alloy shell can realize the description of the features of different outer contour segments of the standard aluminum alloy shell.

[0063] The first feature sequence and the second feature sequence are obtained, which helps to determine the difference between the aluminum alloy shell to be detected and the standard aluminum alloy shell in the outer contour, and since there is a defect in the contour line of the aluminum alloy shell to be detected, there is a protrusion or a depression on both sides of the contour line, thus helping to determine whether there is a protrusion or a depression on both sides of the outer contour of the aluminum alloy shell to be detected.

[0064] In step S104, the first feature sequence and the second feature sequence are subjected to shift matching, and the contour defect value is determined according to the DTW distance of the shift matching result.

[0065] The outer contour of the aluminum alloy shell to be detected is a closed contour, and when the outer contour of the aluminum alloy shell to be detected and the outer contour of the standard aluminum alloy shell are directly compared, a misalignment may occur, which may cause a misjudgment of the consistency of the two outer contours, and the aluminum alloy shell to be detected which actually has no defect is misjudged as an aluminum alloy shell with defects.

[0066] For example, for the aluminum alloy shell to be detected and the standard aluminum alloy shell with consistent outer contour, taking the bottommost position of the aluminum alloy shell to be detected as the starting position, the different outer contour segments of the aluminum alloy shell to be detected along the clockwise central arc from the starting position are L1, L2, L3, L4, L5 and L6; taking the bottommost position of the standard aluminum alloy shell as the starting position, the different outer contour segments of the standard aluminum alloy shell along the clockwise central arc from the starting position are L1, L2, L3, L4, L5 and L6.

[0067] If the shooting angle of the camera changes or the device is shaken, in the first outer contour determined according to the obtained front surface image, the different outer contour segments of the aluminum alloy shell to be detected along the clockwise central arc from the bottommost position as the starting position are L3, L4, L5, L6, L1 and L2.

[0068] If the first feature sequence and the second feature sequence are directly matched, the two sequences (L3, L4, L5, L6, L1, L2) and (L1, L2, L3, L4, L5, L6) are matched, the values of the elements at the same position in the two sequences are different, and the matching result will misjudge that the aluminum alloy shell to be detected actually does not exist as abnormal, therefore, the first feature sequence and the second feature sequence can be shifted and matched to obtain a matching result more consistent with the actual situation.

[0069] The outer contour of the aluminum alloy shell to be detected is a continuous contour, if the position points of the first feature sequence can be shifted and matched with the second feature sequence in the same order, it indicates that the contour of the aluminum alloy shell to be detected on the front surface is consistent with that of the standard aluminum alloy shell, and the aluminum alloy shell to be detected does not exist as abnormal, therefore, shifting and matching the first feature sequence and the second feature sequence can better realize the detection of defects existing on the surface of the aluminum alloy shell to be detected.

[0070] In one embodiment, shifting and matching the first feature sequence and the second feature sequence includes: performing a shift operation on the first feature sequence, and determining the similarity between the sequence obtained after the shift operation and the second feature sequence; the shift operation includes shifting the element at the end position of the sequence to the starting position of the sequence; the sequence obtained after the shift operation is subjected to the shift operation again, and the step of determining the similarity between the sequence obtained after the shift operation and the second feature sequence is performed again; in the case where the number of shift operations reaches the number of elements in the first feature sequence, the sequence corresponding to the minimum similarity in all shift operations is taken as the target feature sequence after shift matching.

[0071] The similarity between the sequence obtained after the shift operation and the second characteristic sequence can be determined according to the absolute value of the difference between the elements at the same position in the sequence obtained after the shift operation and the second characteristic sequence; the greater the absolute value of the difference between the elements at the same position, the smaller the value of the similarity, and the lower the matching degree between the sequence obtained after the shift operation and the second characteristic sequence; the smaller the absolute value of the difference between the elements at the same position, the greater the value of the similarity, and the higher the matching degree between the sequence obtained after the shift operation and the second characteristic sequence.

[0072] For example, when the first characteristic sequence is (L3, L4, L5, L6, L1, L2) and the second characteristic sequence is (L1, L2, L3, L4, L5, L6), a shift operation can be performed on any one of the first characteristic sequence and the second characteristic sequence; the embodiment of the present application exemplarily illustrates the process of shift matching by taking the first characteristic sequence as an example.

[0073] When the shift operation is performed on the first characteristic sequence (L3, L4, L5, L6, L1, L2), the element L2 at the end position can be placed at the starting position of the sequence, thereby obtaining the sequence (L2, L3, L4, L5, L6, L1).

[0074] Among the plurality of sequences obtained after the shift operation, at least one sequence is consistent with the actual situation of the outer contour of the aluminum alloy shell, and the pits or protrusions existing in the aluminum alloy shell obtained after the pressure machine applies pressure to the top of the aluminum alloy pipe are usually smaller in area than the normal area, so that most (for example, 90% of the surface area ratio) of the aluminum alloy shell to be detected is a normal area. Therefore, by performing a plurality of shift operations on the first characteristic sequence of the aluminum alloy shell to be detected, a first matching sequence that matches the second characteristic sequence can be obtained, and the elements corresponding to the normal outer contour segments in the first matching sequence and the second characteristic sequence are located at the same or similar positions.

[0075] The first characteristic sequence can reflect the characteristics of different outer contour segments of the aluminum alloy shell to be detected, and the second characteristic sequence can reflect the characteristics of different outer contour segments of the standard aluminum alloy shell. The shift matching process of the first characteristic sequence and the second characteristic sequence avoids the influence of the possible changes in the shooting angle of the camera or the possible vibration of the device. Therefore, after the shift matching of the first characteristic sequence and the second characteristic sequence, the second characteristic sequence is taken as a second matching sequence, the first matching sequence that best matches the second matching sequence can be obtained, so that the characteristic matching process of the aluminum alloy shell to be detected and the standard aluminum alloy shell can also avoid the influence of the possible changes in the shooting angle of the camera or the possible vibration of the device.

[0076] Among the plurality of feature sequences obtained after performing multiple shift operations on the first feature sequence of the aluminum alloy pipe to be detected, the first matching sequence and the second matching sequence have the highest matching degree, which can better reflect the actual outer contour feature of the aluminum alloy pipe to be detected, and thus the profile defect value of the aluminum alloy pipe to be detected can be determined according to the DTW (Dynamic Time Warping) distance between the first matching sequence and the second matching sequence.

[0077] In an embodiment, the profile defect value is determined according to the DTW distance of the shift matching result, including: taking the DTW distance of the shift matching result as the profile defect value.

[0078] The DTW distance of the shift matching result is the DTW distance between the first matching sequence and the second matching sequence obtained after the shift matching; the first matching sequence obtained after the multiple shift operations on the first feature sequence is the sequence that is most matched with the second feature sequence, and the DTW distance of the shift matching result can represent the difference between the outer contour feature of the aluminum alloy shell to be detected and the outer contour feature of the standard aluminum alloy shell.

[0079] The obtained first feature sequence can reflect the feature of the outer contour segment of the aluminum alloy shell to be detected, and the shift matching of the first feature sequence and the second feature sequence can avoid the influence of the shooting angle of the camera or the vibration received by the camera on the order of the elements in the first feature sequence, and thus the DTW distance of the shift matching result can at least avoid the influence of the change of the shooting angle of the camera or the vibration received by the camera on the detection result.

[0080] Taking the DTW distance of the shift matching result as the profile defect value can simply and effectively determine the profile defect value of the aluminum alloy pipe to be detected, and the profile defect value can represent the degree or probability of the shape defect existing on the two sides of the front face of the aluminum alloy pipe to be detected.

[0081] In an embodiment, the shift matching result includes the first matching sequence and the second matching sequence; and the profile defect value is determined by: determining the weight value between the matched element pairs in the first matching sequence and the second matching sequence according to the difference in local shape feature between the outer contour segment corresponding to the first matching sequence and the outer contour segment corresponding to the second matching sequence; and performing weighted summation on the distance between the matched element pairs by using the weight value between the matched element pairs in the first matching sequence and the second matching sequence to obtain the profile defect value.

[0082] The first matching sequence is the sequence that is most matched with the second feature sequence among the plurality of sequences obtained after performing multiple shift operations on the first feature sequence; and the second matching sequence is the same as the second feature sequence.

[0083] After the shift matching of the first feature sequence and the second feature sequence, the elements at the same position in the obtained first matching sequence and the second matching sequence correspond to two outer contour fragments respectively from the aluminum alloy shell to be detected and the standard aluminum alloy shell; according to the difference in local shape features between the outer contour fragments corresponding to the first matching sequence and the second matching sequence, the weight value between the matching element pairs in the first matching sequence and the second matching sequence is determined, which can make the outer contour fragments with greater difference in local shape features have greater contribution to the overall detection result, so as to more sensitively determine the subtle shape defects in the aluminum alloy shell to be detected.

[0084] In one embodiment, the weight value between the matching element pairs in the first matching sequence and the second matching sequence is determined by the following way: , wherein, is the weight value between the i th element pair in the first matching sequence and the second matching sequence, exp is the exponential function with the natural constant as the base number, is the average angle value of the outer contour fragment corresponding to the element from the first matching sequence in the i th element pair, is the average angle value of the outer contour fragment corresponding to the element from the second matching sequence in the i th element pair, is the standard deviation of the difference in the corresponding average angle value of the matching element pairs, is a preset positive number.

[0085] is the standard deviation of the difference in the corresponding average angle value of the matching element pairs, for example, is the standard deviation of all ; the differences in the average angle values of all element pairs can be determined respectively, and the standard deviations of the differences corresponding to different element pairs can be determined, and the standard deviation of the difference in the corresponding average angle value of the matching element pairs , which can realize the normalization processing of the angle value. The preset positive number is used to avoid the case that the denominator is 0, and the preset positive number may be 0.01 or 0.02 or other positive numbers.

[0086] The outer contour fragments are obtained by dividing the outer contour in the polar coordinate system according to the angle, the angles corresponding to different outer contour fragments are the same, however, due to the different features of different outer contour fragments, the number of pixel points in different outer contour fragments may be different, therefore, the average angle values of pixel points in outer contour fragments with different features are different.

[0087] For example, if 360° is divided into 10°, 36 pieces of outer contour segments can be obtained, for outer contour segment A and outer contour segment B of the 36 pieces of outer contour segments, outer contour segment A includes 250 pixel points because of larger arc, and outer contour segment B can include 200 pixel points because of more straight, the average angle value of outer contour segment A is equal to 10 / 250=0.04, and the average angle value of outer contour segment B is equal to 10 / 200=0.05.

[0088] For the two matched outer contour segments, the greater the difference in the average angle value, the greater the difference in the local shape of the two outer contour segments, so that the shape probability of the aluminum alloy pipe to be detected at the corresponding position is greater.

[0089] The greater the difference in the average angle value of the two matched outer contour segments, the greater the weight value can be determined, so as to improve the contribution of the outer contour segment with a greater probability of shape defect to the calculation result.

[0090] In step S105, whether the two sides of the front surface of the aluminum alloy shell to be detected have shape defects is determined by using the contour defect value, and classification of the shape defects is performed in the case of having shape defects.

[0091] The greater the contour defect value determined according to the front surface image of the aluminum alloy shell to be detected, the greater the difference between the overall contour of the front surface of the aluminum alloy shell to be detected and the overall contour of the standard aluminum alloy shell, and the more serious the shape defects existing on the two sides of the front surface of the aluminum alloy shell to be detected, so that whether the two sides of the front surface of the aluminum alloy shell to be detected have shape defects can be determined by using the contour defect value.

[0092] For example, when the contour defect value determined according to the front surface image of the aluminum alloy shell to be detected is greater than a preset threshold value, it can be determined that at least one side of the two sides of the front surface of the aluminum alloy shell to be detected has shape defects.

[0093] When the contour defect value determined according to the front surface image of the aluminum alloy shell to be detected is less than or equal to a preset threshold value, it can be determined that the two sides of the front surface of the aluminum alloy shell to be detected do not have shape defects.

[0094] In the case of having shape defects, the classification of the shape defects can be performed according to the local contour of the aluminum alloy shell to be detected with defects; different types of defects can correspond to different defect degrees, for example, the greater the values of the depth, length and width of the existing shape defects, the deeper the degree of the existing shape defects.

[0095] In one embodiment, in a case where it is determined that there is no shape defect on both sides of the front face of the aluminum alloy shell to be detected, the LBP value of the target pixel point in the front face surface gray image can also be determined according to the gray values of the pixel points in the neighborhood range of the target pixel point; the information entropy of the LBP values of the pixel points in the neighborhood range of the target pixel point is determined, and the information entropy is used to represent the complexity of the LBP values of the pixel points in the neighborhood range; in a case where the information entropy of the target pixel point is greater than a preset information entropy threshold, it is determined that the aluminum alloy shell to be detected has a crack defect at the target pixel point.

[0096] In a case where it is determined that there is a shape defect on both sides of the front face of the aluminum alloy shell to be detected, the aluminum alloy shell to be detected can be determined as an abnormal aluminum alloy shell; for the aluminum alloy shell that has been determined as an abnormal aluminum alloy shell, the production of the aluminum alloy product can be restarted after being heated to aluminum liquid, and it can no longer be determined whether the surface has a crack defect.

[0097] In a case where it is determined that there is no shape defect on both sides of the front face of the aluminum alloy shell to be detected, it is indicated that there is no pit or protrusion and other shape defects on both sides of the front face of the aluminum alloy shell to be detected, and the crack defect is difficult to be embodied in the contour of the aluminum alloy shell. In order to further determine whether the aluminum alloy shell to be detected belongs to a qualified product, it can be determined whether the front face of the aluminum alloy shell to be detected has a crack.

[0098] For the aluminum alloy pipe that is not subjected to pressure on the top, the normal texture existing in the aluminum alloy pipe is generally along the longitudinal direction of the aluminum alloy pipe; for the aluminum alloy pipe subjected to pressure on the top, in the embodiment of the present application, the same cross section of the aluminum alloy pipe is subjected to the same pressure intensity applied by the press, so that the local texture of the aluminum alloy pipe subjected to pressure is consistent with the direction of the longitudinal direction of the local plane.

[0099] For the crack existing after being subjected to pressure, different stresses can be generated after being subjected to pressure due to the defects existing in the aluminum alloy pipe, so that the direction of the crack of the aluminum alloy shell obtained after the top of the aluminum alloy pipe is subjected to pressure has higher randomness, and has greater difference from the texture existing around.

[0100] The LBP (Local Binary Pattern, local binary pattern) value of the target pixel point is determined according to the pixel points in the local range of the target pixel point, so that the local texture of the target pixel point can be described; the obtaining process of the LBP value can refer to the calculation process in the prior art, and the embodiment of the present application will not be described here.

[0101] The information entropy of the LBP value of the pixel point in the neighborhood range of the target pixel point can be determined according to the frequency ratio of different LBP values in the neighborhood range of the target pixel point; the higher the complexity of the LBP value of the pixel point in the neighborhood range of the target pixel point, the higher the information entropy of the LBP value of the pixel point in the neighborhood range of the target pixel point.

[0102] When there is a crack defect with a large difference from the normal texture direction in the neighborhood range of the target pixel point, the LBP value in the neighborhood range of the target pixel point will be more diverse, and the information entropy of the LBP value in the neighborhood range of the target pixel point will increase. The process of obtaining the information entropy of the LBP value can refer to the calculation process of the information entropy in the prior art, and will not be described herein.

[0103] In one embodiment, in a case where it is determined that there is no shape defect on both sides of the front surface of the aluminum alloy shell to be detected, a side surface image of the aluminum alloy shell to be detected can also be obtained, and a contour defect degree value of the side surface image can be determined to determine whether there is a shape defect on both sides of the side surface of the aluminum alloy shell to be detected.

[0104] In a case where it is determined that there is no shape defect on both sides of the front surface of the aluminum alloy shell to be detected, in order to further realize more comprehensive detection of the aluminum alloy shell to be detected, the side surface of the aluminum alloy shell to be detected can be further detected to determine whether there is a shape defect on both sides of the contour line of the side surface of the aluminum alloy shell to be detected.

[0105] In one embodiment, the shift matching result includes a first matching sequence and a second matching sequence; in a case where it is determined that there is a shape defect on both sides of the front surface of the aluminum alloy shell to be detected, at least one distance corresponding to an outer contour segment with the maximum distance between different element pairs that match each other can be determined as an outer contour segment where the position of the shape defect in the aluminum alloy shell to be detected, according to the distance between the elements that match each other in the first matching sequence and the second matching sequence.

[0106] In a case where it is determined that there is a shape defect on both sides of the front surface of the aluminum alloy shell to be detected, it indicates that the overall contour line of the front surface of the aluminum alloy shell to be detected is abnormal; for the first matching sequence and the second matching sequence that match each other, the abnormality of the contour line is more affected by the element pairs that match each other with a larger difference, and therefore, at least one distance corresponding to an outer contour segment with the maximum distance between different element pairs that match each other can be determined as an outer contour segment where the position of the shape defect in the aluminum alloy shell to be detected, which can not only realize the judgment of the overall defect, but also further realize the positioning of the local defect.

[0107] In one embodiment, the classification of the shape defect is performed in the case that the shape defect exists on both sides of the front face, and the classification result of the shape defect is determined according to the profile defect value; wherein the profile defect value in different value ranges respectively corresponds to different classification results of the shape defect.

[0108] The greater the value of the profile defect value is, the higher the degree of abnormality existing on both sides of the front face is, and therefore, different evaluation levels can be set in advance, for example, the shape defect can be divided into slight defect, moderate defect and severe defect; the value in the value range corresponding to the slight defect is the smallest, the value in the value range corresponding to the severe defect is the largest, and the value in the value range corresponding to the slight defect is between the values in the value ranges corresponding to the slight defect and the severe defect.

[0109] For the slight defect or the moderate defect existing in the aluminum alloy shell, the operator can realize the treatment of the defect by the way of local repair; for the severe defect existing in the aluminum alloy shell, the operator can need to recycle the whole aluminum alloy shell.

[0110] Figure 4 a schematic view of an aluminum alloy pipe not subjected to pressure placed in the limiting mold in the embodiment of the present application, Figure 5 a schematic view of an aluminum alloy pipe subjected to pressure placed in the limiting mold in the embodiment of the present application, the pressure is applied to the top of the aluminum alloy pipe by the press, Figure 4 the aluminum alloy pipe can be plastically deformed to the shape shown in Figure 5 under the limitation of the limiting mold at the bottom.

[0111] The aluminum alloy pipe shown in Figure 5 can be used as a standard aluminum alloy shell, and the aluminum alloy shell shown in Figure 4 can be used as a to-be-detected aluminum alloy shell, and the classification process of the defect in the embodiment of the present application is exemplarily described.

[0112] By using the obtaining steps of the first feature sequence and the second feature sequence in the embodiment of the present application and the shift matching between the first feature sequence and the second feature sequence, the comparison result of the first matching sequence and the second matching sequence as shown in Figure 6 can be obtained; Figure 6 the point with a circular shape in Figure 6 is an element in the first matching sequence, Figure 6 the point with a square shape in is an element in the second matching sequence,

[0113] the point with a triangular shape in Figure 6 is a coincident point of the first matching sequence and the second matching sequence.As can be seen from the two matched sequences in the table, the first matched sequence and the second matched sequence have an overlap in a part of the sub-sequences and a difference in another part of the sub-sequences, which corresponds to the fact that a part of the profile segment of the aluminum alloy shell to be detected is consistent with the profile segment of the standard aluminum alloy shell, and another part of the profile segment of the aluminum alloy shell to be detected is different from the profile segment of the standard aluminum alloy shell.

[0114] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope of the application being indicated by the following claims.

[0115] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application.

Claims

1. A method for classifying defects in compression molding of aluminum alloy tubes, characterized in that: include: Acquire a front surface image of the aluminum alloy shell to be inspected obtained by extruding the aluminum alloy tube, and obtain a first outer contour of the aluminum alloy shell to be inspected based on the front surface image; Determine the centroid of the outer contour pixel points of the first outer contour, and respectively determine the central moments of different outer contour segments of the first outer contour relative to the centroid of the first outer contour; Constructing a first feature sequence using central moments of different outer contour segments of the first outer contour as elements, and obtaining a second feature sequence pre-constructed for a standard aluminum alloy shell; second The characteristic sequence is determined based on the second outer contour of the standard aluminum alloy shell; Performing shift matching on the first feature sequence and the second feature sequence, and determining the contour defect value according to the DTW distance of the shift matching result; The contour defect value is used to determine whether there are shape defects on both sides of the front surface of the aluminum alloy shell to be inspected, and the shape defects are classified if there are shape defects.

2. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: The central moments of the different outer contour segments of the first outer contour are determined as follows: A polar coordinate system is constructed using the centroid of the first outer contour as the coordinate origin, and the first outer contour is equally divided into a preset number of outer contour segments according to the corresponding angles in the polar coordinate system; For a target outer contour segment among the plurality of outer contour segments of the first outer contour, determining an average distance and an average angle from a pixel point of the target outer contour segment to a centroid in a polar coordinate system; The normalized central moment of the target outer contour segment is determined based on the difference between the distance from the pixel point of the target outer contour segment to the centroid and the average distance, the difference between the angle to the centroid and the average angle, and the gradient value of the pixel point in the front surface image.

3. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: Performing shift matching on the first feature sequence and the second feature sequence includes: Performing a shift operation on the first feature sequence and determining a similarity between the sequence obtained after performing the shift operation and the second feature sequence; the shift operation includes shifting an element at an end position of the sequence to a starting position of the sequence; performing the shift operation again on the sequence obtained after performing the shift operation, and performing the step of determining the similarity between the sequence obtained after performing the shift operation and the second feature sequence again; When the number of shift operations reaches the number of elements in the first feature sequence, the sequence with the smallest similarity corresponding to all shift operations is used as the target feature sequence after shift matching.

4. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: Determining a contour defect value according to a DTW distance of a shift matching result includes: using the DTW distance of the shift matching result as the contour defect value.

5. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: The shift matching result includes the matched first matching sequence and the second matching sequence; the contour defect value is determined by the following method: Determining weight values ​​between matching element pairs in the first matching sequence and the second matching sequence based on differences in local shape features between the outer contour segments corresponding to the first matching sequence and the outer contour segments corresponding to the second matching sequence; The weight values ​​between the matched element pairs in the first matching sequence and the second matching sequence are used to perform weighted summation on the distances between the matched element pairs to obtain the contour defect value.

6. The aluminum alloy tube compression molding defect classification method according to claim 5, characterized in that: The weight values ​​between the matching element pairs in the first matching sequence and the second matching sequence are determined as follows: ,in, is the weight value between the i-th element pair that matches in the first matching sequence and the second matching sequence, exp is an exponential function with a natural constant as the base, is the average angle value of the outer contour fragment corresponding to the element from the first matching sequence in the i-th element pair, is the average angle value of the outer contour fragment corresponding to the element from the second matching sequence in the i-th element pair, is the standard deviation of the difference in the corresponding mean angle values ​​of the matched pairs of elements, The default positive number.

7. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: When it is determined that no shape defects exist on both sides of the front surface of the aluminum alloy housing to be inspected, the method further includes: For the target pixel in the grayscale image of the front surface, the LBP value of the target pixel is determined according to the grayscale values ​​of the pixels in the neighborhood of the target pixel; Determine the information entropy of the LBP values ​​of the pixels in the neighborhood of the target pixel, where the information entropy is used to characterize the complexity of the LBP values ​​of the pixels in the neighborhood; When the information entropy of the target pixel point is greater than a preset information entropy threshold, it is determined that the aluminum alloy shell to be inspected has a crack defect at the target pixel point.

8. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: When it is determined that no shape defects exist on both sides of the front surface of the aluminum alloy housing to be inspected, the method further includes: A side surface image of the aluminum alloy shell to be inspected is obtained, and a contour defect degree value of the side surface image is determined to determine whether shape defects exist on both sides of the side surface of the aluminum alloy shell to be inspected.

9. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: The shift matching result includes a matched first matching sequence and a matched second matching sequence; When it is determined that shape defects exist on both sides of the front surface of the aluminum alloy housing to be inspected, the method further includes: According to the distances between the matching elements in the first matching sequence and the second matching sequence, the outer contour segment corresponding to at least one of the largest distances between the matching different element pairs is used as the outer contour segment where the shape defect exists in the aluminum alloy shell to be detected.

10. The aluminum alloy tube compression molding defect classification method according to claim 1, characterized in that: In the case of shape defects on both sides of the front, the shape defects are classified as follows: The classification result of the shape defect is determined according to the contour defect value; wherein, contour defect values ​​in different value ranges correspond to different classification results of the shape defect.

Citation Information

Patent Citations

  • Cable fixture defect detection method, device, equipment and medium

    CN116500048A

  • Titanium alloy product defect detection method based on image video technology

    CN118710643A

  • Aluminum alloy casting machining forming quality evaluation method

    CN120451164A

  • Metal stamping part punching defect inspection method based on FastInst instance segmentation

    CN120635044A

  • Touch panel cover glass

    JP2018018378A