CN113962997B - Strip steel edge crack defect detection method and system based on image processing - Google Patents

Strip steel edge crack defect detection method and system based on image processing Download PDF

Info

Publication number
CN113962997B
CN113962997B CN202111583191.5A CN202111583191A CN113962997B CN 113962997 B CN113962997 B CN 113962997B CN 202111583191 A CN202111583191 A CN 202111583191A CN 113962997 B CN113962997 B CN 113962997B
Authority
CN
China
Prior art keywords
defect
strip steel
edge
sliding window
offset angle
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
CN202111583191.5A
Other languages
Chinese (zh)
Other versions
CN113962997A (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.)
Wuhan Tongshunyuan Steel Structure Steel Mould Co ltd
Original Assignee
Wuhan Tongshunyuan Steel Structure Steel Mould 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 Wuhan Tongshunyuan Steel Structure Steel Mould Co ltd filed Critical Wuhan Tongshunyuan Steel Structure Steel Mould Co ltd
Priority to CN202111583191.5A priority Critical patent/CN113962997B/en
Publication of CN113962997A publication Critical patent/CN113962997A/en
Application granted granted Critical
Publication of CN113962997B publication Critical patent/CN113962997B/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
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • 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)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Chemical & Material Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the field of artificial intelligence, in particular to a strip steel edge crack defect detection method based on image processing, which comprises the following steps: acquiring a strip steel image; obtaining the edge of the strip steel; carrying out sliding window traversal on the strip steel edge, and obtaining the offset angle of the middle pixel in each sliding window by using the position information of the pixel point in each sliding window; calculating the variance of the offset angle sequences of all the intermediate pixels and the horizontal direction, and judging whether the edge of the strip steel has defects or not according to the variance; clustering all middle pixels of the edge with the defects of the strip steel and the offset angle in the horizontal direction to obtain a normal class and a defect class; sequencing all deviation angles in the defect classes, dividing the defect classes according to the continuity of all deviation angles to obtain all defect areas, and further determining the defect positions; and cutting the strip steel according to the defect depth of the defect position. The method is used for detecting the edge crack defect of the strip steel, and the accuracy of the edge crack defect detection can be improved through the method.

Description

