CN115049644B - Temperature control method and system based on aluminum pipe surface flaw identification - Google Patents

Temperature control method and system based on aluminum pipe surface flaw identification Download PDF

Info

Publication number
CN115049644B
CN115049644B CN202210964408.5A CN202210964408A CN115049644B CN 115049644 B CN115049644 B CN 115049644B CN 202210964408 A CN202210964408 A CN 202210964408A CN 115049644 B CN115049644 B CN 115049644B
Authority
CN
China
Prior art keywords
aluminum pipe
detected
sliding window
gray
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210964408.5A
Other languages
Chinese (zh)
Other versions
CN115049644A (en
Inventor
王海申
隋丽娟
赵记国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Sanwei New Materials Co ltd
Original Assignee
Shandong Sanwei New Materials Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Sanwei New Materials Co ltd filed Critical Shandong Sanwei New Materials Co ltd
Priority to CN202210964408.5A priority Critical patent/CN115049644B/en
Publication of CN115049644A publication Critical patent/CN115049644A/en
Application granted granted Critical
Publication of CN115049644B publication Critical patent/CN115049644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B21MECHANICAL METAL-WORKING WITHOUT ESSENTIALLY REMOVING MATERIAL; PUNCHING METAL
    • B21CMANUFACTURE OF METAL SHEETS, WIRE, RODS, TUBES OR PROFILES, OTHERWISE THAN BY ROLLING; AUXILIARY OPERATIONS USED IN CONNECTION WITH METAL-WORKING WITHOUT ESSENTIALLY REMOVING MATERIAL
    • B21C31/00Control devices, e.g. for regulating the pressing speed or temperature of metal; Measuring devices, e.g. for temperature of metal, combined with or specially adapted for use in connection with extrusion presses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Mechanical Engineering (AREA)
  • Extrusion Of Metal (AREA)
  • Radiation Pyrometers (AREA)

Abstract

The invention discloses a temperature control method and system based on aluminum pipe surface flaw identification, and belongs to the technical field of image data processing; the method comprises the following steps: acquiring a gray scale image of the aluminum pipe to be detected; and acquiring a gray-scale image of the normal aluminum pipe; acquiring a central line of the aluminum pipe to be detected according to the two straight edge lines of the aluminum pipe to be detected; acquiring a first average gray value of each row in each sliding window in a gray map 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 variance of each sliding window; acquiring a defect proportion coefficient; 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. The outlet temperature of the aluminum pipe of the extruder is effectively regulated and controlled according to the proportion of the surface flaws of the aluminum pipe.

Description

Temperature control method and system based on aluminum pipe surface flaw identification
Technical Field
The invention relates to the technical field of image data processing, in particular to a temperature control method and system based on aluminum pipe surface flaw identification.
Background
The aluminum pipe is generally extruded from pure aluminum or an aluminum alloy into a hollow metal tubular material along the entire length in the longitudinal direction thereof. The technological equipment for extruding the aluminum pipe from the aluminum bar is an aluminum pipe heat extruder, and consists of a transmission extrusion system and a heating and cooling system, wherein program parameter values of the transmission extrusion system cannot be changed at will, and the temperature control of the heating and cooling system is manually assigned by a designed computer program or manually by people according to experience.
The extrusion temperature is a very important condition in the extrusion process, and the plastic deformation force of the extruded metal is increased due to the excessively low temperature, so that the extrusion force is increased and the die is damaged; the excessive temperature can cause the metal viscosity to be increased, the metal viscosity is easy to be bonded with a die, particularly a working tape, partial flow lines and pockmarks appear on the surface of the aluminum pipe, and the finished product rate is reduced. Therefore, when the aluminum pipe is extruded and produced, the surface quality of the extruded aluminum pipe needs to be observed at any time, and then the temperature is correspondingly adjusted, so that the yield is improved. The aluminum tube detection still adopts more manual modes, and the temperature is usually measured every ten minutes, so that the hysteresis is strong, and the environmental requirement is high.
In order to achieve the purpose, a person skilled in the art usually adopts a traditional eddy current detection method, an ultrasonic detection method and other methods to detect the defects on the surface of the aluminum tube, but the traditional method is difficult to carry out clear image display on defect information, cannot accurately judge defect data, is difficult to judge streamline pocks on the surface of the aluminum tube and cannot control the temperature of an extruder in the extrusion process of the aluminum tube; the technical personnel in the field also obtain certain results on the precision of defect detection and the accuracy rate of defect identification by adopting a machine vision technology, namely, the defects on the surface of the aluminum pipe are detected by adopting image enhancement and image segmentation, but the information of the image is usually distorted in the image enhancement process, so that the detection of the surface defects is inaccurate, and further, the control relation between the surface defects of the aluminum pipe and the temperature during the extrusion production of the aluminum pipe is difficult to establish. Therefore, in order to identify the defects on the surface of the aluminum pipe during the extrusion process of the aluminum pipe so as to control the temperature of the extruder, the invention provides a temperature control method and system based on the identification of the defects on the surface of the aluminum pipe.
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 of:
acquiring a gray scale image of the aluminum pipe to be detected; and 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;
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;
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 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 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
Figure 52961DEST_PATH_IMAGE001
(ii) a Wherein,
Figure 377764DEST_PATH_IMAGE002
Figure 685248DEST_PATH_IMAGE003
Figure 277641DEST_PATH_IMAGE004
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
Figure 12379DEST_PATH_IMAGE005
and representing the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected.
In one embodiment, the step length of sliding the sliding window is
Figure 824477DEST_PATH_IMAGE006
In one embodiment, during the sliding of the sliding window along the direction of the central line on the grayscale of the aluminum tube to be detected, the parts of the sliding window on both 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:
Figure DEST_PATH_IMAGE007
in the formula,
Figure 530395DEST_PATH_IMAGE008
sliding window with display
Figure 478759DEST_PATH_IMAGE009
The variance of (a);
Figure 384398DEST_PATH_IMAGE010
sliding window with display
Figure 916748DEST_PATH_IMAGE009
Inner first
Figure 300456DEST_PATH_IMAGE011
Difference of line average gray values;
Figure 634486DEST_PATH_IMAGE012
sliding window with display
Figure 711026DEST_PATH_IMAGE009
Inner first
Figure 996252DEST_PATH_IMAGE011
The sum and average of the differences of the line average gray values;
Figure 183650DEST_PATH_IMAGE013
sliding window with display
Figure 106607DEST_PATH_IMAGE009
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:
Figure 354049DEST_PATH_IMAGE014
(ii) a In the formula,
Figure 126571DEST_PATH_IMAGE015
representing a defect proportion coefficient;
Figure 117660DEST_PATH_IMAGE016
all-sliding window indicating the presence of surface flaws
Figure 36069DEST_PATH_IMAGE017
The number of (c);
marking the severity of the surface flaws of the aluminum pipe to be detected according to the flaw proportion coefficient when
Figure 958806DEST_PATH_IMAGE018
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 454510DEST_PATH_IMAGE019
(ii) a When the temperature is higher than the set temperature
Figure 514870DEST_PATH_IMAGE020
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 146839DEST_PATH_IMAGE021
(ii) a When in use
Figure 500198DEST_PATH_IMAGE022
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 624143DEST_PATH_IMAGE023
(ii) a When the temperature is higher than the set temperature
Figure 222615DEST_PATH_IMAGE024
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 207626DEST_PATH_IMAGE025
(ii) a When in use
Figure 498930DEST_PATH_IMAGE026
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 969225DEST_PATH_IMAGE027
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
Figure 840230DEST_PATH_IMAGE027
Label, will cool down at maximum rate
Figure 945327DEST_PATH_IMAGE028
Cooling; when the surface of the aluminum pipe to be detected appears
Figure 282898DEST_PATH_IMAGE025
Label, will be at 0.75
Figure 709331DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 142281DEST_PATH_IMAGE023
Label, will be at 0.50
Figure 462404DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 564352DEST_PATH_IMAGE021
Label, will be at 0.25
Figure 884606DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 861527DEST_PATH_IMAGE019
Label, will not take cooling measures; wherein,
Figure 177102DEST_PATH_IMAGE028
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; 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; 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 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.
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.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart showing the general steps of an embodiment of a temperature control method based on aluminum pipe surface flaw identification according to the present invention.
FIG. 2 is a gray scale view of the aluminum pipe to be inspected.
FIG. 3 is a gray scale view of a normal aluminum tube without flow-line pocks.
Fig. 4 is a view of edge lines detected in a binary image.
Figure 5 is a view of the two edges of the aluminium tube to be tested, taken in line and in a median line.
Fig. 6 is a simulated view of a sliding window sliding along a midline.
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 extruder, in order to prevent the die from being damaged due to low temperature, the temperature is limited in the process, and the phenomenon of metal adhesion 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 streamline pockmark phenomenon and carry out intelligent cooling is the main problem to be solved by the invention. The extrusion temperature control core has an outlet temperature which is generally 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 an 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 coordinate, using the lower left point of gray image as coordinate origin
Figure 715531DEST_PATH_IMAGE029
Horizontal to the right as a horizontal axis
Figure 116556DEST_PATH_IMAGE030
In the positive direction, the vertical direction is the longitudinal axis
Figure 162748DEST_PATH_IMAGE031
The edge coordinate point is recorded as
Figure 598408DEST_PATH_IMAGE032
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 comprises the following steps: (1) Initialization
Figure 42159DEST_PATH_IMAGE033
The space of the parameters is that of the parameters,
Figure 461639DEST_PATH_IMAGE034
wherein
Figure 780363DEST_PATH_IMAGE035
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
Figure 477054DEST_PATH_IMAGE036
Is/are as follows
Figure 91706DEST_PATH_IMAGE033
Coordinates; (3) Make statistics of all
Figure 971719DEST_PATH_IMAGE035
Size of (2), taking out
Figure 595598DEST_PATH_IMAGE037
The parameter(s) of (a) is,
Figure 740272DEST_PATH_IMAGE038
is a preset threshold; wherein,
Figure 650459DEST_PATH_IMAGE038
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 lines of the aluminum pipe outer edge are required to be eliminated, and only two straight lines of the aluminum pipe outer edge are required. Then, two edge straight lines of the aluminum pipe to be detected are obtained, specifically as follows:
(1) The detected straight line of Hough is common
Figure 513372DEST_PATH_IMAGE039
A strip, each straight line being
Figure 908319DEST_PATH_IMAGE040
Corresponding to the Hough detection voter is
Figure 438658DEST_PATH_IMAGE041
Namely, the obtained hough detection straight line is:
Figure 660692DEST_PATH_IMAGE042
in the formula (I), wherein,
Figure 745323DEST_PATH_IMAGE043
represents the origin to
Figure 350485DEST_PATH_IMAGE039
The distance of the bar lines;
Figure 469751DEST_PATH_IMAGE044
represents the origin to
Figure 862686DEST_PATH_IMAGE039
Perpendicular to the straight line
Figure 198727DEST_PATH_IMAGE030
The included angle of the positive half-cycle of the shaft;
the straight line under the parameter space
Figure 702521DEST_PATH_IMAGE040
The general equation converted into the rectangular coordinate system is as follows:
Figure 676293DEST_PATH_IMAGE045
in the formula, the slope of the straight line
Figure 240130DEST_PATH_IMAGE046
Intercept of
Figure 627966DEST_PATH_IMAGE047
(2) In order to obtain two straight line parts of the upper edge and the lower edge of the aluminum pipe, 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 based on 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 performed based on this phenomenonAnd (6) picking. Recording the width of a gray-scale image of the aluminum pipe to be detected along the axial direction of the aluminum pipe as
Figure 935450DEST_PATH_IMAGE048
Then each abscissa
Figure 29308DEST_PATH_IMAGE030
All the detected straight lines have corresponding longitudinal coordinate values, and the straight lines are counted
Figure 764046DEST_PATH_IMAGE040
The average of the corresponding ordinates of (a) is:
Figure 169620DEST_PATH_IMAGE049
in the formula,
Figure 513751DEST_PATH_IMAGE050
for each abscissa
Figure 603061DEST_PATH_IMAGE030
In a straight line
Figure 367755DEST_PATH_IMAGE040
The ordinate values of (a) and (b),
Figure DEST_PATH_IMAGE051
an average value representing the ordinate values;
Figure 837788DEST_PATH_IMAGE048
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
Figure 221496DEST_PATH_IMAGE040
Average value of the corresponding ordinate of
Figure 289946DEST_PATH_IMAGE052
And a foundation is laid for obtaining two edge straight lines of the aluminum pipe.
(3) Subjecting the obtained
Figure 366486DEST_PATH_IMAGE051
The maximum value of (1) is recorded as
Figure 120554DEST_PATH_IMAGE053
The minimum value is recorded as
Figure 839111DEST_PATH_IMAGE054
. Thereby can be used for
Figure 762067DEST_PATH_IMAGE053
The corresponding straight line is marked as the upper edge straight line
Figure 9509DEST_PATH_IMAGE055
Will be
Figure 397677DEST_PATH_IMAGE054
The corresponding straight line is marked as the lower edge straight line
Figure 388767DEST_PATH_IMAGE056
The rectangular coordinate equations corresponding to the two straight lines are as follows:
Figure 166230DEST_PATH_IMAGE057
Figure 83108DEST_PATH_IMAGE058
wherein,
Figure 578812DEST_PATH_IMAGE059
Figure 108013DEST_PATH_IMAGE060
are respectively straight line
Figure 5562DEST_PATH_IMAGE061
The slope and the intercept of (a) of (b),
Figure 624500DEST_PATH_IMAGE062
Figure 341920DEST_PATH_IMAGE063
is composed of
Figure 674813DEST_PATH_IMAGE064
The method can simultaneously and accurately ensure the slope and the intercept
Figure 426868DEST_PATH_IMAGE055
Is a straight line at the upper edge of the aluminum pipe,
Figure 685549DEST_PATH_IMAGE056
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., nearly parallel
Figure 890265DEST_PATH_IMAGE059
Figure 292428DEST_PATH_IMAGE062
The phase difference is extremely small. However, due to a small error in the real acquisition process, we need to calculate a more stable center line of the aluminum tube, and the linear equation of the center line of the aluminum tube is recorded as follows:
Figure 633410DEST_PATH_IMAGE065
in the formula,
Figure 57133DEST_PATH_IMAGE066
is the center line
Figure 749145DEST_PATH_IMAGE067
The slope of,
Figure 954999DEST_PATH_IMAGE068
Is that
Figure 416067DEST_PATH_IMAGE067
The intercept of (c). Referring to figure 5, there are shown two edge line and centre line views of the aluminium tube to be tested.
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 straight 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
Figure 16550DEST_PATH_IMAGE001
(ii) a Wherein,
Figure 336804DEST_PATH_IMAGE002
Figure 815190DEST_PATH_IMAGE003
Figure 629300DEST_PATH_IMAGE004
indicating the length of an aluminium tube in a grey-scale map of the aluminium tube to be tested;
Figure 167729DEST_PATH_IMAGE005
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:
Figure 427809DEST_PATH_IMAGE069
in the formula,
Figure 709886DEST_PATH_IMAGE004
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
Figure 879967DEST_PATH_IMAGE070
is a straight line
Figure 87832DEST_PATH_IMAGE067
Secant value of the angle of inclination;
Figure 976154DEST_PATH_IMAGE048
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,
Figure 530763DEST_PATH_IMAGE048
that is, the transverse direction of the gray scale of the aluminum pipe to be inspected
Figure 820930DEST_PATH_IMAGE030
The width of the shaft. Then the sliding window will be sized parallel to the centerline
Figure 205556DEST_PATH_IMAGE067
Is sized as
Figure 581174DEST_PATH_IMAGE002
(ii) a Then calculating the straight line of the upper edge of the aluminum pipe
Figure 205053DEST_PATH_IMAGE055
Straight line with lower edge
Figure 349727DEST_PATH_IMAGE056
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:
Figure 899394DEST_PATH_IMAGE071
in the formula,
Figure 762308DEST_PATH_IMAGE005
indicating the width of the aluminium tube in a grey scale image of the aluminium tube to be tested, i.e. the upper edge straight line
Figure 924299DEST_PATH_IMAGE055
Straight line to lower edge
Figure 189058DEST_PATH_IMAGE056
The width of (d);
Figure 909628DEST_PATH_IMAGE072
finger upper edge
Figure 259837DEST_PATH_IMAGE055
And the lower edge
Figure 225519DEST_PATH_IMAGE056
The absolute value of the intercept difference of;
Figure 344785DEST_PATH_IMAGE070
is a straight line
Figure 236256DEST_PATH_IMAGE067
Secant value of the tilt angle; the upper edge can also be used
Figure 808182DEST_PATH_IMAGE055
And the lower edge
Figure 311976DEST_PATH_IMAGE056
Secant value of linear inclination angle; then the sliding window will be sized perpendicular to the midline
Figure 551327DEST_PATH_IMAGE067
Is sized as
Figure 631277DEST_PATH_IMAGE003
So that the size of the sliding window is
Figure 690500DEST_PATH_IMAGE001
I.e. 0.01
Figure 997985DEST_PATH_IMAGE073
. Defining a step size of
Figure 91843DEST_PATH_IMAGE006
At the midline of
Figure 325116DEST_PATH_IMAGE067
And the sliding is performed 100 times in total, as shown in figure 6. Wherein,
Figure 871635DEST_PATH_IMAGE006
indicating sliding window orientation
Figure 717231DEST_PATH_IMAGE030
The dimensions of the shaft are such that,
Figure 665595DEST_PATH_IMAGE013
indicating sliding window orientation
Figure 804190DEST_PATH_IMAGE031
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
Figure 838005DEST_PATH_IMAGE004
Is to let the length of the aluminium tube in the image
Figure 487293DEST_PATH_IMAGE004
By 100 equal parts, 0.6 times
Figure 290163DEST_PATH_IMAGE005
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 a pock defect or a streamline defect, the appearance in the image after being reflected by illumination is much darker than that of an area without defects, and the feedback information is that the gray value of the defects is much lower than that of the surrounding areas; 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
Figure 599660DEST_PATH_IMAGE067
Straight line in sliding window
Figure 386350DEST_PATH_IMAGE074
Calculating a straight line
Figure 104908DEST_PATH_IMAGE074
Sliding window
Figure 762285DEST_PATH_IMAGE009
The average gray value calculation formula of each row in the table is as follows:
Figure DEST_PATH_IMAGE075
in the formula,
Figure 451804DEST_PATH_IMAGE076
sliding window with display
Figure 194632DEST_PATH_IMAGE009
Inner first
Figure 185722DEST_PATH_IMAGE011
Parallel first average gray values;
Figure 461720DEST_PATH_IMAGE006
sliding window with display
Figure 614484DEST_PATH_IMAGE030
An axial dimension;
Figure 375767DEST_PATH_IMAGE011
is a sliding window
Figure 639389DEST_PATH_IMAGE009
Inside of
Figure 769894DEST_PATH_IMAGE013
The number of line sequences of the size;
Figure 624717DEST_PATH_IMAGE077
is a sliding window
Figure 607717DEST_PATH_IMAGE009
Inside (A)
Figure 206188DEST_PATH_IMAGE006
The number of columns in the size is given,
Figure 456779DEST_PATH_IMAGE078
is a sliding window
Figure 357870DEST_PATH_IMAGE009
First, the
Figure 562586DEST_PATH_IMAGE011
Go to the first
Figure 191845DEST_PATH_IMAGE077
Pixel gray values of the columns. The main purpose of calculating the average gray value of each line is that the extruded aluminum tube is not goodThe gray values of the upper edge line and the lower edge line along each line are stable, if the streamline pockmark appears, the gray distribution of a certain line is in a sudden change condition, and in order to analyze the position of a 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 row in each sliding window in a gray scale image of the normal aluminum pipe without defects according to the analogy; the second average gray value is recorded as
Figure 798407DEST_PATH_IMAGE079
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:
Figure 729454DEST_PATH_IMAGE080
Figure 421467DEST_PATH_IMAGE010
sliding window with display
Figure 594697DEST_PATH_IMAGE009
Inner first
Figure 55765DEST_PATH_IMAGE011
Difference of line mean gray values;
Figure 423293DEST_PATH_IMAGE079
sliding window with display
Figure 602601DEST_PATH_IMAGE009
Inner first
Figure 313943DEST_PATH_IMAGE011
A second average gray value of the line;
Figure 895097DEST_PATH_IMAGE076
sliding window with display
Figure 27001DEST_PATH_IMAGE009
Inner first
Figure 693606DEST_PATH_IMAGE011
A first average gray value of the row; the difference of the average gray value of each row in each sliding window mainly represents the sudden change condition, if streamline pockmarks exist, the obvious gray value sudden change is caused compared with the intact aluminum pipe, and the gray value caused by the streamline pockmarks is reduced, the flaw is a dark area, namely the difference is large, otherwise, the difference is small.
Then 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 variance of each sliding window is calculated as follows:
Figure 349584DEST_PATH_IMAGE007
in the formula,
Figure 644299DEST_PATH_IMAGE008
sliding window with display
Figure 353629DEST_PATH_IMAGE009
The variance of (a);
Figure 241951DEST_PATH_IMAGE010
sliding window with display
Figure 62139DEST_PATH_IMAGE009
Inner first
Figure 856701DEST_PATH_IMAGE011
Difference of line mean gray values;
Figure 736932DEST_PATH_IMAGE012
sliding window with display
Figure 253495DEST_PATH_IMAGE009
Inner first
Figure 470850DEST_PATH_IMAGE011
The sum and average of the differences of the line average gray values;
Figure 379638DEST_PATH_IMAGE013
sliding window with display
Figure 571716DEST_PATH_IMAGE009
Of sides perpendicular to the centre line, i.e. sliding windows
Figure 293684DEST_PATH_IMAGE031
The axial dimension. And further analyzing the accuracy of whether the surface of the aluminum pipe to be detected has defects or not through calculating the variance, if the surface of the aluminum pipe to be detected has defects, the defect is small after each row is subjected to difference, otherwise, the situation is large and small, and the best index for describing the fluctuation situation 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 on 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
Figure 455675DEST_PATH_IMAGE081
It is defined as a variance threshold. The variance threshold is determined by performing 10 operations to find the maximum variance, and the analysis error is reduced. Sliding window
Figure 953390DEST_PATH_IMAGE009
Variance value of
Figure 175424DEST_PATH_IMAGE082
Then the existence of surface flaws in the sliding window area is considered; otherwise it is considered that there are no surface flaws therein. For this purpose, by means of statistical sliding windows
Figure 525634DEST_PATH_IMAGE009
In the characteristic value
Figure 491316DEST_PATH_IMAGE082
Is defined as a defective sliding window
Figure 109117DEST_PATH_IMAGE017
Will be
Figure 236473DEST_PATH_IMAGE017
Is defined as
Figure 808400DEST_PATH_IMAGE016
The defect proportion coefficient calculation formula is as follows:
Figure DEST_PATH_IMAGE083
in the formula,
Figure 31569DEST_PATH_IMAGE015
representing a defect proportion coefficient;
Figure 270920DEST_PATH_IMAGE016
all-sliding window indicating the presence of surface flaws
Figure 569178DEST_PATH_IMAGE017
The number of the cells. Therein, provision is made for
Figure 893980DEST_PATH_IMAGE015
Has a minimum tolerance of 0.05 when
Figure 434420DEST_PATH_IMAGE084
It is basically considered that the aluminum tube surface in the image of the aluminum tube to be detected has a relatively obvious flow line pock defect. In addition, use
Figure 528278DEST_PATH_IMAGE085
The defect proportion coefficient is expressed mainly for further describing the defect degree characterization, so that the defect degree characterization is within 0 to 1, and the closer to 0, the more defect is, the closer to 1, the more defect is.
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 severity of the surface flaws of the marked to-be-detected aluminum pipe.
In this embodiment, in the process of marking the severity of the surface defect of the aluminum pipe to be detected based on the defect proportion coefficient, when the defect proportion coefficient is greater than the threshold value
Figure 263016DEST_PATH_IMAGE018
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 543956DEST_PATH_IMAGE019
(ii) a When in use
Figure 153666DEST_PATH_IMAGE020
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 102031DEST_PATH_IMAGE021
(ii) a When in use
Figure 7670DEST_PATH_IMAGE022
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 307064DEST_PATH_IMAGE023
(ii) a When the temperature is higher than the set temperature
Figure 189307DEST_PATH_IMAGE024
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 992178DEST_PATH_IMAGE025
(ii) a When in use
Figure 68719DEST_PATH_IMAGE026
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 589830DEST_PATH_IMAGE027
Wherein, the label
Figure 281623DEST_PATH_IMAGE027
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)
Figure 204580DEST_PATH_IMAGE025
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)
Figure 452022DEST_PATH_IMAGE023
The severity degree means that streamline pocks are common and account for about 20% of the aluminum tubes in the image; label (R)
Figure 460429DEST_PATH_IMAGE021
Severity means a lower number of streamline pocks; label (R)
Figure 950054DEST_PATH_IMAGE019
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 ℃
Figure 727517DEST_PATH_IMAGE028
And carrying out related cooling speed adjustment according to the severity of the surface of the aluminum pipe in the obtained image of the aluminum pipe to be detected, wherein the related cooling adjustment 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
Figure 145860DEST_PATH_IMAGE027
Label, will cool down at maximum rate
Figure 110405DEST_PATH_IMAGE028
Cooling; when the surface of the aluminum pipe to be detected appears
Figure 669300DEST_PATH_IMAGE025
Label, will be at 0.75
Figure 301270DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 890514DEST_PATH_IMAGE023
Label, will be at 0.50
Figure 607934DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 439362DEST_PATH_IMAGE021
Label, will be at 0.25
Figure 925838DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 951563DEST_PATH_IMAGE019
The label only needs a preset temperature control system to regulate and control without taking cooling measures; wherein,
Figure 156279DEST_PATH_IMAGE028
the maximum cooling rate is indicated, which is mainly determined by the extruder 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; and 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 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 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 severity of the surface flaws of the marked to-be-detected aluminum pipe.
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.

