Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a temperature control method and system based on aluminum tube surface flaw identification. The streamline pocking marks on the surface of the aluminum pipe in the production process are avoided, and the production efficiency and the qualification rate of the aluminum pipe are effectively improved.
The invention aims to provide a temperature control method based on aluminum pipe surface flaw identification, which comprises the following steps:
acquiring a gray scale image of the aluminum pipe to be detected; acquiring a gray scale image of the normal aluminum pipe;
carrying out binarization processing on a gray-scale image of the aluminum pipe to be detected to obtain a binary image of the aluminum pipe to be detected;
performing edge detection on the binary image to obtain two edge straight lines of the aluminum pipe to be detected; acquiring a central line of the aluminum pipe to be detected according to two edge straight lines of the aluminum pipe to be detected;
setting a sliding window according to the length and the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected;
sequentially sliding the gray scale image of the aluminum pipe to be detected along the central line direction by using the sliding windows to obtain a first average gray scale value of each row in each sliding window in the gray scale image of the aluminum pipe to be detected;
obtaining a second average gray value of each line in each sliding window in the gray map of the normal aluminum pipe according to the analogy;
acquiring the difference value of the average gray value of each row in each sliding window according to the first average gray value and the second average gray value;
obtaining the variance of each sliding window according to the difference value of the average gray value of each row in each sliding window;
judging whether surface flaws exist in the gray-scale image of each sliding window corresponding to the aluminum pipe to be detected or not according to the variance of each sliding window;
acquiring all sliding windows with surface defects; acquiring a defect proportion coefficient according to the number of all sliding windows with surface defects;
marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient;
and adjusting the temperature in the extrusion production process of the aluminum pipe according to the marked severity of the surface flaws of the aluminum pipe to be detected.
In one embodiment, the sliding window is set according to the following steps:
respectively acquiring linear equations of two edge lines of the aluminum pipe to be detected, and acquiring a linear equation of a central line of the aluminum pipe to be detected;
acquiring the length of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected according to the linear equation of the central line of the aluminum pipe to be detected;
respectively acquiring the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected according to the linear equation of the two edge straight lines of the aluminum pipe to be detected;
setting a sliding window according to the length and the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected, wherein the size of the sliding window is the same as that of the aluminum pipe
(ii) a Wherein,
;
;
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
and the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected is shown.
In one embodiment, the step length of sliding the sliding window is
。
In one embodiment, during the sliding process of the sliding window along the central line direction on the gray scale of the aluminum tube to be detected, the parts of the sliding window on the two sides of the central line are symmetrical, and the long side of the sliding window is perpendicular to the central line.
In one embodiment, the variance of each sliding window is calculated as follows:
in the formula,
sliding window with display
The variance of (a);
sliding window with display
Inner first
Difference of line average gray values;
sliding window with display
Inner first
The sum and average of the differences of the line average gray values;
sliding window with display
Middle perpendicular to the side length of the middle line.
In one embodiment, whether the gray scale map of each sliding window corresponding to the aluminum pipe to be detected has surface defects is judged according to the following steps:
setting a variance threshold; and when the variance of the sliding window is greater than the variance threshold value, determining that the sliding window has surface defects corresponding to the area in the gray-scale image of the aluminum pipe to be detected.
In one embodiment, the defect proportion coefficient calculation formula is as follows:
(ii) a In the formula,
representing a defect proportion coefficient;
all sliding windows indicating the presence of surface flaws
The number of (2);
marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient when
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
。
In one embodiment, when the temperature during the extrusion production of the aluminum pipe is adjusted according to the severity of marking the surface flaws of the aluminum pipe to be detected, when the surface flaws of the aluminum pipe to be detected occur
Label, will cool down at maximum rate
Cooling; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.75
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.50
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.25
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Label, will not take cooling measures; wherein,
the maximum cooling rate is indicated.
In an embodiment, the two edge straight lines of the aluminum pipe to be detected are obtained by performing edge detection on the binary image to obtain edge lines in the binary image to be detected, and performing hough straight line detection according to edge pixel points on the edge lines in the binary image to be detected.
A second object of the present invention is to provide a temperature control system based on aluminum pipe surface flaw identification, comprising:
the image acquisition module is used for acquiring a gray scale image of the aluminum pipe to be detected; acquiring a gray scale image of the normal aluminum pipe; carrying out binarization processing on a gray scale image of the aluminum pipe to be detected to obtain a binary image of the aluminum pipe to be detected;
the image processing module is used for carrying out edge detection on the binary image to obtain two edge straight lines of the aluminum pipe to be detected; acquiring a central line of the aluminum pipe to be detected according to two edge straight lines of the aluminum pipe to be detected; setting a sliding window according to the length and the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected; sequentially sliding the gray scale image of the aluminum pipe to be detected along the central line direction by using the sliding windows to obtain a first average gray scale value of each row in each sliding window in the gray scale image of the aluminum pipe to be detected; obtaining a second average gray value of each line in each sliding window in the gray map of the normal aluminum pipe according to the analogy; acquiring the difference value of the average gray value of each row in each sliding window according to the first average gray value and the second average gray value; obtaining the variance of each sliding window according to the difference value of the average gray value of each row in each sliding window;
the temperature regulation and control module is used for judging whether the gray-scale image of each sliding window corresponding to the aluminum pipe to be detected has surface flaws or not according to the variance of each sliding window; acquiring all sliding windows with surface flaws; acquiring a defect proportion coefficient according to the number of all sliding windows with surface defects; marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient; and adjusting the temperature in the extrusion production process of the aluminum pipe according to the severity of the surface flaws of the marked to-be-detected aluminum pipe.
The invention has the beneficial effects that:
the invention provides a temperature control method and system based on aluminum pipe surface flaw identification, the method acquires the characteristics of the surface of an aluminum pipe to be detected by acquiring the center line of the aluminum pipe in an image of the aluminum pipe to be detected and traversing by utilizing a set sliding window along the center line, and in order to accurately identify the flaws in the image of the aluminum pipe to be detected, the characteristics of the surface of a normal aluminum pipe without flaws are acquired in the same way, and the flaws on the surface of the aluminum pipe to be detected can be effectively identified by performing differential analysis on the image to be detected and the normal image; and meanwhile, the proportion of the surface flaws of the aluminum pipe to be detected can be effectively obtained, the surface of the aluminum pipe is divided into different severity degrees according to the proportion of the surface flaws of the aluminum pipe, and finally the outlet temperature of the aluminum pipe of the extruding machine is regulated and controlled according to the different severity degrees, so that the real-time temperature regulation is realized according to the severity degree of the surface flaws of the aluminum pipe in the dynamic extrusion production process.
According to the temperature control system based on aluminum pipe surface flaw identification, the outlet temperature of the aluminum pipe of the extruder can be cooled and controlled in real time, the phenomenon that streamline pocks appear on the surface of the aluminum pipe in the production process is avoided, and the production efficiency and the qualified rate of the aluminum pipe are effectively improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention addresses the following scenarios: in the production process of extruding and processing an aluminum rod into an aluminum pipe, the temperature is one of the most important factors influencing the forming quality of the extruded aluminum pipe, the mold is easily damaged due to too low temperature, and the bonding phenomenon can be caused due to too high temperature, so that partial flow line pockmarks appear on the surface of the aluminum pipe. The lower limit of the temperature of the extruding machine device can be guaranteed by setting a temperature range, the influence of overhigh temperature on the quality of the aluminum pipe is mainly prevented, and then the aluminum pipe needs to be reasonably cooled, so that whether flaws caused by overhigh extruding temperature exist on the surface of the aluminum pipe or not is detected through machine vision, and dynamic intelligent control of the temperature of the extruding machine in the aluminum pipe extruding process is realized according to dynamic identification of the flaws on the surface of the aluminum pipe.
It should be noted that, the extrusion is a pressure processing method for applying an external force to one end of a metal placed in an extrusion cylinder to pass through a die hole to realize plastic deformation, and an aluminum pipe hot extrusion machine is composed of a transmission extrusion system and a heating and cooling system, wherein the program parameter value of the transmission extrusion system, such as extrusion speed, and the like, cannot be freely changed, and the temperature control of the heating and cooling system is manually assigned by a designed computer program or manually by a person according to experience. One of the important factors influencing the appearance quality of the aluminum pipe is the temperature of the device of the extruding machine, in order to prevent the die from being damaged due to low temperature, the temperature is lower in the process, and the phenomenon of metal bonding can be caused due to overhigh temperature, so that partial streamline pockmarks appear on the surface of the aluminum pipe, and how to observe the phenomenon of the streamline pockmarks and carry out intelligent cooling is the main problem to be solved by the invention. The extrusion temperature control core is at the outlet temperature, generally the outlet temperature is between 540 and 580 ℃.
The invention realizes the identification of the surface flaw as the streamline pock spot and the intelligent regulation of the extrusion temperature by utilizing the machine vision technology on the basis of digitalizing the surface image of the aluminum pipe produced by the aluminum pipe extruder.
The invention provides a temperature control method based on aluminum pipe surface flaw identification, which is shown in figure 1 and comprises the following steps:
s1, acquiring a gray scale image of the aluminum pipe to be detected; acquiring a gray scale image of the normal aluminum pipe;
carrying out binarization processing on a gray-scale image of the aluminum pipe to be detected to obtain a binary image of the aluminum pipe to be detected;
in the embodiment, an electronic camera arranged at the outlet position of an aluminum pipe of an extruding machine is used for shooting an extruded aluminum pipe in a top view mode to obtain a top view image and carrying out graying pretreatment to obtain a grayscale image of the aluminum pipe to be detected, and the grayscale image of the aluminum pipe with streamline pocks is shown in FIG. 2; in fig. 2, it can be seen that at a higher temperature, the metal is bonded, so that the surface of the aluminum pipe has certain streamline pocks, and at this time, relevant temperature reduction adjustment is required. The method comprises the steps of placing a low-gray background on the bottom surface shot by an electronic camera, firstly carrying out graying on a collected image, reducing the collected image into a layer of gray value channel, reducing the calculated amount and facilitating processing, and then carrying out median filtering for denoising, thereby realizing the image preprocessing work on the surface of the aluminum pipe. Meanwhile, a gray scale image of a normal aluminum pipe without streamline pocks is obtained in the same manner, as shown in fig. 3, and it can be seen in fig. 3 that the product formability is good and the surface quality is excellent under normal temperature. It should be noted that, in order to be able to detect defects on the entire side of the aluminum pipe, the acquisition may be performed by the arrangement of the camera. In this embodiment, after the grayscale image is binarized, in the binarization process, the threshold with the largest difference degree is mainly selected by using an OSTU automatic threshold segmentation method.
S2, performing edge detection on the binary image to obtain two edge straight lines of the aluminum pipe to be detected; acquiring a central line of the aluminum pipe to be detected according to two edge straight lines of the aluminum pipe to be detected;
two edge straight lines of the aluminum pipe to be detected are obtained by performing edge detection on the binary image to obtain edge lines in the binary image to be detected and performing Hough straight line detection according to edge pixel points on the edge lines in the binary image to be detected.
In the present embodiment, Canny edge detection is performed on the binary image, as shown in fig. 4; then defining coordinates, and taking the lower left point of the gray image as the origin of coordinates
Horizontal to the right as a horizontal axis
In the positive direction, the vertical direction is the longitudinal axis
The edge coordinate point is recorded as
And carrying out Hough line detection on the edge pixel points, wherein the main idea is to convert linear representation in a rectangular coordinate system into point representation in a parameter space, so that a plurality of highlight points in the parameter space represent a plurality of obvious lines in an original image. In this embodiment, the hough line detection includes the following steps: (1) initialization
The space of the parameters is defined by the space of the parameters,
wherein
the number of pixel points on the straight line corresponding to the parameter is represented; (2) for each pixel point, find out order in parameter space
Is/are as follows
Coordinates; (3) make statistics of all
Size of (2), taking out
The parameter(s) of (a) is,
is a preset threshold; wherein,
is provided according to the presence or absence of surface defects of the aluminum pipe under the extruder.
It should be noted that there is no picture delay in the image captured by the control camera, i.e. there is no linear representation caused by surface impurities staying and thus it is misdetected. However, when the hough line detection is performed on the edge pixel points, if a relatively obvious streamline feature exists, the corresponding edge information is easily detected as an edge line by hough, thereby causing misjudgment. Therefore, the straight line where the flow lines or the relatively tidy pockmarks are located needs to be eliminated, and only two straight lines are arranged on the outer edge of the aluminum pipe. Then, two edge straight lines of the aluminum pipe to be detected are obtained, specifically as follows:
(1) the detected straight lines are shared
Strip, each strip is straightLine is marked as
Corresponding to the Hough detection voter is
Namely, the obtained hough detection straight line is:
in the formula (I), wherein,
represents the origin to
The distance of the bar lines;
represents the origin to
Perpendicular to the straight line
The included angle of the positive half-cycle of the shaft;
the straight line under the parameter space
The general equation converted into the rectangular coordinate system is as follows:
in the formula, the slope of the straight line
Intercept of
。
(2) To obtain two strips at the upper and lower edges of the aluminum pipeStraight line portions, all straight lines detected by hough need to be selected. If the intercept is directly adopted, the intercept corresponding to the high-slope straight line of the longer streamline is the largest, so that the straight line is selected inaccurately. However, since the straight line is fitted according to the edge coordinate information, the vertical coordinates of the points on the upper and lower edge straight lines must have a difference in magnitude, and the edge straight line can be sorted according to this phenomenon. Recording the width of a gray-scale image of the aluminum pipe to be detected along the axial direction of the aluminum pipe as
Then each abscissa
All the detected straight lines have corresponding longitudinal coordinate values, and the straight lines are counted
The average of the corresponding ordinates of (a) is:
in the formula,
for each abscissa
In a straight line
The ordinate values of (a) and (b),
an average value representing the ordinate values;
and showing the width of the gray scale image of the aluminum pipe to be detected along the axial direction of the aluminum pipe. By counting straight lines
Average value of the corresponding ordinate of (a)
And a foundation is laid for obtaining two edge straight lines of the aluminum pipe.
(3) Subjecting the obtained
The maximum value of (1) is recorded as
The minimum value is recorded as
. Thereby can be used for
The corresponding straight line is marked as the upper edge straight line
Will be
The corresponding straight line is marked as the lower edge straight line
The rectangular coordinate equations corresponding to the two straight lines are as follows:
wherein,
、
are respectively straight line
The slope and the intercept of (a) of (b),
、
is composed of
The method can simultaneously and accurately ensure the slope and the intercept
Is a straight line at the upper edge of the aluminum pipe,
is a lower edge straight line.
In this embodiment, since the camera is relatively stationary during the image capture process, the two detected edges should be nearly parallel, i.e., the two detected edges should be nearly parallel
、
The phase difference is extremely small. However, due to the slight error in the real acquisition process, we need to calculate the more stable center line of the aluminum tube, and the linear equation of the center line of the aluminum tube is recorded as follows:
in the formula,
is the center line
The slope of,
Is that
The intercept of (2). Referring to fig. 5, two edge straight line and middle line views of the aluminum pipe to be detected are shown.
S3, setting a sliding window according to the length and the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected;
sequentially sliding the gray scale image of the aluminum pipe to be detected along the central line direction by using the sliding windows to obtain a first average gray scale value of each row in each sliding window in the gray scale image of the aluminum pipe to be detected; obtaining a second average gray value of each line in each sliding window in the gray map of the normal aluminum pipe according to the analogy;
acquiring the difference value of the average gray value of each row in each sliding window according to the first average gray value and the second average gray value; obtaining the variance of each sliding window according to the difference value of the average gray value of each row in each sliding window;
the sliding window is set according to the following steps: respectively acquiring linear equations of two edge lines of the aluminum pipe to be detected, and acquiring a linear equation of a central line of the aluminum pipe to be detected;
it should be noted that, in S2, a linear equation of two edge lines and a linear equation of a central line have been obtained;
acquiring the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected according to the linear equation of the central line of the aluminum pipe to be detected; respectively acquiring the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected according to the linear equation of the two edge straight lines of the aluminum pipe to be detected; setting a sliding window according to the length and the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected, wherein the size of the sliding window is the same as that of the aluminum pipe
(ii) a Wherein,
;
;
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
and the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected is shown.
In the embodiment, in the process of setting the sliding window, the length of the aluminum tube in the image needs to be calculated as follows:
in the formula,
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
is a straight line
Secant value of the tilt angle;
which represents the width of the gray scale of the aluminum pipe to be inspected, in the axial direction of the aluminum pipe, as shown in figure 6,
that is, the transverse direction of the gray scale of the aluminum pipe to be inspected
The width of the shaft. Then the sliding window will be sized parallel to the centerline
Is sized as
(ii) a Subsequently calculating the upper edge straight line of the aluminum pipe
Straight line with lower edge
The width of the aluminum pipe to be detected, namely, the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected is calculated, and the calculation formula is as follows:
in the formula,
indicating the width of the aluminium tube in the grey scale of the aluminium tube to be inspected, i.e. the upper edge straight line
Straight line with lower edge
The width of (d);
finger upper edge
And the lower edge
The absolute value of the intercept difference of (d);
is a straight line
Secant value of the tilt angle; the upper edge can also be used
And the lower edge
Secant value of the linear inclination angle; then the sliding window will be sized perpendicular to the centerline
Is sized as
So that the size of the sliding window is
I.e. 0.01
. The step size is defined as
At the midline of
And the sliding is performed 100 times in total, as shown in figure 6. Wherein,
indicating sliding window orientation
The dimensions of the shaft are such that,
indicating sliding window orientation
The size of the shaft. It should be noted that, in the process of setting the sliding window, 0.01 times of the sliding window is selected
Is to let the length of the aluminium tube in the image
By 100 equal parts, 0.6 times
In order to not consider the part with large distortion close to the two ends and influence the accuracy of the defect, the parts of 30 percent of the middle line are mainly selected to slide the gray-scale image of the aluminum pipe to be detected.
In the embodiment, during the process that the sliding window slides along the central line direction to the gray scale of the aluminum tube to be detected, the parts of the sliding window on the two sides of the central line are symmetrical, and the long side of the sliding window is perpendicular to the central line.
It should be noted that, no matter the pockmark defect or the streamline defect, the appearance in the image after being reflected by the illumination is much darker than that of the non-defect area, and the feedback information is that the gray value of the defect is much lower than that of the surrounding area; therefore, in the process of acquiring the variance of each sliding window, the following is specifically performed:
the operation content of the specified sliding window in the process of sliding the gray scale image of the aluminum pipe to be detected along the central line direction is that the sliding window is designed to be parallel to the central line
Straight line in sliding window
Calculating a straight line
Sliding window
The average gray value calculation formula of each row in the table is as follows:
in the formula,
sliding window with display
Inner first
Parallel first average gray values;
sliding window with display
An axial dimension;
is a sliding window
Inside (A)
The number of line sequences of the size;
is a sliding window
Inside (A)
The number of columns in the size is,
is a sliding window
First, the
Go to the first
Pixel gray value of a column. The main purpose of calculating the average gray value of each line is that because the extruded and produced intact aluminum pipe has no streamline pockmark, the gray value between the upper edge straight line and the lower edge straight line along each line is always stable, if the streamline pockmark appears, the gray distribution of a certain line always has a sudden change condition, and in order to analyze the position of the sudden change part, the gray value of each line in the sliding window is calculated to be used as the basis of defect analysis.
Obtaining a second average gray value of each column in each sliding window in the gray map of the normal aluminum tube without defects according to the analogy; the second average gray value is recorded as
;
Then obtaining the difference value of the average gray value of each row in each sliding window according to the first average gray value and the second average gray value; the calculation formula is as follows:
sliding window with display
Inner first
Difference of line average gray values;
sliding window with display
Inner first
A second average gray value of the line;
sliding window with display
Inner first
A first average gray value of the row; the difference of the average gray values of each row in each sliding window mainly represents the condition of sudden change, if streamline pockmarks exist, the obvious gray value sudden change is caused compared with the intact aluminum tube, and the gray value caused by the streamline pockmarks is reduced, the flaws are dark areas, namely the difference is large, otherwise, the difference is small.
Obtaining the variance of each sliding window according to the difference value of the average gray value of each row in each sliding window; the specific calculation formula of the variance of each sliding window is as follows:
in the formula,
sliding window with display
The variance of (a);
sliding window with display
Inner first
Difference of line average gray values;
sliding window with display
Inner first
The sum and average of the differences of the line average gray values;
sliding window with display
Of sides perpendicular to the centre line, i.e. sliding windows
The axial dimension. And further analyzing the accuracy of whether the surface of the aluminum pipe to be detected has defects through variance calculation, if the surface of the aluminum pipe to be detected has defects, the defects are perfect, the difference of each row is small, otherwise, the larger and smaller conditions exist, and the best index for describing the fluctuation condition is the variance.
S4, judging whether surface flaws exist in the gray scale image of each sliding window corresponding to the aluminum pipe to be detected or not according to the variance of each sliding window;
acquiring all sliding windows with surface flaws; acquiring a defect proportion coefficient according to the number of all sliding windows with surface defects;
whether surface flaws exist in the gray-scale image of each sliding window corresponding to the aluminum pipe to be detected or not is judged according to the following steps:
setting a variance threshold; and when the variance of the sliding window is greater than the variance threshold value, determining that the sliding window has surface defects corresponding to the area in the gray-scale image of the aluminum pipe to be detected.
In this example, the maximum sliding window variance value was obtained after 10 times of this operation for a normal aluminum pipe having no defects
It is defined as a variance threshold. It is to be noted thatThe variance threshold is determined by performing 10 calculations to find the maximum variance, and the analysis error is reduced. Sliding window
Variance value of
Then the existence of surface flaws in the sliding window area is considered; otherwise it is considered that no surface flaws exist therein. For this purpose, by means of statistical sliding windows
In the characteristic value
Is defined as a defective sliding window
Will be
Is defined as
The defect proportion coefficient calculation formula is as follows:
in the formula,
representing a defect proportion coefficient;
all sliding windows indicating the presence of surface flaws
The number of the cells. Therein, provision is made for
Has a minimum tolerance of 0.05 when
It is basically considered that the surface of the aluminum pipe in the image of the aluminum pipe to be detected has obvious streamline pockmark defects. In addition, use
The defect proportion coefficient is mainly used for further describing defect degree characterization, and the defect degree characterization is enabled to be within 0 to 1, wherein the closer to 0, the more defects are, and the closer to 1, the more defects are.
S5, marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient;
and adjusting the temperature in the extrusion production process of the aluminum pipe according to the marked severity of the surface flaws of the aluminum pipe to be detected.
In the present embodiment, in the process of marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw fraction coefficient, when the severity of the surface flaws of the aluminum pipe to be detected is marked
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
(ii) a When in use
Marking the severity of the surface flaws of the aluminum pipe to be detected as
。
Wherein, the label
The severity degree means that the number of streamline pocks is the most, and the streamline pocks account for more than half of the aluminum tubes in the current image; label (R)
The severity degree means that the number of streamline pocks is more and occupies nearly half of the aluminum tube in the image; label (R)
The severity degree means that streamline pocks are common and account for about 20% of the aluminum tubes in the image; label (R)
Severity means a lower number of streamline pocks; label (R)
The severity means that noise such as streamline pockmarks and the like rarely occurs.
In this example, the maximum cooling rate of the cooling device is set to the lower limit of the outlet temperature of 500 ℃
According to the obtained severity of the surface of the aluminum pipe in the image of the aluminum pipe to be detectedThe relevant cooling speed regulation is carried out, and the relevant cooling regulation operation is as follows:
when the temperature in the extrusion production process of the aluminum pipe is adjusted according to the severity of the marking of the surface flaws of the aluminum pipe to be detected,
when the surface of the aluminum pipe to be detected appears
Label, will cool down at maximum rate
Cooling; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.75
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.50
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Label, will be at 0.25
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
The label is not subjected to cooling measures, and only a preset temperature control system is used for regulation and control; wherein,
indicating the maximum cooling rate, which is mainly based on extrusionThe press equipment and the surrounding environment. Based on the method, real-time temperature adjustment is realized according to the severity of the surface defects of the aluminum pipe in the dynamic extrusion production process.
The invention provides a temperature control system based on aluminum pipe surface flaw identification, which comprises:
the image acquisition module is used for acquiring a gray scale image of the aluminum pipe to be detected; acquiring a gray scale image of the normal aluminum pipe; carrying out binarization processing on a gray-scale image of the aluminum pipe to be detected to obtain a binary image of the aluminum pipe to be detected;
the image processing module is used for carrying out edge detection on the binary image to obtain two edge straight lines of the aluminum pipe to be detected; acquiring a central line of the aluminum pipe to be detected according to two edge straight lines of the aluminum pipe to be detected; setting a sliding window according to the length and the width of the aluminum pipe in the gray-scale image of the aluminum pipe to be detected; sequentially sliding the gray scale image of the aluminum pipe to be detected along the central line direction by using the sliding windows to obtain a first average gray scale value of each row in each sliding window in the gray scale image of the aluminum pipe to be detected; obtaining a second average gray value of each line in each sliding window in the gray map of the normal aluminum pipe according to the analogy; acquiring the difference value of the average gray value of each row in each sliding window according to the first average gray value and the second average gray value; obtaining the variance of each sliding window according to the difference value of the average gray value of each row in each sliding window;
the temperature regulation and control module is used for judging whether the gray-scale image of each sliding window corresponding to the aluminum pipe to be detected has surface flaws or not according to the variance of each sliding window; acquiring all sliding windows with surface flaws; acquiring a defect proportion coefficient according to the number of all sliding windows with surface defects; marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient; and adjusting the temperature in the extrusion production process of the aluminum pipe according to the marked severity of the surface flaws of the aluminum pipe to be detected.
In summary, according to the temperature control method and system based on aluminum pipe surface defect identification provided by the invention, the central line of an aluminum pipe in an image of the aluminum pipe to be detected is obtained, the set sliding window is utilized to slide along the central line to traverse and obtain the characteristics of the surface of the aluminum pipe to be detected, in order to accurately identify the defect in the image of the aluminum pipe to be detected, the characteristics of the surface of a normal aluminum pipe without the defect are obtained in the same way, and the defect on the surface of the aluminum pipe to be detected can be effectively identified by performing differential analysis on the image to be detected and the normal image; and meanwhile, the proportion of the surface flaws of the aluminum pipe to be detected can be effectively obtained, the surface of the aluminum pipe is divided into different severity degrees according to the proportion of the surface flaws of the aluminum pipe, and finally the outlet temperature of the aluminum pipe of the extruding machine is regulated and controlled according to the different severity degrees, so that the real-time temperature regulation is realized according to the severity degree of the surface flaws of the aluminum pipe in the dynamic extrusion production process.
According to the temperature control system based on aluminum pipe surface flaw identification, the outlet temperature of the aluminum pipe of the extruder can be cooled and controlled in real time, the phenomenon that streamline pocks appear on the surface of the aluminum pipe in the production process is avoided, and the production efficiency and the qualified rate of the aluminum pipe are effectively improved.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.