Strip steel edge crack defect detection method and system based on image processing
Technical Field
The invention relates to the field of artificial intelligence, in particular to a method and a system for detecting edge crack defects of strip steel based on artificial intelligence and image processing.
Background
The zigzag edge crack is a serious edge defect, which means that one side or two sides of the strip steel edge part are cracked and damaged, the appearance and the appearance of the strip steel are mainly zigzag, namely V-shaped, and some strip steel are Y-shaped. The existence of edge crack not only affects the quality of the steel strip, but also can cause strip breakage in serious cases, and the continuous damage of the roller, which interferes the normal processing of the subsequent procedures, further causes the reduction of production yield and causes great economic loss for enterprises. Therefore, the edge crack defect detection of the strip steel is indispensable.
At present, the means for detecting the edge crack defect of the strip steel is mainly manual detection or defect detection by matching with a standard image. The manual detection is to detect the strip steel after each secondary production according to the experience of operators; and the step of matching with the standard image is to match the strip steel to be detected with the obtained standard image so as to detect the defects.
However, the manual detection mode depends on subjectivity, the detection efficiency is low, and the accuracy is not high; meanwhile, in the actual processing process, due to the interference of environmental factors such as illumination and the like and different surface conditions of the strip steel in the processing process, the matching of all images to be detected is difficult to realize only through the standard images. Therefore, a method for improving the accuracy and efficiency of detecting the edge crack defect of the strip steel is needed.
Disclosure of Invention
The invention provides a strip steel edge crack defect detection method based on image processing, which comprises the following steps: acquiring a strip steel image; obtaining the edge of the strip steel; carrying out sliding window traversal on the strip steel edge, and obtaining the offset angle of the middle pixel in each sliding window by using the position information of the pixel point in each sliding window; calculating the variance of the offset angle sequences of all the intermediate pixels and the horizontal direction, and judging whether the edge of the strip steel has defects or not according to the variance; clustering all middle pixels of the edge with the defects of the strip steel and the offset angle in the horizontal direction to obtain a normal class and a defect class; sequencing all deviation angles in the defect classes, dividing the defect classes according to the continuity of all deviation angles to obtain all defect areas, and further determining the defect positions; compared with the prior art, the method has the advantages that the edge information of the strip steel is obtained by processing the acquired surface image of the strip steel by using the computer vision, the defect position is determined according to the change condition of the included angle between the edge point and the horizontal direction, the defect degree is evaluated to determine the trimming depth in the subsequent trimming process, the accuracy of detecting the edge crack defect of the strip steel can be effectively improved, and the resource waste is reduced.
In order to achieve the purpose, the invention adopts the following technical scheme that the strip steel edge crack defect detection method based on image processing comprises the following steps:
and acquiring a strip steel area image.
And carrying out edge detection on the strip steel area image to obtain the strip steel edge.
And traversing the sliding window on the edge of the strip steel, and obtaining the offset angle of the middle pixel point in the sliding window by using the position information of the pixel point in each sliding window.
And calculating the variance of the offset angle sequences of all the intermediate pixel points, and judging whether the edge of the strip steel has defects or not according to the variance.
And clustering the offset angles of all intermediate pixel points of the edge with the defect of the strip steel to obtain a normal class and a defect class.
And sequencing all the offset angles in the defect classes according to the sequence of the sliding window, dividing the defect classes according to the continuity of all the offset angles to obtain all the defect areas, and determining the defect positions according to all the defect areas.
And obtaining the defect depth according to the maximum value and the minimum value of the ordinate of the edge pixel point corresponding to the defect position.
And determining the trimming depth of the strip steel according to the defect depth.
And cutting the strip steel according to the depth of the cut edge.
Further, in the method for detecting the band steel edge crack defect based on image processing, the offset angle of the middle pixel point in the sliding window is obtained according to the following mode:
and (4) performing sliding window traversal on the edge of the strip steel from left to right, and taking the last pixel point in the sliding window every time as the initial pixel point of the next sliding window to obtain all the sliding windows.
And obtaining a middle pixel point and a corresponding vector thereof according to the coordinates of all the pixel points in each sliding window.
And calculating the offset angle of each vector and the unit vector in the horizontal direction to obtain the offset angle of the middle pixel point in the sliding window.
Further, in the method for detecting the band steel edge crack defect based on image processing, the expression of the offset angle of the middle pixel point in the sliding window is as follows:
Figure DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 932703DEST_PATH_IMAGE002
is the offset angle of the middle pixel point in the ith sliding window and the horizontal direction,
Figure DEST_PATH_IMAGE003
the vectors corresponding to the middle pixel points in the ith sliding window,
Figure 628127DEST_PATH_IMAGE004
is a unit vector in the horizontal direction,
Figure DEST_PATH_IMAGE005
is the ordinate of the starting pixel point of the ith sliding window,
Figure 197648DEST_PATH_IMAGE006
and the ordinate of the middle pixel point in the ith sliding window.
Further, the strip steel edge crack defect detection method based on image processing is characterized in that the defect types are obtained according to the following modes:
and clustering absolute values of the offset angles of all intermediate pixel points of the edge with the defect of the band steel to obtain two clustering results.
And respectively calculating the mean values of the two clustering results, wherein the class with the larger mean value is the defect class.
Further, according to the strip steel edge crack defect detection method based on image processing, all defect areas are obtained according to the following mode:
all offset angles in the defect class are sorted.
Acquiring two adjacent offset angles of a first offset angle in the offset angle sequence in the defect class, judging whether the two adjacent offset angles belong to the defect class, and dividing the adjacent offset angles belonging to the defect class and the first offset angle into a region.
Judging whether the adjacent offset angle of the newly-included area in the offset angle sequence belongs to the defect class or not, including the adjacent offset angle belonging to the defect class in the area to obtain an updated area, and repeating the steps until the offset angle of the newly-included area is stopped when the adjacent offset angle does not belong to the defect class or is included in the area in the offset angle sequence, so as to obtain the first defect area and the residual offset angle of the defect class.
And dividing the residual offset angles of the defect types according to a method for obtaining a first defect area to obtain all preliminarily divided defect areas.
And sequencing all the preliminarily divided defect areas, and combining all the defect areas according to the positive and negative conditions of the deviation angle values in all the sequenced defect areas to obtain all the defect areas.
Further, according to the strip steel edge crack defect detection method based on image processing, the process of merging each defect area is as follows:
and judging the deviation angle value in each sorted defect area.
If all the deviation angle values in the defect area are greater than 0, merging the defect area with the previous defect area.
If all the deviation angle values in the defect area are less than 0, merging the defect area with the next defect area.
If the deviation angle values in the defect area are some larger than 0 and some smaller than 0, no processing is required.
Further, the strip steel edge crack defect detection method based on image processing comprises the following steps of:
and obtaining the depth of each defect according to the maximum value and the minimum value of the ordinate of the edge point of each defect position.
And acquiring the specification of the strip steel close to the current type of the strip steel, and acquiring the width of the strip steel under the specification.
And determining the depth of the trimming edge according to the width of the strip steel under the specification of the strip steel and the depth of each defect.
And cutting the strip steel according to the depth of the cut edge.
The invention has the beneficial effects that:
according to the invention, the computer vision is utilized, the acquired surface image of the strip steel is processed to obtain the edge information of the strip steel, the defect position is determined according to the change condition of the included angle between the edge point and the horizontal direction, and the defect degree is evaluated to determine the trimming depth in the subsequent trimming process, so that the accuracy of detecting the edge crack defect of the strip steel can be effectively improved, and the resource waste is reduced.
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 schematic flow chart of a strip steel edge crack defect detection method provided in embodiment 1 of the present invention;
FIG. 2 is a schematic flow chart of a strip steel edge crack defect detection method provided in embodiment 2 of the present invention;
FIG. 3 is a schematic view of a strip edge crack defect provided in embodiment 2 of the present invention;
FIG. 4 is a strip steel edge crack defect edge detection diagram provided in embodiment 2 of the present invention;
fig. 5 is a block diagram of a strip steel edge crack defect detection system provided in embodiment 3 of the present invention.
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.
Example 1
The embodiment provides a strip steel edge crack defect detection method based on image processing, as shown in fig. 1, including:
s101, acquiring a strip steel area image.
The strip steel area image is obtained by performing semantic segmentation on the strip steel image at the inlet of the coiling machine.
S102, carrying out edge detection on the strip steel area image to obtain the strip steel edge.
Wherein, the edge detection is carried out by using a Canny operator.
S103, carrying out sliding window traversal on the strip steel edge, and obtaining the offset angle of the middle pixel point in each sliding window by using the position information of the pixel point in each sliding window.
And the position information of the pixel points in each sliding window refers to the coordinates of all the pixel points.
And S104, calculating the variance of the offset angle sequences of all the intermediate pixel points, and judging whether the edge of the strip steel has defects or not according to the variance.
Wherein, the smaller the variance, the smaller the fluctuation degree of the offset angle.
S105, clustering the offset angles of all middle pixel points of the edge with the defect of the band steel to obtain a normal class and a defect class.
The process of separating a collection of physical or abstract objects into classes composed of similar objects is referred to herein as clustering.
S106, sequencing all the offset angles in the defect classes according to the sliding window sequence, dividing the defect classes according to the continuity of all the offset angles to obtain all the defect areas, and determining the defect positions according to all the defect areas.
Wherein each defective area corresponds to a defective position.
And S107, obtaining the defect depth according to the maximum value and the minimum value of the vertical coordinate of the edge pixel point corresponding to the defect position.
And the defect depth is obtained by subtracting the maximum value and the minimum value of the vertical coordinate of the edge pixel point.
And S108, determining the trimming depth of the strip steel according to the defect depth.
And determining the strip steel trimming depth according to the maximum value of the edge defect depth.
And S109, cutting the strip steel according to the trimming depth.
Wherein, the cutting mode is determined according to the edge crack depth.
The beneficial effect of this embodiment lies in:
in the embodiment, the edge information of the strip steel is obtained by processing the acquired surface image of the strip steel by using computer vision, the defect position is determined according to the change condition of the included angle between the edge point and the horizontal direction, and the defect degree is evaluated to determine the trimming depth in the subsequent trimming process, so that the accuracy of detecting the edge crack defect of the strip steel can be effectively improved, and the resource waste is reduced.
Example 2
The method mainly aims to obtain edge information of the strip steel by processing the acquired surface image of the strip steel by using computer vision, determine the position of a defect according to the change condition of an included angle between an edge point and the horizontal direction, and evaluate the defect degree so as to determine the trimming depth in the subsequent trimming process and reduce resource waste.
The embodiment provides a strip steel edge crack defect detection method based on image processing, as shown in fig. 2, including:
s201, acquiring a strip steel area image.
After the strip steel enters the inlet of the coiling machine, a camera is used for collecting the surface image of the strip steel, the image is processed, and the edge crack defect is further detected according to the characteristic information in the image. The edge crack defect is shown in fig. 3.
Although the strip steel is cooled before entering the coiler, the temperature of the strip steel is still high, so an industrial camera is used for image acquisition; adjusting the focal length of a camera according to the width of a conveying roller on the current production line and by combining the camera imaging principle, so that the length of the visual field in the image corresponds to the width of the conveying roller; determining the sampling frequency of the camera by combining the transmission speed of the strip steel on the conveying roller;
because the width of the transmission roller in the actual production process is slightly greater than the width of the strip steel, and when the widths of the processed strip steel are different, the acquired image comprises the processing environment and the strip steel image to be detected, the DNN is firstly used for identifying the strip steel image to be detected in the acquired image, and the specific operations are as follows:
1) inputting an RGB image acquired by a camera, and performing semantic segmentation on the RGB image by using a DNN network;
2) the network structure is an Encoder-Decoder structure, and the data set is various types of strip steel images;
3) the labels are divided into two categories, strip steel and background. The method is pixel-level classification, that is, all pixels in an image need to be labeled with corresponding labels. Pixels belonging to the strip steel, the value of which is marked as 1, pixels belonging to the background, the value of which is marked as 0;
4) the loss function used by the network is a cross entropy loss function.
In the embodiment, the mask image after semantic segmentation is retained, and the mask image is further processed in the subsequent process;
thus, a mask image of the strip steel area is obtained.
S202, determining the upper edge and the lower edge of the strip steel.
Because the semantic segmentation mask image covers the detailed information in the strip steel image, the edge information of the strip steel can be obtained by directly carrying out edge detection on the semantic segmentation mask image; the specific process is as follows:
1. establishing a rectangular coordinate system by taking the lower left corner of the whole image as an origin;
2. carrying out edge detection on the obtained shade image by using a Canny operator, wherein the obtained gradient edge is the edge of the strip steel; because the edges detected by the Canny operator are usually discontinuous, the edge connection needs to be carried out by closed operation;
3. because edge cracks are likely to exist on the edges of the two sides of the strip steel, the edge pixel points on the two sides of the strip steel need to be respectively processed, the obtained edge pixel points are divided into two groups according to the ordinate of the central point of the image, wherein the edge points of which the ordinate is greater than the ordinate of the central point are divided into one group which is marked as
Figure DEST_PATH_IMAGE007
The edge points with ordinate less than the ordinate of the center point are divided into a group and recorded as
Figure 738351DEST_PATH_IMAGE008
Respectively corresponding to the upper edge and the lower edge of the strip steel.
S203, obtaining the angle deviation situation relative to the horizontal direction according to the vector formed by the adjacent edge points.
Because the edge of the hot-rolled strip steel is not completely straight, small fluctuation exists between adjacent edge points, when edge crack occurs to the strip steel, the degree of the offset angle of the pixel points opposite to the edge crack area relative to the horizontal direction is increased, and the included angle of the edge crack starting position relative to the horizontal direction is suddenly changed, so that the edge crack defect can be detected according to the condition that the included angle of the edge pixel points and the horizontal direction is offset, and the edge detection result of the mask image of the edge crack defect is shown in fig. 4.
Treating two groups of edge points separately, i.e. groups, with the upper edge of the strip
Figure 178559DEST_PATH_IMAGE007
For example, the specific process is as follows:
1. traversing the edge points from left to right, obtaining a vector by every five adjacent edge points, and recording the coordinates of the initial edge point as
Figure DEST_PATH_IMAGE009
Obtaining the coordinate of the middle pixel point according to the average value of the horizontal and vertical coordinates of the five edge pixel points, and recording the coordinate as the coordinate
Figure 779305DEST_PATH_IMAGE010
The vector thus obtained
Figure DEST_PATH_IMAGE011
(ii) a Calculating the offset angle of the vector and the horizontal direction
Figure 334658DEST_PATH_IMAGE002
:
Figure 147893DEST_PATH_IMAGE001
Wherein
Figure 177029DEST_PATH_IMAGE004
Is a unit in the horizontal directionThe vector of the vector is then calculated,
Figure 745414DEST_PATH_IMAGE012
2. taking the last pixel point of the five edge pixel points as an initial edge point, obtaining a new vector by the four edge pixel points communicated with the initial edge point, and obtaining the offset angle of the vector relative to the horizontal direction by using the method in the operation 1;
3. repeating the above operations, and discarding the rest pixels when the pixels in the last group are smaller than two pixels; using the residual pixel points as a group until the group is processed
Figure 227211DEST_PATH_IMAGE007
All the pixel points in (1), thereby obtaining a group
Figure 844137DEST_PATH_IMAGE007
Offset angle sequence of each edge point in the sequence
Figure DEST_PATH_IMAGE013
Figure 524517DEST_PATH_IMAGE014
The number of vectors obtained.
And S204, judging the strip steel to be detected to obtain a strip steel image possibly having edge crack defects.
Taking into account that there may be no defects in the image, the sequence is calculated
Figure DEST_PATH_IMAGE015
Variance of (2)
Figure 998223DEST_PATH_IMAGE016
When is coming into contact with
Figure DEST_PATH_IMAGE017
When the data in the sequence fluctuate to a small extent, the edge of the side strip steel is not subjected to edge crack defect, and the side edge is normal and does not need to be subjected to subsequent detection;
when in use
Figure 203202DEST_PATH_IMAGE018
In this case, the side edge is considered to have a high possibility of edge crack defect, and it is necessary to determine the edge crack position and the edge crack degree.
And S205, determining the position and the degree of the edge crack defect.
a. A defect class is obtained.
The deviation angle between the angles of the edge points of the hot-rolled strip steel is small, and the deviation angle of the edge points of the edge crack area is large, namely, the values in the deviation degree sequence are divided into two types of data of a small deviation angle under a normal condition and a large deviation angle under an edge crack condition. The K-means clustering algorithm is based on a partition clustering algorithm, and can divide data with similar values into a group;
thus using the K-means clustering algorithm pair
Figure 154978DEST_PATH_IMAGE015
And setting the number of categories by clustering the absolute values of the respective data in (1)
Figure DEST_PATH_IMAGE019
Obtaining two clustering results;
and respectively calculating the mean value of each clustering result, wherein the larger the mean value is, the larger the deviation degree of the strip steel edge and the horizontal direction is, the higher the possibility of the defect exists, and therefore, the class with the larger mean value is the defect class corresponding to the edge crack defect.
b. All sets are obtained.
Because more than one edge crack defect may exist in the image, the data in the obtained defect class may correspond to a plurality of defects, and the K-means is clustered according to the angle value in the above step without considering the continuity of the angle value in the sequence, so that the data in the defect class needs to be further divided according to the continuity condition of the data; the specific process is as follows:
1) in defect class
Figure 955443DEST_PATH_IMAGE002
For example, as
Figure 803314DEST_PATH_IMAGE020
Judgment sequence
Figure 525282DEST_PATH_IMAGE015
Two angles adjacent to it
Figure DEST_PATH_IMAGE021
,
Figure 15169DEST_PATH_IMAGE022
Whether the angle belongs to the defect class or not, and the angle which belongs to the defect class and is not originally in the set in the two angles
Figure 607825DEST_PATH_IMAGE002
Dividing into a set;
2) repeat operation 1) for angles newly subsumed in the set until the angles newly subsumed in the set are at
Figure 688913DEST_PATH_IMAGE015
When the adjacent angles do not belong to the defect class or are classified into the set, stopping the operation, and sequencing the data in the set according to various values
Figure 835861DEST_PATH_IMAGE015
The order in (1) is sorted.
3) Repeating the operations 1),2) on the remaining angle values of the defect classes
Figure DEST_PATH_IMAGE023
Sets, each set corresponding to a defect.
c. All the sets after correction are obtained.
Considering that a smooth area may exist at the edge of the defect or the offset angle between the angle of the converted vector and the horizontal direction may be small due to the fact that the average value of horizontal and vertical coordinates of the pixels of the adjacent five edges needs to be calculated when the vector is obtained, the division result is inaccurate, and if a plurality of sets correspond to one defect, the division result needs to be corrected;
1) subjecting the above to
Figure DEST_PATH_IMAGE025
The sets being in sequence according to the first data in each set
Figure DEST_PATH_IMAGE027
The position in (1) is sorted, and the sorting result of the set at this time is that
Figure DEST_PATH_IMAGE025A
The order in which the sets appear from left to right;
2) because the included angle formed by the vector corresponding to the defect edge and the horizontal direction is negative first and then positive, the deviation angle value in the set is compared with 0, and the obtained conditions are three types: data is positive, data is negative, data has a negative or positive, then:
the data are positive: the set is fused with the previous set;
data are all negative: the set is fused with the next set;
data positive or negative: if the set is normal, analyzing the next set;
the fusion process of the lower edge is just the reverse.
3) Repeat operation 2) until the process is completed
Figure DEST_PATH_IMAGE025AA
The number of the corrected sets is recorded as
Figure DEST_PATH_IMAGE029
d. The defect level is obtained.
1. Obtaining the maximum value and the minimum value of the vertical coordinate of the corresponding edge pixel point in each set, wherein
Figure 605803DEST_PATH_IMAGE030
The maximum value and the maximum value of the ordinate of the edge pixel point corresponding to each setSmall values are respectively marked as
Figure DEST_PATH_IMAGE031
The edge crack depth of the upper edge
Figure 820009DEST_PATH_IMAGE032
2. The maximum edge crack depth of the upper edge is
Figure DEST_PATH_IMAGE033
3. Treating the lower edges of the strip in such a way that the upper edges of the strip are treated, i.e. groups
Figure 337578DEST_PATH_IMAGE008
To obtain the maximum edge crack depth of the lower edge
Figure 768559DEST_PATH_IMAGE034
And S206, determining the trimming depth according to the defect degree and the specification of the strip steel.
Because the current narrow strip steel is generally cut from wide strip steel, when the produced strip steel has edge crack defects, the wide strip steel is subjected to edge cutting treatment; secondly, the hot rolled strip steel is used as a blank of the cold rolled strip steel, if edge cracks exist, the hot rolled strip steel can damage a roller in the cold rolling process, and in order to ensure the smooth production, the edge cutting treatment is needed. The specific process is as follows:
1. establishing a database according to various strip steel specifications on the market;
2. selecting the same type of strip steel (such as galvanized strip steel) with the thickness same as that of the currently produced strip steel and the width closest to that of the currently produced strip steel
Figure DEST_PATH_IMAGE035
The strip steel specification is set as that the strip steel width of the specification is
Figure 865828DEST_PATH_IMAGE036
The total cutting depth of the two sides of the steel coil
Figure DEST_PATH_IMAGE037
Figure 433076DEST_PATH_IMAGE038
The thickness of the currently produced strip steel.
3. Since the cutting difficulty is higher as the cutting width is smaller, the width requiring the multi-cut is allocated to the side having the smaller defect depth, for example, the upper side cutting depth
Figure DEST_PATH_IMAGE039
Can be expressed as:
Figure DEST_PATH_IMAGE041
the beneficial effect of this embodiment lies in:
in the embodiment, the edge information of the strip steel is obtained by processing the acquired surface image of the strip steel by using computer vision, the defect position is determined according to the change condition of the included angle between the edge point and the horizontal direction, and the defect degree is evaluated to determine the trimming depth in the subsequent trimming process, so that the accuracy of detecting the edge crack defect of the strip steel can be effectively improved, and the resource waste is reduced.
Example 3
The embodiment of the invention provides a strip steel edge crack defect detection system based on image processing, which comprises an acquisition unit, an extraction unit, an analysis processing unit, a calculation unit and a control unit, wherein the acquisition unit, the extraction unit, the analysis processing unit, the calculation unit and the control unit are as shown in figure 5:
the collecting unit is used for arranging an industrial camera at the inlet of the coiling machine and collecting the surface image of the produced strip steel;
the extraction unit inputs the image acquired by the acquisition unit into the data master controller, and performs semantic segmentation processing on the image by using the data master controller to extract the strip steel area image; carrying out edge detection on the strip steel area image, and extracting the upper edge and the lower edge of the strip steel;
the analysis processing unit performs sliding window traversal on the strip steel edge extracted by the extraction unit by using the data master controller to obtain all deviation angles of the strip steel edge and the horizontal direction; judging whether the strip steel edge has defects according to the fluctuation degree of all the deviation angles of the strip steel edge and the horizontal direction, and clustering the deviation angles of the strip steel edge which possibly has defects to obtain defect classes; dividing the defect classes according to the continuity of the offset angles in the defect classes to obtain all defect areas, and further determining the defect positions;
the computing unit is used for computing the edge crack depth of each defect position obtained by the analysis processing unit by using the data master controller; determining the edge cutting depth of the strip steel according to the edge cracking depth;
and the control unit cuts the strip steel by using the data main controller according to the strip steel trimming depth obtained by the calculation unit.
The beneficial effect of this embodiment lies in:
in the embodiment, the edge information of the strip steel is obtained by processing the acquired surface image of the strip steel by using computer vision, the defect position is determined according to the change condition of the included angle between the edge point and the horizontal direction, and the defect degree is evaluated to determine the trimming depth in the subsequent trimming process, so that the accuracy of detecting the edge crack defect of the strip steel can be effectively improved, and the resource waste is reduced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (5)