Claims (10)

1. A temperature control method based on aluminum pipe surface flaw identification is characterized by comprising 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 the two straight edge 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 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;
adjusting the temperature in the extrusion production process of the aluminum pipe according to the severity of the surface flaws of the marked aluminum pipe to be detected;
the defect proportion coefficient calculation formula is as follows:
Figure 800677DEST_PATH_IMAGE001
(ii) a In the formula,
Figure 569919DEST_PATH_IMAGE002
representing a defect proportion coefficient;
Figure 419451DEST_PATH_IMAGE003
all-sliding window indicating the presence of surface flaws
Figure 315863DEST_PATH_IMAGE004
The number of the cells.
2. The temperature control method based on aluminum pipe surface flaw identification as recited in claim 1, wherein the sliding window is set in accordance with the steps of:
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
Figure 564310DEST_PATH_IMAGE005
(ii) a Wherein,
Figure 520765DEST_PATH_IMAGE006
Figure 854663DEST_PATH_IMAGE007
Figure 538454DEST_PATH_IMAGE008
representing the length of the aluminum pipe in the gray scale image of the aluminum pipe to be detected;
Figure 657720DEST_PATH_IMAGE009
and the width of the aluminum pipe in the gray scale image of the aluminum pipe to be detected is shown.
3. The temperature control method based on aluminum pipe surface flaw identification as recited in claim 2, wherein the step size of the sliding window sliding is
Figure 783413DEST_PATH_IMAGE010
4. The temperature control method based on aluminum pipe surface defect identification as recited in claim 1, wherein during sliding of the sliding window along the direction of the center line on the gray scale of the aluminum pipe to be detected, the sliding window is symmetrical in portions on both sides of the center line, and the long side of the sliding window is perpendicular to the center line.
5. The temperature control method based on aluminum pipe surface flaw identification as recited in claim 1, wherein the variance of each of the sliding windows is calculated by the following formula:
Figure DEST_PATH_IMAGE011
in the formula,
Figure 276711DEST_PATH_IMAGE012
sliding window with display
Figure 764193DEST_PATH_IMAGE013
The variance of (a);
Figure 456074DEST_PATH_IMAGE014
sliding window with display
Figure 754332DEST_PATH_IMAGE013
Inner first
Figure 65752DEST_PATH_IMAGE015
Difference of line average gray values;
Figure 107657DEST_PATH_IMAGE016
sliding window with display
Figure 450783DEST_PATH_IMAGE013
Inner first
Figure 185521DEST_PATH_IMAGE015
The sum and average of the difference values of the line average gray values;
Figure 981307DEST_PATH_IMAGE017
sliding window with display
Figure 826903DEST_PATH_IMAGE013
Middle perpendicular to the side of the midline.
6. The temperature control method based on aluminum pipe surface defect identification as recited in claim 1, wherein the presence or absence of surface defects in each of the sliding windows corresponding to the gray scale map of the aluminum pipe to be inspected 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.
7. The temperature control method based on aluminum pipe surface defect recognition as recited in claim 1, wherein, in marking the severity of the aluminum pipe surface defect to be detected based on the defect proportion coefficient, when the severity of the aluminum pipe surface defect to be detected is marked
Figure 24535DEST_PATH_IMAGE018
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 916793DEST_PATH_IMAGE019
(ii) a When in use
Figure 685028DEST_PATH_IMAGE020
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 52425DEST_PATH_IMAGE021
(ii) a When in use
Figure 855296DEST_PATH_IMAGE022
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 915524DEST_PATH_IMAGE023
(ii) a When in use
Figure 154745DEST_PATH_IMAGE024
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 76564DEST_PATH_IMAGE025
(ii) a When in use
Figure 720560DEST_PATH_IMAGE026
Marking the severity of the surface flaws of the aluminum pipe to be detected as
Figure 951690DEST_PATH_IMAGE027
8. The temperature control method based on aluminum pipe surface flaw identification as recited in claim 7, wherein when the temperature during the aluminum pipe extrusion production process is adjusted in accordance with the degree of severity of marking the surface flaws of the aluminum pipe to be detected, when the surface of the aluminum pipe to be detected appears
Figure 694518DEST_PATH_IMAGE027
Label, will cool down at maximum rate
Figure 934875DEST_PATH_IMAGE028
Cooling; when the surface of the aluminum pipe to be detected appears
Figure 430448DEST_PATH_IMAGE025
Label, will be at 0.75
Figure 583211DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 522656DEST_PATH_IMAGE023
Label, will be at 0.50
Figure 35545DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 385624DEST_PATH_IMAGE021
Label, will be at 0.25
Figure 443710DEST_PATH_IMAGE028
Cooling at a cooling speed; when the surface of the aluminum pipe to be detected appears
Figure 410398DEST_PATH_IMAGE019
Label, will not take cooling measures; wherein,
Figure 729908DEST_PATH_IMAGE028
indicating the maximum cooling rate.
9. The temperature control method based on aluminum pipe surface flaw identification as recited in claim 1, wherein the two edge straight lines of the aluminum pipe to be detected are obtained by performing edge detection on a 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.
10. 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 the two straight edge 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 regulating and controlling module is used for judging whether surface defects 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; adjusting the temperature in the extrusion production process of the aluminum pipe according to the severity of the surface flaws of the marked aluminum pipe to be detected;
the defect proportion coefficient calculation formula is as follows:
Figure 419647DEST_PATH_IMAGE001
(ii) a In the formula,
Figure 429060DEST_PATH_IMAGE002
representing a defect proportion coefficient;
Figure 351885DEST_PATH_IMAGE003
all-sliding window indicating the presence of surface flaws
Figure 957310DEST_PATH_IMAGE004
The number of the cells.
CN202210964408.5A 2022-08-12 2022-08-12 Temperature control method and system based on aluminum pipe surface flaw identification Active CN115049644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210964408.5A CN115049644B (en) 2022-08-12 2022-08-12 Temperature control method and system based on aluminum pipe surface flaw identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210964408.5A CN115049644B (en) 2022-08-12 2022-08-12 Temperature control method and system based on aluminum pipe surface flaw identification