1. A strip steel edge crack defect detection method based on image processing is characterized by comprising the following steps:
acquiring a strip steel area image;
carrying out edge detection on the strip steel area image to obtain a strip steel edge;
carrying out sliding window traversal on the strip steel edge, and obtaining the offset angle of the middle pixel point in each sliding window by using the position information of the pixel point in each sliding window; the offset angle of the middle pixel point in the sliding window is obtained according to the following mode:
performing sliding window traversal on the edge of the strip steel from left to right, and taking the last pixel point in each sliding window as the initial pixel point of the next sliding window to obtain all the sliding windows;
obtaining a middle pixel point and a corresponding vector thereof according to the coordinates of all pixel points in each sliding window;
calculating the offset angle of each vector and the unit vector in the horizontal direction to obtain the offset angle of the middle pixel point in the sliding window;
the expression of the offset angle of the middle pixel point in the sliding window is as follows:
Figure DEST_PATH_IMAGE002A
in the formula (I), the compound is shown in the specification,
Figure 317715DEST_PATH_IMAGE004
is the offset angle of the middle pixel point in the ith sliding window and the horizontal direction,
Figure 234855DEST_PATH_IMAGE006
the vectors corresponding to the middle pixel points in the ith sliding window,
Figure 749013DEST_PATH_IMAGE008
is a unit vector in the horizontal direction,
Figure 878643DEST_PATH_IMAGE010
is the ordinate of the starting pixel point of the ith sliding window,
Figure 693016DEST_PATH_IMAGE012
the vertical coordinate of the middle pixel point in the ith sliding window;
calculating the variance of the offset angle sequences of all the intermediate pixel points, and judging whether the edge of the strip steel has defects or not according to the variance;
clustering the offset angles of all intermediate pixel points of the edge with the defect of the strip steel to obtain a normal class and a defect class;
sequencing all offset angles in the defect classes according to the sequence of the sliding window, dividing the defect classes according to the continuity of all the offset angles to obtain all defect areas, and determining the defect positions according to all the defect areas;
obtaining the defect depth according to the maximum value and the minimum value of the vertical coordinate of the edge pixel point corresponding to the defect position;
determining the trimming depth of the strip steel according to the defect depth;
and cutting the strip steel according to the depth of the cut edge.
2. The method for detecting the edge crack defect of the strip steel based on the image processing as claimed in claim 1, wherein the defect class is obtained as follows:
clustering absolute values of offset angles of all intermediate pixel points of the edge with the defect of the strip steel to obtain two clustering results;
and respectively calculating the mean values of the two clustering results, wherein the class with the larger mean value is the defect class.
3. The method for detecting the edge crack defect of the strip steel based on the image processing as claimed in claim 1, wherein all the defect areas are obtained as follows:
sequencing all the offset angles in the defect class;
acquiring two adjacent offset angles of a first offset angle in an offset angle sequence in a defect class, judging whether the two adjacent offset angles belong to the defect class, and dividing the adjacent offset angles belonging to the defect class and the first offset angle into a region;
judging whether the adjacent offset angle of the newly-included area in the offset angle sequence belongs to a defect class or not, including the adjacent offset angle belonging to the defect class in the area to obtain an updated area, and repeating the steps until the offset angle of the newly-included area does not belong to the defect class or is included in the area in the offset angle sequence, so as to obtain the first defect area and the residual offset angle of the defect class;
dividing the residual offset angles of the defect types according to a method for obtaining a first defect area to obtain all preliminarily divided defect areas;
and sequencing all the preliminarily divided defect areas, and combining all the defect areas according to the positive and negative conditions of the deviation angle values in all the sequenced defect areas to obtain all the defect areas.
4. The method for detecting the band steel edge crack defect based on the image processing as claimed in claim 3, wherein the process of merging each defect area is as follows:
judging the offset angle value in each sorted defect area:
if all the offset angle values in the defect area are larger than 0, merging the defect area with the previous defect area;
if all the deviation angle values in the defect area are less than 0, merging the defect area with the next defect area;
if the deviation angle values in the defect area are some larger than 0 and some smaller than 0, no processing is required.
5. The method for detecting the edge crack defect of the strip steel based on the image processing as claimed in claim 1, wherein the process of cutting the strip steel is as follows:
obtaining the depth of each defect according to the maximum value and the minimum value of the ordinate of the edge point of each defect position;
acquiring the specification of the strip steel close to the current type of the strip steel, and acquiring the width of the strip steel under the specification;
determining the depth of the trimming according to the width of the strip steel under the specification of the strip steel and the depth of each defect;
and cutting the strip steel according to the depth of the cut edge.
CN202111583191.5A 2021-12-22 2021-12-22 Strip steel edge crack defect detection method and system based on image processing Active CN113962997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111583191.5A CN113962997B (en) 2021-12-22 2021-12-22 Strip steel edge crack defect detection method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111583191.5A CN113962997B (en) 2021-12-22 2021-12-22 Strip steel edge crack defect detection method and system based on image processing

Publications (2)

Publication Number Publication Date
CN113962997A CN113962997A (en) 2022-01-21
CN113962997B true CN113962997B (en) 2022-03-18

Family

ID=79473561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111583191.5A Active CN113962997B (en) 2021-12-22 2021-12-22 Strip steel edge crack defect detection method and system based on image processing

Country Status (1)

Country Link
CN (1) CN113962997B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114511534B (en) * 2022-01-28 2023-05-05 江苏泰和木业有限公司 PC board crack judging method and system based on image processing
CN115060754B (en) * 2022-04-29 2024-05-24 上海沛圣科技有限公司 Stainless steel product surface quality detection method
CN114627115B (en) * 2022-05-13 2022-08-30 济宁安泰矿山设备制造有限公司 Dynamic balance detection system and fluid pump impeller production line using same
CN114998344A (en) * 2022-08-04 2022-09-02 南通金茂防爆电气有限公司 Ion exchange membrane surface defect evaluation method and system based on image processing
CN115311350A (en) * 2022-08-08 2022-11-08 北京远舢智能科技有限公司 Method and device for determining position parameters of edge wave defects, electronic equipment and medium
CN117115165A (en) * 2023-10-24 2023-11-24 长沙康乾电子科技有限公司 Method and device for scratching processing surface of mask

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745234B (en) * 2014-01-23 2017-01-25 东北大学 Band steel surface defect feature extraction and classification method
CN104535586B (en) * 2014-11-18 2017-05-17 华东理工大学 Strip steel edge defect detection identification method
CN104794491B (en) * 2015-04-28 2018-01-23 重庆大学 Based on the fuzzy clustering Surface Defects in Steel Plate detection method presorted
CN106530292B (en) * 2016-10-28 2019-07-05 鞍钢未来钢铁研究院有限公司 A kind of steel strip surface defect image Fast Identification Method based on line scan camera