Publications (2)

Publication Number Publication Date
CN115049644A CN115049644A (en) 2022-09-13
CN115049644B true CN115049644B (en) 2022-11-01

Family

ID=83166418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210964408.5A Active CN115049644B (en) 2022-08-12 2022-08-12 Temperature control method and system based on aluminum pipe surface flaw identification

Country Status (1)

Country Link
CN (1) CN115049644B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115311294B (en) * 2022-10-12 2023-03-24 启东金耀億华玻纤材料有限公司 Glass bottle body flaw identification and detection method based on image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014032058A (en) * 2012-08-02 2014-02-20 Jfe Steel Corp Surface defect inspection method
CN110428408A (en) * 2019-07-31 2019-11-08 工极智能科技(苏州)有限公司 Flaw detection method based on ELM-in-ELM
CN113012153A (en) * 2021-04-30 2021-06-22 武汉纺织大学 Aluminum profile flaw detection method
CN113325001A (en) * 2021-04-12 2021-08-31 浙江花园新能源有限公司 Automatic distinguishing and detecting equipment and method for surface appearance flaws of copper foil

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10546207B2 (en) * 2016-04-11 2020-01-28 North Carolina Agricultural And Technical State University Normalized defect characterization of pulse thermographic nondestructive evaluation
CN108931531B (en) * 2017-05-24 2021-10-22 香港纺织及成衣研发中心 Method, system and computer readable storage medium for automatically detecting fabric defects
CN112927189A (en) * 2021-01-28 2021-06-08 江苏大学 Method for eliminating edge reflection light spots in visual inspection of surface flaws of electroplated workpiece
CN113838043A (en) * 2021-09-30 2021-12-24 杭州百子尖科技股份有限公司 Machine vision-based quality analysis method in metal foil manufacturing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014032058A (en) * 2012-08-02 2014-02-20 Jfe Steel Corp Surface defect inspection method
CN110428408A (en) * 2019-07-31 2019-11-08 工极智能科技(苏州)有限公司 Flaw detection method based on ELM-in-ELM
CN113325001A (en) * 2021-04-12 2021-08-31 浙江花园新能源有限公司 Automatic distinguishing and detecting equipment and method for surface appearance flaws of copper foil
CN113012153A (en) * 2021-04-30 2021-06-22 武汉纺织大学 Aluminum profile flaw detection method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Virtual-sample-based defect detection algorithm for aluminum tube surface;Ning Lang 等;《IOP》;20210504;第1-12页 *
基于Gaussian-yolov3的铝型材表面缺陷检测;文生平等;《计算机测量与控制》;20200925(第09期);第94-99页 *
基于模式识别的零件表面瑕疵图像提取的设计与实现;代小红等;《表面技术》;20111010(第05期);第116-119页 *