Also Published As

Publication number Publication date
CN113962997A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
CN113962997B (en) Strip steel edge crack defect detection method and system based on image processing
CN114862862B (en) Pump body cold shut defect identification method and system based on image processing
CN106780486B (en) Steel plate surface defect image extraction method
CN115082418B (en) Precise identification method for automobile parts
CN109035195B (en) Fabric defect detection method
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN113646801B (en) Defect detection method, device and computer readable storage medium for defect image
CN115018838B (en) Method for identifying pitting defects on surface of oxidized steel pipe material
CN115063423B (en) Self-adaptive identification method for cold and hot cracks of mechanical castings based on computer vision
CN108563979B (en) Method for judging rice blast disease conditions based on aerial farmland images
CN113935666B (en) Building decoration wall tile abnormity evaluation method based on image processing
CN106780526A (en) A kind of ferrite wafer alligatoring recognition methods
WO2021135675A1 (en) Automatic bar counting method and apparatus
CN108020554A (en) A kind of steel strip surface defect recognition detection method
CN115330645A (en) Welding image enhancement method
CN110378866B (en) Channel lining damage image identification method based on unmanned aerial vehicle inspection
CN115294109A (en) Real wood board production defect identification system based on artificial intelligence, and electronic equipment
CN107256549A (en) A kind of bamboo strip defect detection method based on machine vision
TW201910021A (en) Method for detecting fracture of steel strip tail
CN106530292B (en) A kind of steel strip surface defect image Fast Identification Method based on line scan camera
CN117315289A (en) Aeroengine blade contour edge detection method based on image processing
CN112528740A (en) Pressing plate state identification method
CN117094609A (en) Intelligent management system for aluminum profile production quality based on machine vision
CN102313740A (en) Solar panel crack detection method
CN111062939B (en) Method for rapidly screening quality of strip steel surface and automatically extracting defect characteristics

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