Also Published As

Publication number Publication date
CN115049644A (en) 2022-09-13

Similar Documents

Publication Publication Date Title
CN110672617A (en) Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN114943739B (en) Aluminum pipe quality detection method
CN115063423B (en) Self-adaptive identification method for cold and hot cracks of mechanical castings based on computer vision
WO2023168972A1 (en) Linear array camera-based copper surface defect detection method and apparatus
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN114972203A (en) Mechanical part rolling abnormity detection method based on watershed segmentation
CN115049644B (en) Temperature control method and system based on aluminum pipe surface flaw identification
CN115018827B (en) Automatic detection method for quality of building material weld joint
CN112614105B (en) Depth network-based 3D point cloud welding spot defect detection method
CN110689524B (en) No-reference online image definition evaluation method and system
CN113177924A (en) Industrial production line product flaw detection method
CN111753794A (en) Fruit quality classification method and device, electronic equipment and readable storage medium
CN116563277B (en) Machine vision-based copper-clad aluminum surface defect detection method and system
CN114972230A (en) Method and system for detecting defects of circuit board on production line
CN115330796B (en) Copper wire tinning defect identification method
CN110781913A (en) Zipper cloth belt defect detection method
CN115294109A (en) Real wood board production defect identification system based on artificial intelligence, and electronic equipment
CN117350967B (en) Optical detection-based wafer appearance defect detection system and method
CN112683166B (en) Die-cutting product size detection method
CN116091506B (en) Machine vision defect quality inspection method based on YOLOV5
CN111192261A (en) Method for identifying lens defect types
CN111062939B (en) Method for rapidly screening quality of strip steel surface and automatically extracting defect characteristics
CN115330769B (en) Defect detection method for aluminum pipe surface scratching and indentation
CN114998346B (en) Waterproof cloth quality data processing and identifying method
CN210773933U (en) Product appearance on-line measuring device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant