CN114937039A - Intelligent detection method for steel pipe defects - Google Patents

Intelligent detection method for steel pipe defects Download PDF

Info

Publication number
CN114937039A
CN114937039A CN202210858986.0A CN202210858986A CN114937039A CN 114937039 A CN114937039 A CN 114937039A CN 202210858986 A CN202210858986 A CN 202210858986A CN 114937039 A CN114937039 A CN 114937039A
Authority
CN
China
Prior art keywords
edge
steel pipe
target
area
pixel points
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.)
Granted
Application number
CN202210858986.0A
Other languages
Chinese (zh)
Other versions
CN114937039B (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.)
Afaron Shandong Technology Co ltd
Original Assignee
Afaron Shandong Technology 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 Afaron Shandong Technology Co ltd filed Critical Afaron Shandong Technology Co ltd
Priority to CN202210858986.0A priority Critical patent/CN114937039B/en
Publication of CN114937039A publication Critical patent/CN114937039A/en
Application granted granted Critical
Publication of CN114937039B publication Critical patent/CN114937039B/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
    • 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/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • 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/10004Still image; Photographic image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to an intelligent detection method for steel pipe defects. The method comprises the following steps: obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the obtained salient image corresponding to the surface image of the steel pipe to be detected; classifying all to-be-selected significant pixel points in the to-be-selected significant region to obtain all growth sets; selecting growth sets with the number of to-be-selected significant pixel points in each growth set larger than or equal to a second threshold value, and recording as target growth sets; obtaining a scab area and a contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set; acquiring a target edge image corresponding to a surface image of a steel pipe to be detected; and obtaining a crease defect area and a scratch defect area according to each edge line in the target edge image. The invention realizes more accurate detection of various defects on the surface of the steel pipe with lower cost.

Description

Intelligent detection method for steel pipe defects
Technical Field
The invention relates to the technical field of image processing, in particular to an intelligent detection method for steel pipe defects.
Background
The steel pipe is a metal part which plays roles of connection, control, diversion, sealing, support and the like in a pipeline system, and the surface defects of the steel pipe not only affect the aesthetic property of the steel pipe, but also affect the morphological structure of the steel pipe. Because different and similar defects can occur on the surface of the steel pipe, the detection difficulty of the surface of the steel pipe is increased, the existing detection of the surface of the steel pipe by adopting a neural network needs a large amount of training sets and test sets, and the requirement on hardware of a detection system is high; the neural network can only detect the most obvious defects in the image but cannot detect the defects of various mashups existing in the image; therefore, how to rapidly and accurately detect various defects on the surface of the steel pipe at low cost is a problem to be solved.
Disclosure of Invention
In order to solve the above problems, the present invention aims to provide an intelligent detection method for steel pipe defects, which adopts the following technical scheme:
the invention provides an intelligent detection method for steel pipe defects, which comprises the following steps:
acquiring a surface image of a steel pipe to be detected;
acquiring a saliency map corresponding to the surface image of the steel pipe to be detected; obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the corresponding salient value of each pixel point in the salient map, wherein the salient region to be selected comprises each salient pixel point to be selected in the surface image of the steel pipe to be detected;
classifying all to-be-selected significant pixel points in a to-be-selected significant region to obtain all growth sets, wherein each growth set comprises all to-be-selected significant pixel points belonging to the growth set; selecting growth sets with the number of to-be-selected significant pixel points in each growth set larger than or equal to a second threshold value, and recording as target growth sets; obtaining a scab area and a contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set;
processing the surface image of the steel pipe to be detected to obtain a corresponding target edge image, wherein the target edge image does not include edge lines corresponding to the contour edge of the scab area; and obtaining a crease defect area and a scratch defect area according to each edge line in the target edge image.
Preferably, acquiring a saliency map corresponding to the surface image of the steel pipe to be detected; obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the salient value corresponding to each pixel point in the salient map, wherein the salient region to be selected comprises:
processing the surface image of the steel pipe to be detected by using a visual saliency algorithm to obtain a saliency map corresponding to the surface image of the steel pipe to be detected;
obtaining an optimal segmentation threshold according to the saliency value corresponding to each pixel point in the saliency map and the Otsu method;
marking the pixel points with the significant values larger than the optimal segmentation threshold value in the significant graph as the significant pixel points to be selected, and marking the set formed by the significant pixel points to be selected as the significant pixel point set to be selected;
marking the pixel points with the significant value less than or equal to the optimal segmentation threshold value in the significant graph as non-significant pixel points, and marking a set formed by all the non-significant pixel points as a non-significant pixel point set;
calculating the ratio of the average value of the significant values corresponding to all the pixels in the to-be-selected significant pixel point set to the average value of the significant values corresponding to all the pixels in the non-significant pixel point set;
if the ratio is smaller than or equal to a first threshold value, judging that no scab defect exists in the surface image of the steel pipe to be detected;
if the ratio is larger than the first threshold, marking the pixel points corresponding to the pixel points in the to-be-selected significant pixel point set in the to-be-detected steel pipe surface image as to-be-selected significant pixel points, and marking the region formed by the to-be-selected significant pixel points in the to-be-detected steel pipe surface image as to-be-selected significant region.
Preferably, the classifying each to-be-selected significant pixel point in the to-be-selected significant region to obtain each growth set includes:
extracting straight lines in the salient region to be selected by utilizing Hough straight line detection to obtain all straight lines existing in the salient region to be selected;
processing each straight line existing in the salient region to be selected to obtain a straight line region corresponding to each straight line;
marking the pixel points in the linear area corresponding to each straight line as linear pixel points; removing straight line pixel points existing in the to-be-selected salient region, and marking the remaining to-be-selected salient region as a target to-be-selected salient region;
taking any one to-be-selected significant pixel point in the target to-be-selected significant region as an initial growth point, judging whether to have the to-be-selected significant pixel point belonging to the target to-be-selected significant region in a window with the size of 5 multiplied by 5 and taking the initial growth point as a center, and if so, merging the to-be-selected significant pixel point in the window into a first growth set; respectively taking other to-be-selected significant pixel points except the initial growth point in the window corresponding to the initial growth point as new initial growth points, judging whether to-be-selected significant pixel points belonging to a target to-be-selected significant region exist in the window with the size of 5 multiplied by 5 corresponding to the new initial growth point, if so, merging the to-be-selected significant pixel points in the window into a first growth set, continuing to grow, and if not, stopping growing to obtain a first growth set; and by analogy, selecting any one of the to-be-selected significant pixel points outside the first growth set in the target to-be-selected significant region as a new initial growth point, and growing until all the to-be-selected significant pixel points in the target to-be-selected significant region are traversed completely to obtain all the growth sets.
Preferably, processing each straight line existing in the to-be-selected significant region to obtain a straight line region corresponding to each straight line includes:
for any straight line:
the equation corresponding to the straight line is
Figure 611527DEST_PATH_IMAGE001
Wherein x is the abscissa of the pixel, y is the ordinate of the pixel,
Figure 279138DEST_PATH_IMAGE002
is the minimum value of the abscissa corresponding to each pixel point on the straight line,
Figure 509262DEST_PATH_IMAGE003
is the maximum value of the abscissa corresponding to each pixel point on the straight line, k is the slope corresponding to the straight line, and b is the intercept corresponding to the straight line;
respectively setting two straight lines parallel to the straight line, and marking as a first straight line and a second straight line; first straight lineThe equation of the line is
Figure 553310DEST_PATH_IMAGE004
The equation of the second line is
Figure 185280DEST_PATH_IMAGE005
Wherein
Figure 23792DEST_PATH_IMAGE006
Connecting the end points of the first straight line and the second straight line, and recording the formed area as a straight line area corresponding to the straight line;
the above-mentioned
Figure 741212DEST_PATH_IMAGE007
The obtaining method comprises the following steps:
will be provided with
Figure 995476DEST_PATH_IMAGE007
Increasing from 0 by 2 each time until the proportion of the pixels which are not to-be-selected significant pixels in the pixels contained in the region which is increased more before the increase is larger than the proportion threshold value, and taking the value which finally meets the condition as the value
Figure 75427DEST_PATH_IMAGE007
The value of (c).
Preferably, obtaining a scar area and a contour edge of the scar area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set includes:
for any target growth set:
acquiring a maximum vertical coordinate and a minimum vertical coordinate according to coordinates corresponding to each to-be-selected significant pixel point in the target growth set;
obtaining the area of the corresponding region of the target growth set in the surface image of the steel pipe to be detected according to the coordinates of each to-be-selected significant pixel point in the target growth set, and recording the area as the area of the corresponding region of the target growth set;
for any ordinate in the target growth set between the maximum and minimum ordinates: taking the to-be-selected significant pixel point with the maximum abscissa and the to-be-selected significant pixel point with the minimum abscissa in the to-be-selected significant pixel points corresponding to the ordinate in the target growth set as boundary pixel points of the region corresponding to the target growth set;
connecting boundary pixel points of the region corresponding to the target growth set by adopting an interpolation method to obtain the edge of the region corresponding to the target growth set;
calculating the ratio of the number of the to-be-selected significant pixels corresponding to the target growth set to the area of the region corresponding to the target growth set, and taking the ratio as the density of the region corresponding to the target growth set;
if the density of the area corresponding to the target growth set is less than or equal to a third threshold value, judging that the area corresponding to the target growth set is not a scab area; if the density of the area corresponding to the target growth set is larger than a third threshold value, the area corresponding to the target growth set is judged to be a scab area, and the edge of the area corresponding to the target growth set in the surface image of the steel pipe to be detected is used as the outline edge of the scab area.
Preferably, the area of the region corresponding to the target growth set is calculated by using the following formula:
Figure 84841DEST_PATH_IMAGE008
wherein S is the area of the region corresponding to the target growth set,
Figure 210928DEST_PATH_IMAGE009
for the maximum ordinate corresponding to the target growth set,
Figure 347512DEST_PATH_IMAGE010
is the minimum ordinate corresponding to the target growth set,
Figure 937762DEST_PATH_IMAGE011
the maximum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set,
Figure 134388DEST_PATH_IMAGE012
the minimum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set is obtained,
Figure 810089DEST_PATH_IMAGE013
is the width of the pixel.
Preferably, the processing of the steel pipe surface image to be detected to obtain a corresponding target edge image includes:
extracting edge lines in the surface image of the steel pipe to be detected by adopting a canny operator to obtain a corresponding edge image;
if the steel pipe surface image to be detected has the scab defect, removing edge lines of the contour edge belonging to the scab area in the edge image, and completing gaps of the edge lines intersected with the edge lines of the contour edge of the scab area in the edge image by adopting an interpolation method to obtain a target edge image; the notch of the edge line is caused by removing the edge line corresponding to the contour edge of the scar area.
Preferably, obtaining a crease defect area and a scratch defect area in the surface image of the steel pipe to be detected according to each edge line in the target edge image, includes:
for any edge line: acquiring a Hessian matrix corresponding to each pixel point on the edge line; calculating the principal component direction of the Hessian matrix corresponding to each pixel point by adopting a PCA algorithm, and taking the principal component direction of the Hessian matrix corresponding to each pixel point as a direction angle corresponding to each pixel point; calculating the average value of the direction angles corresponding to all the pixel points on the edge line, and taking the average value as the direction angle corresponding to the edge line; obtaining a Pearson coefficient corresponding to the edge line according to the coordinates corresponding to each pixel point on the edge line; extracting the edge of the single pixel point of the edge line by utilizing image thinning operation, and taking the number of the pixel points on the edge of the single pixel point corresponding to the edge line as the length corresponding to the edge line;
for any two edge lines in the target edge image: marking the two edge lines as a first edge line and a second edge line respectively; obtaining the width between the two edge lines according to the coordinates of each pixel point on the first edge line and the second edge line;
if the Pearson coefficients corresponding to any two edge lines in the target edge image are both greater than the linear approximation threshold value
Figure 750363DEST_PATH_IMAGE014
The absolute value of the difference value of the corresponding lengths is smaller than the length difference threshold value, and the absolute value of the difference value of the corresponding direction angles is smaller than the direction angle difference threshold value
Figure 460699DEST_PATH_IMAGE015
If the width between any two edge lines is smaller than the width threshold, dividing the two edge lines into a group to obtain each edge line corresponding to each group; the above-mentioned
Figure 562647DEST_PATH_IMAGE016
Said
Figure 991223DEST_PATH_IMAGE017
Wherein
Figure 469609DEST_PATH_IMAGE018
for the second adaptation of the parameter(s),
Figure 854627DEST_PATH_IMAGE019
adjusting a parameter for a first adaptation;
for any group: if the group only comprises two edge lines, judging that the two edge lines in the group belong to the two side edges of the scratch defect, and taking the area between the two edge lines as a scratch defect area; if the group comprises more than two edge lines, judging the edge lines as crease lines of the crease defects, and combining the maximum abscissa and the maximum ordinate, the maximum abscissa and the minimum ordinate, the minimum abscissa and the maximum ordinate, and the minimum abscissa and the minimum ordinate, which correspond to all pixel points on all the edge lines in the group, to obtain four coordinates; and connecting the pixel points corresponding to the four coordinates to obtain a crease defect area.
Preferably, the obtaining the width between the first edge line and the second edge line according to the coordinates of each pixel point on the first edge line and the second edge line includes:
for any pixel point on the first edge line: making a straight line passing through the pixel point, wherein the inclination angle of the straight line is different from the direction angle corresponding to the first edge line
Figure 393056DEST_PATH_IMAGE020
Calculating the Euclidean distance between the two pixel points according to the coordinate corresponding to the pixel point and the coordinate of the pixel point where the straight line intersects with the second edge line, and recording the Euclidean distance as the width corresponding to the pixel point;
taking the average value of the widths corresponding to all the pixel points on the first edge as the width between the first edge line and the second edge line;
the above-mentioned
Figure 43349DEST_PATH_IMAGE019
And said
Figure 325425DEST_PATH_IMAGE018
The obtaining method comprises the following steps:
obtaining the number of pixel points on all edge lines in the target edge image in the scab area
Figure 744774DEST_PATH_IMAGE021
And the total number of all pixel points on all edge lines
Figure 188525DEST_PATH_IMAGE022
The above-mentioned
Figure 326114DEST_PATH_IMAGE019
The calculation formula of (c) is:
Figure 67674DEST_PATH_IMAGE023
the above-mentioned
Figure 357841DEST_PATH_IMAGE018
The calculation formula of (2) is as follows:
Figure 487340DEST_PATH_IMAGE024
the invention has the following beneficial effects:
firstly, obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the obtained salient image corresponding to the surface image of the steel pipe to be detected; then classifying all to-be-selected significant pixel points in the to-be-selected significant region to obtain all growth sets; selecting growth sets with the number of to-be-selected significant pixel points in each growth set larger than or equal to a second threshold value, and recording as target growth sets; then obtaining a scab area and a contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set; and finally, processing the surface image of the steel pipe to be detected to obtain a corresponding target edge image, and further obtaining a crease defect area and a scratch defect area according to each edge line in the target edge image. The invention detects the image of the surface of the steel pipe in an image processing mode, judges whether the surface of the steel pipe has defects or not, and identifies the positions of different defects, thereby realizing more accurate detection of various defects on the surface of the steel pipe with lower cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of an intelligent method for detecting defects of a steel pipe according to the present invention;
fig. 2 is a schematic diagram of an edge line in an edge image.
Detailed Description
In order to further explain the technical means and functional effects of the present invention adopted to achieve the predetermined purpose, the following describes an intelligent method for detecting defects of a steel pipe according to the present invention in detail with reference to the accompanying drawings and preferred embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the intelligent detection method for the defects of the steel pipe provided by the invention in detail by combining with the accompanying drawings.
The embodiment of the intelligent detection method for the defects of the steel pipe comprises the following steps:
as shown in fig. 1, the intelligent detection method for steel pipe defects of the present embodiment includes the following steps:
and step S1, acquiring the surface image of the steel pipe to be detected.
Three common defects in steel pipe defects include scratches, folds, and scabs; wherein the scratch defect is generally positioned on the outer side of the steel pipe and presents a linear groove shape, most scratches can be seen from the groove bottom, and the cause of the scratch defect is mainly mechanical scratch in the processes of roller bed, cooling bed, straightening, transportation and the like; the folding defects are linear folding lines which are regularly and continuously distributed on the surface of the steel material, are partially overlapped and approximate to cracks, and generally have a certain inclination angle with the surface of the steel material along the rolling direction; the scab defect is generally tongue-shaped, block-shaped or fish scale-shaped raised slice, is irregularly distributed on the surface of steel, has unequal area size and thickness and irregular outline, and can be distributed singly or in a plurality of connected slices. These three defects merge with each other and are difficult to distinguish.
In order to detect the defects on the surface of the steel pipe, the embodiment first obtains an image corresponding to the surface of the steel pipe to be detected; then preprocessing the image, namely filtering noise in the image by adopting a Gaussian filter, and then enhancing the image by adopting histogram equalization to increase the contrast of the image; and recording the image corresponding to the surface of the steel pipe to be detected after pretreatment as the image of the surface of the steel pipe to be detected.
Step S2, acquiring a saliency map corresponding to the surface image of the steel pipe to be detected; and obtaining a to-be-selected salient region in the surface image of the steel pipe to be detected according to the corresponding salient value of each pixel point in the salient map, wherein the to-be-selected salient region comprises each to-be-selected salient pixel point in the surface image of the steel pipe to be detected.
Considering that if various defects exist on the shot steel pipe surface image, even the phenomenon of defect mixing occurs, only the most obvious defects in the image can be detected by adopting the classification neural network, but various defects in the image cannot be detected, and the requirement of the neural network on the hardware of the detection system is higher; the embodiment provides an intelligent detection method for steel pipe defects, which can detect various defects contained in an image of the surface of a steel pipe and quickly and accurately detect various defects on the surface of the steel pipe at a lower cost.
Because the color of scab is different from that of other areas, the embodiment firstly judges whether the surface of the steel pipe to be detected has scab defects, specifically:
in the embodiment, a visual saliency algorithm (FT) is utilized to process the surface image of the steel pipe to be detected to obtain a saliency map corresponding to the surface image of the steel pipe to be detected, wherein the saliency map has the same size as the surface image of the steel pipe to be detected, and the pixel points are in one-to-one correspondence; and (3) corresponding to a significant value by one pixel point in the significant map (namely, corresponding to a significant value by one pixel point in the surface image of the steel pipe to be detected), wherein the value ranges of the significant values are all [0,1 ]. The embodiment detects the scab defect in the steel pipe surface image based on the saliency map corresponding to the steel pipe surface image to be detected.
The scab defect appears on the saliency map as a collection of pixels with large saliency values and close spatial positions. In this embodiment, the Otsu tsu ohio method is adopted to segment the saliency map based on the saliency value corresponding to each pixel point in the saliency map, so as to obtain an optimal segmentation threshold.
In the embodiment, pixel points with significant values larger than the optimal segmentation threshold in the significant graph are marked as to-be-selected significant pixel points, and a set formed by all to-be-selected significant pixel points is marked as to-be-selected significant pixel point set; and marking the pixels with the significant value less than or equal to the optimal segmentation threshold value in the significant graph as non-significant pixels, and marking a set formed by the non-significant pixels as a non-significant pixel set. Calculating to-be-selected significant pixel pointsThe average value of the significant values corresponding to all the pixel points in the set is recorded as a first average value
Figure 862958DEST_PATH_IMAGE025
(ii) a Calculating the average value of the significant values corresponding to all the pixel points in the non-significant pixel point set, and recording as the second average value
Figure 736105DEST_PATH_IMAGE026
(ii) a If it is
Figure 615199DEST_PATH_IMAGE027
If the value is less than or equal to the first threshold value, the steel pipe surface image to be detected does not have scab defects; if it is
Figure 915599DEST_PATH_IMAGE027
If the number of the pixels in the to-be-selected significant pixel point set is greater than the first threshold, it is determined that the to-be-selected significant pixel points in the to-be-selected significant pixel point set correspond to the number of the pixels in the to-be-selected significant pixel point set, and the area formed by the to-be-selected significant pixel points in the to-be-selected significant area in the to-be-detected steel pipe surface image is recorded as the to-be-selected significant area. In this embodiment, the first threshold is set to 2, and is specifically set according to actual needs.
Step S3, classifying all to-be-selected significant pixel points in the to-be-selected significant region to obtain all growth sets, wherein each growth set comprises all to-be-selected significant pixel points belonging to the growth set; selecting growth sets with the number of to-be-selected significant pixel points in each growth set larger than or equal to a second threshold value, and recording as target growth sets; and obtaining a scab area and the contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set.
And if the steel pipe surface image to be detected does not have the scab defect, directly detecting the scratch defect and the folding defect.
If the steel pipe surface image to be detected is judged to have the scab defect, the steel pipe surface image to be detected is further detected by the embodiment to obtain the area where the scab defect exists in the steel pipe surface image to be detected, specifically:
considering that the linear defects on the surface of the steel pipe can interfere with the detection of the scar defects, the embodiment extracts the straight lines in the to-be-selected salient region by using hough straight line detection to obtain all the straight lines in the to-be-selected salient region. In this embodiment, hough line detection is the prior art, and will not be described herein.
Considering that all the linear defects on the surface of the steel pipe have a certain width, in this embodiment, each straight line existing in the region to be selected is processed to obtain a linear region corresponding to each straight line, specifically, for any straight line:
let the equation corresponding to the straight line obtained by Hough straight line detection be
Figure 778513DEST_PATH_IMAGE028
Figure 189772DEST_PATH_IMAGE029
Wherein x is the abscissa of the pixel, y is the ordinate of the pixel,
Figure 454531DEST_PATH_IMAGE002
is the minimum value of the abscissa corresponding to each pixel point on the straight line,
Figure 660253DEST_PATH_IMAGE003
the maximum value of the abscissa corresponding to each pixel point on the straight line is defined, k is the slope corresponding to the straight line, b is the intercept corresponding to the straight line, and the origin of the coordinate system is the point corresponding to the lower left corner of the image; in this embodiment, two straight lines parallel to the straight line are respectively set and respectively recorded as a first straight line and a second straight line, and the equation of the first straight line is
Figure 10463DEST_PATH_IMAGE004
The equation of the second line is
Figure 22150DEST_PATH_IMAGE005
Wherein
Figure 141416DEST_PATH_IMAGE006
And the equations of the first straight line and the second straight line have the same domain as the equation of the straight line; in this embodiment, the end points of the first straight line and the second straight line are connected, and the formed region is recorded as a straight line region corresponding to the straight line; the embodiment is realized by determining
Figure 783619DEST_PATH_IMAGE007
To determine the linear region to which the line corresponds, and in particular, will
Figure 355546DEST_PATH_IMAGE007
Increasing from 0 by 2 each time until the proportion of the pixels which are not to-be-selected significant pixels in the pixels contained in the region which is increased more before the increase is greater than the proportion threshold value, and taking the value at the moment as the proportion threshold value
Figure 108607DEST_PATH_IMAGE007
The value of (2) is, in this embodiment, set the ratio threshold to 80%, specifically set according to actual needs. For example, when
Figure 347958DEST_PATH_IMAGE007
When the number of the pixels is 2, judging whether the ratio of the number of the pixels which are not to be selected and are obvious in the increased area is more than 80 percent, if so, stopping circulation and enabling the number of the pixels to be selected and the number of the pixels to be not selected and are obvious to be not selected to be the same as the ratio of the number of the pixels to be selected and the area to be selected to be different from the area to be selected and the area to be different from the area to be selected, if not, stopping circulation and enabling the area to be different from the area to be selected and the area to be different from the area to be selected to be different from the area to be selected and the area to be different from the area to be selected and to be different from the area to be selected and to be different from the area to be selected, and to be different from the area to be selected and to be different from the area to be different from the area to be
Figure 161062DEST_PATH_IMAGE030
(ii) a If not, then order
Figure 954706DEST_PATH_IMAGE007
Is 4, and judges
Figure 511458DEST_PATH_IMAGE007
Area ratio corresponding to 4
Figure 605316DEST_PATH_IMAGE007
The region with the corresponding region excess of 2 is not to be selectedIf the proportion of the number of the significant pixels is more than 80%, stopping circulation to enable the number of the significant pixels to be larger than 80%
Figure 589321DEST_PATH_IMAGE031
(ii) a If not, the increment is continued until the set condition is met, and the command is sent
Figure 135840DEST_PATH_IMAGE007
Equal to the value at which the condition is satisfied.
Thus, in this embodiment, a linear region corresponding to each linear line is obtained.
In this embodiment, the pixel points in the linear region corresponding to each linear line are recorded as linear pixel points, then the linear pixel points existing in the to-be-selected salient region are removed, and the remaining to-be-selected salient region is recorded as a target to-be-selected salient region.
Next, in this embodiment, each to-be-selected significant pixel point in the target to-be-selected significant region is classified to obtain each growth set, specifically:
taking any one to-be-selected significant pixel point in a target to-be-selected significant region as an initial growth point, searching whether to-be-selected significant pixel points belonging to the target to-be-selected significant region exist in a 5 × 5 window taking the initial growth point as a center, if so, merging the to-be-selected significant pixel points in the window into a first growth set, then respectively taking other to-be-selected significant pixel points in the window corresponding to the initial growth point as new initial growth points, judging whether to-be-selected significant pixel points belonging to the target to-be-selected significant region exist in the 5 × 5 window corresponding to the new initial growth point, if so, merging the to-be-selected significant pixel points in the window into the same growth set (namely the first growth set) as the initial growth point, and continuing to grow; if not, stopping growth, thus obtaining a growth set; after the growth set is obtained, any one of the to-be-selected significant pixel points outside the first growth set in the target to-be-selected significant region is continuously selected as a new initial growth point by adopting the above operation, and the growth is performed until the traversal of the to-be-selected significant pixel points in the target to-be-selected significant region is completed, so that each growth set is obtained in the embodiment. The above process is similar to the conventional region growing algorithm, and the present embodiment only changes the determination condition and the window size, and therefore, detailed description is omitted.
Then, if the number of the to-be-selected significant pixels included in the growth set is smaller than a second threshold, the growth set is considered to be too small to form a scar defect region, and therefore the growth set in which the number of the to-be-selected significant pixels in each growth set is greater than or equal to the second threshold is selected and recorded as a target growth set in the embodiment; the size of the second threshold is set according to actual needs, and the second threshold is set to 20 in this embodiment. And then analyzing the target growth set to obtain a scab area and the edge of the scab area in the surface image of the steel pipe to be detected, wherein for any target growth set:
acquiring a maximum vertical coordinate and a minimum vertical coordinate (namely a maximum row and a minimum row in an image) according to coordinates corresponding to each to-be-selected significant pixel point in the target growth set, wherein each to-be-selected significant pixel point in the target growth set is in an area between the maximum vertical coordinate and the minimum vertical coordinate in the to-be-detected steel pipe surface image; then, in this embodiment, according to the coordinates of each to-be-selected significant pixel point in the target growth set, the area of the region of the target growth set corresponding to the surface image of the steel pipe to be detected (that is, the area of the region of each to-be-selected significant pixel point in the target growth set in the surface image of the steel pipe to be detected is recorded as the area of the region corresponding to the target growth set), that is,:
Figure 230704DEST_PATH_IMAGE032
wherein S is the area of the region corresponding to the target growth set,
Figure 100440DEST_PATH_IMAGE009
is the maximum ordinate corresponding to the target growth set,
Figure 740500DEST_PATH_IMAGE010
is the minimum ordinate corresponding to the target growth set,
Figure 23583DEST_PATH_IMAGE011
the maximum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set,
Figure 469608DEST_PATH_IMAGE012
the minimum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set is obtained,
Figure 521746DEST_PATH_IMAGE013
the width of the pixel point is defaulted to 1 in this embodiment, and is specifically set according to actual needs.
This embodiment will
Figure 598287DEST_PATH_IMAGE033
And
Figure 368665DEST_PATH_IMAGE034
taking the corresponding pixel point as a boundary pixel point of the region corresponding to the target growth set in the y-th row (namely the row corresponding to y in the ordinate), namely taking the pixel point to be selected with the maximum abscissa and the pixel point to be selected with the minimum abscissa in the pixel points to be selected corresponding to each ordinate between the maximum ordinate and the minimum ordinate in the target growth set as the boundary pixel point of the region corresponding to the target growth set; in this embodiment, the boundary pixel points of the region corresponding to the target growth set are connected by using an interpolation method, so as to obtain the edge of the region corresponding to the target growth set (i.e., the boundary of the corresponding region). The interpolation method in this embodiment is the prior art, and will not be described herein.
In this embodiment, the ratio of the number of to-be-selected significant pixels corresponding to the target growth set to the area of the region corresponding to the target growth set is calculated, and the ratio is taken as the density of the region corresponding to the target growth set, that is, the ratio is:
Figure 556064DEST_PATH_IMAGE035
wherein,
Figure 462709DEST_PATH_IMAGE036
for the density of the region corresponding to the target growth set,
Figure 631522DEST_PATH_IMAGE037
and the number of the to-be-selected significant pixels corresponding to the target growth set is counted. If the density of the area corresponding to the target growth set is greater than a third threshold value, determining that the area corresponding to the target growth set is a scab area, namely, a scab defect exists in the surface image of the steel pipe to be detected, and taking the edge of the area corresponding to the target growth set in the surface image of the steel pipe to be detected as a contour edge of the scab area (namely, as a boundary of the scab area); otherwise, judging that the area corresponding to the target growth set is not a scar area.
According to the method, each target growth set is analyzed according to the process, and then a scab area existing in the surface image of the steel pipe to be detected and the outline edge of the scab area are obtained; and if the area corresponding to each target growth set is not judged to be the scab area, indicating that no scab defect exists in the surface image of the steel pipe to be detected.
Step S4, processing the steel pipe surface image to be detected to obtain a corresponding target edge image, wherein the target edge image does not include an edge line corresponding to the contour edge of the scab area; and obtaining a crease defect area and a scratch defect area according to each edge line in the target edge image.
The present embodiment detects the scab defect existing in the image of the surface of the steel pipe to be detected according to step S3.
Then, the folding defects and the scratch defects in the surface image of the steel pipe to be detected are detected according to the characteristics of the folding defects and the scratch defects; considering that the existence of the scab defect can interfere with the judgment of the folding defect, the influence factors are mainly two aspects, in the first aspect, unnecessary edge lines can be introduced into the boundary of the scab defect, and the edge lines can be mistaken for folding lines in the folding defect; on the other hand, the occurrence of the scab defect can cause the folding line which appears on the scab defect to deflect and twist to a certain degree, the deflection means that the folding line has a certain inclination angle with the normal folding line and is not parallel to the normal folding line any more, and the twist means that the folding line is not a pure straight line any more and the phenomenon of deformation is possible to occur; therefore, in this embodiment, the scarring defect is first detected, and if the scarring defect exists, the interference of the scarring defect needs to be eliminated first when the folding defect is subsequently detected, specifically:
in the embodiment, firstly, extracting edge lines in a surface image of a steel pipe to be detected by adopting a canny operator to obtain a corresponding edge image; if the steel pipe surface image to be detected does not have the scab defect, recording the edge image as a target edge image; if the steel pipe surface image to be detected has the scab defect, removing edge lines of the contour edge belonging to the scab area in the edge image (namely removing edge lines of the boundary belonging to the scab area in the edge image), considering that if other edge lines are intersected with the edge lines corresponding to the contour edge of the scab area, when the edge lines corresponding to the contour edge of the scab area are removed, partial pixels of the other edge lines are removed, and then the other edge lines are notched, therefore, the embodiment judges that there are no intersection points of the other edge lines and the edge lines corresponding to the contour edge of the scab area, if two edge lines are intersected with the edge lines corresponding to the contour edge of the scab defect area, then acquiring the Euclidean distance between the intersection points of the two edge lines and the edge lines corresponding to the contour edge of the scab defect area, and if the Euclidean distance is smaller than a preset distance threshold value, combining the two edge profiles, namely, filling gaps of the two edge lines by adopting an interpolation method; the preset distance threshold is set according to actual needs. For example, as shown in fig. 2, where 1 is an edge line corresponding to the contour edge of the scar defect area, 2 is a first edge line, 3 is a second edge line, and 4 is a third edge line, where 2 has a point of intersection with the outer edge of 1, 3 has two points of intersection with the inner side of 1, and 4 has a point of intersection with the outer side of 1; after the contour edge of the scar defect area is removed, a gap exists between 2 and 3, the Euclidean distance of the gap (the Euclidean distance of two intersection points between 2 and 3) is smaller than a distance threshold, the 2 and 3 are the same edge line, and the gap is filled by adopting an interpolation method; 3 and 4, the Euclidean distance of the notch (the Euclidean distance of the intersection point between 3 and 4) is larger than the distance threshold, and the fact that 2 and 3 are not the same edge line means that the notch does not need to be filled.
Considering that the corresponding concave part of the scratch has a deep depth, a large width and a large length, the canny operator can detect edge lines on two sides of the scratch (because the shot surface image of the steel pipe to be detected is a partial surface of the steel pipe to be detected); whereas for fold defects the fold line depressions are thinner and shallower, the fold lines are parallel to each other, but in the area of the scarring defects the fold lines may deflect and distort.
For any edge line in the target edge image: acquiring a Hessian matrix corresponding to each pixel point on the edge line, calculating the principal component direction of the Hessian matrix corresponding to each pixel point by adopting a PCA algorithm, taking the principal component direction of the Hessian matrix corresponding to each pixel point as the direction angle corresponding to each pixel point, calculating the average value of the direction angles corresponding to all the pixel points on the edge line, and taking the obtained average value as the direction angle corresponding to the edge line; then, according to the coordinates corresponding to each pixel point on the edge line, obtaining a Pearson coefficient corresponding to the edge line, wherein the value range of the Pearson coefficient is [0,1], the Pearson coefficient represents the linear correlation of the edge line, namely the linear approximation degree, the more the Pearson coefficient is close to 1, the closer the edge line is to the straight line, otherwise, the more the Pearson coefficient is close to 0, the more the edge line is deviated from the straight line; and finally, extracting the edge of the single pixel point of the edge line by utilizing image thinning operation, and taking the number of the pixel points on the edge of the single pixel point corresponding to the edge line as the length corresponding to the edge line. Thus, the direction angle, the pearson coefficient and the length corresponding to each edge line in the target edge image can be obtained in the embodiment. In this embodiment, the process of acquiring the Hessian matrix, the PCA algorithm, the image thinning operation, and the pearson coefficient are prior art, and are not described herein again.
Then, the present embodiment calculates the width between any two edge lines in the target edge image, specifically:
for any two edge lines in the target edge image: recording the two edge lines as a first edge line and a second edge line respectively, sequentially traversing each pixel point on the first edge line, and for any pixel point: making a straight line passing through the pixel point, wherein the inclination angle of the straight line is different from the direction angle corresponding to the first edge line
Figure 639930DEST_PATH_IMAGE020
Acquiring coordinates of pixel points of which the straight lines intersect with the second edge lines, calculating Euclidean distance between the two pixel points according to the coordinates corresponding to the pixel points and the coordinates of the pixel points of which the straight lines intersect with the second edge lines, and recording the Euclidean distance as the width corresponding to the pixel points; and obtaining the corresponding width of each pixel point on the first edge line, and taking the average value of the corresponding widths of all the pixel points on the first edge as the width between the first edge line and the second edge line. The present embodiment can obtain the width between any two edge lines in the target edge image according to the above process.
If the Pearson coefficients corresponding to any two edge lines in the target edge image are both greater than the linear approximation threshold value
Figure 880287DEST_PATH_IMAGE014
The absolute value of the difference value of the corresponding lengths is smaller than the length difference threshold value, and the absolute value of the difference value of the corresponding direction angles is smaller than the direction angle difference threshold value
Figure 657750DEST_PATH_IMAGE015
And if the width between any two edge lines is less than the width threshold value, dividing the two edge lines into a group. The length difference threshold and the width threshold are set according to actual needs.
In the present embodiment, the threshold of the degree of linear approximation is
Figure 59781DEST_PATH_IMAGE016
The direction angle difference threshold is
Figure 555485DEST_PATH_IMAGE017
Wherein
Figure 333954DEST_PATH_IMAGE019
For the first adaptation of the parameter(s),
Figure 965923DEST_PATH_IMAGE018
adjusting a parameter for a second adaptation; considering that if an edge line falls into the scar region, the edge line may be deflected and distorted, the deflection may make the absolute value of the difference between the direction angles corresponding to the two edge lines larger, and the distortion may make the pearson coefficient of the edge line lower, so that the parallelism threshold needs to be increased
Figure 70015DEST_PATH_IMAGE015
Reducing threshold of degree of linear approximation
Figure 584173DEST_PATH_IMAGE014
I.e. increasing the first adaptive adjustment parameter
Figure 166332DEST_PATH_IMAGE019
And a second adaptive adjustment parameter
Figure 918388DEST_PATH_IMAGE018
. The embodiment acquires the number of the pixel points on all the edge lines in the target edge image in the scab area
Figure 927801DEST_PATH_IMAGE021
And the total number of all pixel points on all edge lines
Figure 132517DEST_PATH_IMAGE022
Then the embodiment is based on
Figure 518368DEST_PATH_IMAGE021
And
Figure 859351DEST_PATH_IMAGE022
to obtain
Figure 39665DEST_PATH_IMAGE019
And
Figure 731678DEST_PATH_IMAGE018
i.e. by
Figure 327744DEST_PATH_IMAGE023
Figure 61518DEST_PATH_IMAGE024
In this embodiment, based on the above conditions, each edge line in the target edge image is grouped to obtain each edge line corresponding to each group.
For any group: if the group only comprises two edge lines, the two edge lines in the group belong to two side edges of the scratch defect, and the area between the two edge lines is a scratch defect area; if the group comprises more than two edge lines, the edge lines are crease lines of the crease defects, the maximum abscissa and the maximum ordinate combination, the maximum abscissa and the minimum ordinate combination, the minimum abscissa and the maximum ordinate combination, the minimum abscissa and the minimum ordinate combination, which correspond to all pixel points on all edge lines in the group, are combined to obtain four coordinates, then four vertexes (namely pixel points corresponding to the four coordinates) of the crease defect area are formed, and the four vertexes are connected to obtain the crease defect area; if none of the defects are met, the defect is not present.
In the embodiment, each group is analyzed to detect whether a defect exists in the surface image of the steel pipe to be detected, if so, a crease defect area and a scratch defect area in the surface image of the steel pipe to be detected are identified, and the detected defect area is mapped to the surface image of the steel pipe to be detected, so that the crease defect area and the scratch defect area in the surface image of the steel pipe to be detected are obtained.
So far, the embodiment detects the surface image of the steel pipe to be detected to determine whether the three defects described in the embodiment exist in the surface image of the steel pipe to be detected, and if so, identifies the positions corresponding to different defects.
According to the embodiment, firstly, a salient region to be selected in the surface image of the steel pipe to be detected is obtained according to the obtained salient image corresponding to the surface image of the steel pipe to be detected; then classifying all to-be-selected significant pixel points in the to-be-selected significant region to obtain all growth sets; in the embodiment, a growth set with the number of to-be-selected significant pixels in each growth set greater than or equal to a second threshold is selected and recorded as a target growth set; then obtaining a scab area and a contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set; finally, the steel pipe surface image to be detected is processed by the embodiment to obtain a corresponding target edge image, and then a crease defect area and a scratch defect area are obtained according to each edge line in the target edge image. The embodiment detects the image of the surface of the steel pipe in an image processing mode, judges whether the surface of the steel pipe has defects or not, identifies the positions of different defects, and realizes more accurate detection of various defects on the surface of the steel pipe with lower cost.
It should be noted that: the above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (9)

1. An intelligent detection method for defects of steel pipes is characterized by comprising the following steps:
acquiring a surface image of a steel pipe to be detected;
acquiring a saliency map corresponding to the surface image of the steel pipe to be detected; obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the corresponding salient value of each pixel point in the salient map, wherein the salient region to be selected comprises each salient pixel point to be selected in the surface image of the steel pipe to be detected;
classifying all to-be-selected significant pixel points in a to-be-selected significant region to obtain all growth sets, wherein each growth set comprises all to-be-selected significant pixel points belonging to the growth set; selecting growth sets with the number of to-be-selected significant pixel points in each growth set larger than or equal to a second threshold value, and recording as target growth sets; obtaining a scab area and a contour edge of the scab area in the surface image of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set;
processing the surface image of the steel pipe to be detected to obtain a corresponding target edge image, wherein the target edge image does not include edge lines corresponding to the contour edge of the scab area; and obtaining a crease defect area and a scratch defect area according to each edge line in the target edge image.
2. The intelligent detection method for the defects of the steel pipe according to claim 1, characterized by obtaining a saliency map corresponding to the surface image of the steel pipe to be detected; obtaining a salient region to be selected in the surface image of the steel pipe to be detected according to the salient value corresponding to each pixel point in the salient map, wherein the salient region to be selected comprises:
processing the surface image of the steel pipe to be detected by using a visual saliency algorithm to obtain a saliency map corresponding to the surface image of the steel pipe to be detected;
obtaining an optimal segmentation threshold according to the saliency value corresponding to each pixel point in the saliency map and the Otsu method;
marking the pixel points with the significant values larger than the optimal segmentation threshold value in the significant graph as the significant pixel points to be selected, and marking the set formed by the significant pixel points to be selected as the significant pixel point set to be selected;
marking the pixel points with the significant value less than or equal to the optimal segmentation threshold value in the significant graph as non-significant pixel points, and marking a set formed by all the non-significant pixel points as a non-significant pixel point set;
calculating the ratio of the average value of the significant values corresponding to all the pixels in the to-be-selected significant pixel point set to the average value of the significant values corresponding to all the pixels in the non-significant pixel point set;
if the ratio is smaller than or equal to a first threshold value, judging that no scab defect exists in the surface image of the steel pipe to be detected;
if the ratio is larger than the first threshold, marking pixel points corresponding to all pixel points in the to-be-selected significant pixel point set in the to-be-detected steel pipe surface image as to-be-selected significant pixel points, and marking an area formed by all to-be-selected significant pixel points in the to-be-detected steel pipe surface image as to-be-selected significant areas.
3. The intelligent detection method for the defects of the steel pipes according to claim 1, wherein the step of classifying the to-be-selected significant pixel points in the to-be-selected significant region to obtain each growth set comprises the following steps:
extracting straight lines in the salient region to be selected by utilizing Hough straight line detection to obtain all straight lines in the salient region to be selected;
processing each straight line existing in the salient region to be selected to obtain a straight line region corresponding to each straight line;
marking the pixel points in the linear area corresponding to each straight line as linear pixel points; removing straight line pixel points existing in the salient region to be selected, and recording the remaining salient region to be selected as a target salient region to be selected;
taking any one to-be-selected significant pixel point in the target to-be-selected significant region as an initial growth point, judging whether to have the to-be-selected significant pixel point belonging to the target to-be-selected significant region in a window with the size of 5 multiplied by 5 and taking the initial growth point as a center, and if so, merging the to-be-selected significant pixel point in the window into a first growth set; respectively taking other to-be-selected significant pixel points except the initial growth point in the window corresponding to the initial growth point as new initial growth points, judging whether to-be-selected significant pixel points belonging to a target to-be-selected significant region exist in the window with the size of 5 multiplied by 5 corresponding to the new initial growth point, if so, merging the to-be-selected significant pixel points in the window into a first growth set, continuing to grow, and if not, stopping growing to obtain a first growth set; and by analogy, selecting any one of the to-be-selected significant pixel points outside the first growth set in the target to-be-selected significant region as a new initial growth point, and growing until all the to-be-selected significant pixel points in the target to-be-selected significant region are traversed completely to obtain all the growth sets.
4. The intelligent steel pipe defect detection method according to claim 3, wherein the processing of each straight line existing in the to-be-selected salient region to obtain a straight line region corresponding to each straight line comprises:
for any straight line:
the equation corresponding to the straight line is
Figure 447729DEST_PATH_IMAGE001
Wherein x is the abscissa of the pixel, y is the ordinate of the pixel,
Figure 609720DEST_PATH_IMAGE002
is the minimum value of the abscissa corresponding to each pixel point on the straight line,
Figure 123747DEST_PATH_IMAGE003
is the maximum value of the abscissa corresponding to each pixel point on the straight line, k is the slope corresponding to the straight line, and b is the intercept corresponding to the straight line;
respectively setting two straight lines parallel to the straight line, and marking as a first straight line and a second straight line; the equation of the first line is
Figure 80202DEST_PATH_IMAGE004
The equation of the second line is
Figure 414100DEST_PATH_IMAGE005
In which
Figure 379782DEST_PATH_IMAGE006
Connecting the end points of the first straight line and the second straight line, and recording the formed area as a straight line area corresponding to the straight line;
the above-mentioned
Figure 748315DEST_PATH_IMAGE007
The obtaining method comprises the following steps:
will be provided with
Figure 141250DEST_PATH_IMAGE007
Increasing from 0, increasing by 2 each time until the proportion of the pixels which are not to-be-selected significant pixels in the pixels contained in the region which is increased more than before the increase is larger than a proportion threshold value, and taking the value which finally meets the condition as the value
Figure 837811DEST_PATH_IMAGE007
The value of (c).
5. The intelligent steel pipe defect detection method according to claim 1, wherein obtaining the scarred area and the contour edge of the scarred area in the image of the surface of the steel pipe to be detected according to the number of the to-be-selected significant pixel points in each target growth set comprises:
for any target growth set:
acquiring a maximum vertical coordinate and a minimum vertical coordinate according to coordinates corresponding to each to-be-selected significant pixel point in the target growth set;
obtaining the area of the corresponding region of the target growth set in the surface image of the steel pipe to be detected according to the coordinates of the significant pixel points to be selected in the target growth set, and recording the area as the area of the corresponding region of the target growth set;
for any ordinate in the target growth set between the maximum and minimum ordinates: taking the to-be-selected significant pixel point with the maximum abscissa and the to-be-selected significant pixel point with the minimum abscissa in the to-be-selected significant pixel points corresponding to the ordinate in the target growth set as boundary pixel points of the region corresponding to the target growth set;
connecting boundary pixel points of the region corresponding to the target growth set by adopting an interpolation method to obtain the edge of the region corresponding to the target growth set;
calculating the ratio of the number of the to-be-selected significant pixels corresponding to the target growth set to the area of the region corresponding to the target growth set, and taking the ratio as the density of the region corresponding to the target growth set;
if the density of the area corresponding to the target growth set is less than or equal to a third threshold value, judging that the area corresponding to the target growth set is not a scab area; if the density of the area corresponding to the target growth set is larger than a third threshold value, the area corresponding to the target growth set is judged to be a scab area, and the edge of the area corresponding to the target growth set in the surface image of the steel pipe to be detected is used as the outline edge of the scab area.
6. The intelligent detection method for the defects of the steel pipes according to claim 5, wherein the area of the region corresponding to the target growth set is calculated by adopting the following formula:
Figure 590872DEST_PATH_IMAGE008
wherein S is the area of the region corresponding to the target growth set,
Figure 299065DEST_PATH_IMAGE009
for the maximum ordinate corresponding to the target growth set,
Figure 830279DEST_PATH_IMAGE010
for the minimum ordinate corresponding to the target growth set,
Figure 889501DEST_PATH_IMAGE011
the maximum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set,
Figure 446254DEST_PATH_IMAGE012
the minimum value of the abscissa corresponding to each to-be-selected significant pixel point with the ordinate of y in the target growth set is obtained,
Figure 399166DEST_PATH_IMAGE013
is the width of a pixelAnd (4) degree.
7. The intelligent detection method for the defects of the steel pipe according to claim 1, wherein the step of processing the surface image of the steel pipe to be detected to obtain a corresponding target edge image comprises the following steps:
extracting edge lines in the surface image of the steel pipe to be detected by adopting a canny operator to obtain a corresponding edge image;
if the steel pipe surface image to be detected has the scab defect, removing edge lines of the contour edge belonging to the scab area in the edge image, and completing gaps of the edge lines intersected with the edge lines of the contour edge of the scab area in the edge image by adopting an interpolation method to obtain a target edge image; the notch of the edge line is caused by removing the edge line corresponding to the contour edge of the scar area.
8. The intelligent detection method for the steel pipe defects according to claim 1, wherein the obtaining of the crease defect area and the scratch defect area in the surface image of the steel pipe to be detected according to each edge line in the target edge image comprises:
for any edge line: acquiring a Hessian matrix corresponding to each pixel point on the edge line; calculating the principal component direction of the Hessian matrix corresponding to each pixel point by adopting a PCA algorithm, and taking the principal component direction of the Hessian matrix corresponding to each pixel point as the direction angle corresponding to each pixel point; calculating the average value of the direction angles corresponding to all the pixel points on the edge line, and taking the average value as the direction angle corresponding to the edge line; obtaining a Pearson coefficient corresponding to the edge line according to the coordinates corresponding to each pixel point on the edge line; extracting the edge of the single pixel point of the edge line by utilizing image thinning operation, and taking the number of the pixel points on the edge of the single pixel point corresponding to the edge line as the length corresponding to the edge line;
for any two edge lines in the target edge image: marking the two edge lines as a first edge line and a second edge line respectively; obtaining the width between the two edge lines according to the coordinates of each pixel point on the first edge line and the second edge line;
if the Pearson coefficients corresponding to any two edge lines in the target edge image are both greater than the linear approximation threshold value
Figure 133904DEST_PATH_IMAGE014
The absolute value of the difference value of the corresponding lengths is smaller than the length difference threshold value, and the absolute value of the difference value of the corresponding direction angles is smaller than the direction angle difference threshold value
Figure 929690DEST_PATH_IMAGE015
If the width between any two edge lines is smaller than the width threshold, dividing the two edge lines into a group to obtain each edge line corresponding to each group; the above-mentioned
Figure 509707DEST_PATH_IMAGE016
Said
Figure 707339DEST_PATH_IMAGE017
Wherein, in the process,
Figure 347399DEST_PATH_IMAGE018
for the second adaptation of the parameter(s),
Figure 630482DEST_PATH_IMAGE019
adjusting a parameter for a first adaptation;
for any group: if the group only comprises two edge lines, judging that the two edge lines in the group belong to the two side edges of the scratch defect, and taking the area between the two edge lines as a scratch defect area; if the group comprises more than two edge lines, judging the edge lines as crease lines of the crease defects, and combining the maximum abscissa and the maximum ordinate, the maximum abscissa and the minimum ordinate, the minimum abscissa and the maximum ordinate, and the minimum abscissa and the minimum ordinate, which correspond to all pixel points on all the edge lines in the group, to obtain four coordinates; and connecting the pixel points corresponding to the four coordinates to obtain a crease defect area.
9. The intelligent steel pipe defect detection method according to claim 8, wherein the obtaining of the width between the first edge line and the second edge line according to the coordinates of each pixel point on the two edge lines comprises:
for any pixel point on the first edge line: making a straight line passing through the pixel point, wherein the difference between the inclination angle of the straight line and the direction angle corresponding to the first edge line
Figure 279769DEST_PATH_IMAGE020
Calculating the Euclidean distance between the two pixel points according to the coordinate corresponding to the pixel point and the coordinate of the pixel point where the straight line intersects with the second edge line, and recording the Euclidean distance as the width corresponding to the pixel point;
taking the average value of the widths corresponding to all the pixel points on the first edge as the width between the first edge line and the second edge line;
the described
Figure 597487DEST_PATH_IMAGE019
And the above
Figure 408448DEST_PATH_IMAGE018
The obtaining method comprises the following steps:
obtaining the number of pixel points on all edge lines in the target edge image in the scab area
Figure 913248DEST_PATH_IMAGE021
And the total number of all pixel points on all edge lines
Figure 366226DEST_PATH_IMAGE022
The above-mentioned
Figure 538450DEST_PATH_IMAGE019
The calculation formula of (c) is:
Figure 644946DEST_PATH_IMAGE023
the above-mentioned
Figure 433780DEST_PATH_IMAGE018
The calculation formula of (2) is as follows:
Figure 424869DEST_PATH_IMAGE024
CN202210858986.0A 2022-07-21 2022-07-21 Intelligent detection method for steel pipe defects Active CN114937039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210858986.0A CN114937039B (en) 2022-07-21 2022-07-21 Intelligent detection method for steel pipe defects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210858986.0A CN114937039B (en) 2022-07-21 2022-07-21 Intelligent detection method for steel pipe defects

Publications (2)

Publication Number Publication Date
CN114937039A true CN114937039A (en) 2022-08-23
CN114937039B CN114937039B (en) 2022-10-25

Family

ID=82868980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210858986.0A Active CN114937039B (en) 2022-07-21 2022-07-21 Intelligent detection method for steel pipe defects

Country Status (1)

Country Link
CN (1) CN114937039B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131387A (en) * 2022-08-25 2022-09-30 山东鼎泰新能源有限公司 Gasoline engine spray wall collision parameter automatic extraction method and system based on image processing
CN115147407A (en) * 2022-08-29 2022-10-04 聊城市博源节能科技有限公司 Bearing quality detection method based on computer vision
CN115272335A (en) * 2022-09-29 2022-11-01 江苏万森绿建装配式建筑有限公司 Metallurgical metal surface defect detection method based on significance detection
CN115375685A (en) * 2022-10-25 2022-11-22 临沂天元混凝土工程有限公司 Method for detecting sand particle size abnormity in concrete raw material
CN115375688A (en) * 2022-10-25 2022-11-22 苏州德斯米尔智能科技有限公司 Automatic detection method for belt type conveying equipment
CN115511888A (en) * 2022-11-22 2022-12-23 深圳市岑科实业有限公司 Inductance defect detection method and system based on vision
CN115797353A (en) * 2023-02-08 2023-03-14 山东乾钢金属科技有限公司 Intelligent detection system and method for quality of cold-rolled strip steel
CN115861307A (en) * 2023-02-21 2023-03-28 深圳市百昌科技有限公司 Fascia gun power supply drive plate welding fault detection method based on artificial intelligence
CN116152248A (en) * 2023-04-20 2023-05-23 中科慧远视觉技术(北京)有限公司 Appearance defect detection method and device, storage medium and computer equipment
CN116258713A (en) * 2023-05-11 2023-06-13 青岛穗禾信达金属制品有限公司 Welding processing detection method for metal cabinet
CN117078680A (en) * 2023-10-16 2023-11-17 张家港极客嘉智能科技研发有限公司 Abnormal detection method for pipe gallery support and hanger for inspection robot
CN117474924A (en) * 2023-12-28 2024-01-30 山东鲁抗医药集团赛特有限责任公司 Label defect detection method based on machine vision

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3013438A1 (en) * 2013-12-27 2015-07-02 Jfe Steel Corporation Surface defect detecting method and surface defect detecting apparatus
CN107610103A (en) * 2017-08-30 2018-01-19 西安石油大学 A kind of steel pipe helical arc welded seam area extracting method based on x-ray imaging
CN109489591A (en) * 2018-12-17 2019-03-19 吉林大学 Plane scratch length non-contact measurement method based on machine vision
CN109872300A (en) * 2018-12-17 2019-06-11 南京工大数控科技有限公司 A kind of vision significance detection method of friction plate open defect
CN110766660A (en) * 2019-09-25 2020-02-07 上海众壹云计算科技有限公司 Integrated circuit defect image recognition and classification system based on fusion depth learning model
CN111667462A (en) * 2020-05-12 2020-09-15 常熟理工学院 Automatic detection method and system for small and weak targets in welding defects
CN112150412A (en) * 2020-08-31 2020-12-29 衢州光明电力投资集团有限公司赋腾科技分公司 Insulator self-explosion defect detection method based on projection curve analysis
CN112668725A (en) * 2020-05-21 2021-04-16 广东顺德募优网络科技有限公司 Metal hand basin defect target training method based on improved features
CN112712512A (en) * 2021-01-05 2021-04-27 余波 Hot-rolled strip steel scab defect detection method and system based on artificial intelligence
EP3889589A1 (en) * 2018-11-30 2021-10-06 JFE Steel Corporation Surface defect detecting method, surface defect detecting device, method for manufacturing steel material, steel material quality control method, steel material manufacturing equipment, method for creating surface defect determination model, and surface defect determination model
CN113496483A (en) * 2021-06-22 2021-10-12 华南理工大学 Weld seam air hole defect detection method based on image processing
CN113781402A (en) * 2021-08-19 2021-12-10 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Method and device for detecting chip surface scratch defects and computer equipment
CN113822890A (en) * 2021-11-24 2021-12-21 中科慧远视觉技术(北京)有限公司 Microcrack detection method, device and system and storage medium
CN113920122A (en) * 2021-12-15 2022-01-11 山东鹰联光电科技股份有限公司 Cable defect detection method and system based on artificial intelligence
CN114096692A (en) * 2019-07-09 2022-02-25 杰富意钢铁株式会社 Seamless steel pipe having excellent sulfuric acid dew point corrosion resistance and method for producing same
CN114219805A (en) * 2022-02-22 2022-03-22 武汉旺佳玻璃制品有限公司 Intelligent detection method for glass defects
CN114414660A (en) * 2022-03-18 2022-04-29 盐城工学院 Method for identifying axle number and cracks of railway vehicle wheel set
CN114549497A (en) * 2022-02-28 2022-05-27 扬州市恒邦机械制造有限公司 Method for detecting surface defects of walking board based on image recognition and artificial intelligence system
CN114693686A (en) * 2022-06-02 2022-07-01 启东市鸿盛纺织有限公司 Method for detecting stains on bed sheet cloth
CN114705686A (en) * 2022-03-21 2022-07-05 佛山科学技术学院 Method and system for detecting surface defects of cylindrical pot, controller and industrial personal computer

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3013438A1 (en) * 2013-12-27 2015-07-02 Jfe Steel Corporation Surface defect detecting method and surface defect detecting apparatus
CN107610103A (en) * 2017-08-30 2018-01-19 西安石油大学 A kind of steel pipe helical arc welded seam area extracting method based on x-ray imaging
EP3889589A1 (en) * 2018-11-30 2021-10-06 JFE Steel Corporation Surface defect detecting method, surface defect detecting device, method for manufacturing steel material, steel material quality control method, steel material manufacturing equipment, method for creating surface defect determination model, and surface defect determination model
CN109489591A (en) * 2018-12-17 2019-03-19 吉林大学 Plane scratch length non-contact measurement method based on machine vision
CN109872300A (en) * 2018-12-17 2019-06-11 南京工大数控科技有限公司 A kind of vision significance detection method of friction plate open defect
CN114096692A (en) * 2019-07-09 2022-02-25 杰富意钢铁株式会社 Seamless steel pipe having excellent sulfuric acid dew point corrosion resistance and method for producing same
CN110766660A (en) * 2019-09-25 2020-02-07 上海众壹云计算科技有限公司 Integrated circuit defect image recognition and classification system based on fusion depth learning model
CN111667462A (en) * 2020-05-12 2020-09-15 常熟理工学院 Automatic detection method and system for small and weak targets in welding defects
CN112668725A (en) * 2020-05-21 2021-04-16 广东顺德募优网络科技有限公司 Metal hand basin defect target training method based on improved features
CN112150412A (en) * 2020-08-31 2020-12-29 衢州光明电力投资集团有限公司赋腾科技分公司 Insulator self-explosion defect detection method based on projection curve analysis
CN112712512A (en) * 2021-01-05 2021-04-27 余波 Hot-rolled strip steel scab defect detection method and system based on artificial intelligence
CN113496483A (en) * 2021-06-22 2021-10-12 华南理工大学 Weld seam air hole defect detection method based on image processing
CN113781402A (en) * 2021-08-19 2021-12-10 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Method and device for detecting chip surface scratch defects and computer equipment
CN113822890A (en) * 2021-11-24 2021-12-21 中科慧远视觉技术(北京)有限公司 Microcrack detection method, device and system and storage medium
CN113920122A (en) * 2021-12-15 2022-01-11 山东鹰联光电科技股份有限公司 Cable defect detection method and system based on artificial intelligence
CN114219805A (en) * 2022-02-22 2022-03-22 武汉旺佳玻璃制品有限公司 Intelligent detection method for glass defects
CN114549497A (en) * 2022-02-28 2022-05-27 扬州市恒邦机械制造有限公司 Method for detecting surface defects of walking board based on image recognition and artificial intelligence system
CN114414660A (en) * 2022-03-18 2022-04-29 盐城工学院 Method for identifying axle number and cracks of railway vehicle wheel set
CN114705686A (en) * 2022-03-21 2022-07-05 佛山科学技术学院 Method and system for detecting surface defects of cylindrical pot, controller and industrial personal computer
CN114693686A (en) * 2022-06-02 2022-07-01 启东市鸿盛纺织有限公司 Method for detecting stains on bed sheet cloth

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
FRANCISCO BONNIN-PASCUAL 等: "On the use of robots and vision technologies for the inspection of vessels:A survey on recent advances", 《OCEAN ENGINEERING》 *
YI ZHAO 等: "Fast Welding Defect Inspection on Digital Radiography Images Using Saliency Detection", 《2021 4TH INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND BIG DATA》 *
李晓辉 等: "基于离散余弦变换和相位谱的钢管内表面缺陷检测", 《计算机***应用》 *
董家顺 等: "基于改进K-means算法的钢管表面缺陷视觉检测方法", 《武汉科技大学学报》 *
许春媛 等: "基于视觉显著性的钢管焊接区域气泡缺陷检测", 《冶金自动化》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131387A (en) * 2022-08-25 2022-09-30 山东鼎泰新能源有限公司 Gasoline engine spray wall collision parameter automatic extraction method and system based on image processing
CN115147407A (en) * 2022-08-29 2022-10-04 聊城市博源节能科技有限公司 Bearing quality detection method based on computer vision
CN115147407B (en) * 2022-08-29 2022-11-18 聊城市博源节能科技有限公司 Bearing quality detection method based on computer vision
CN115272335A (en) * 2022-09-29 2022-11-01 江苏万森绿建装配式建筑有限公司 Metallurgical metal surface defect detection method based on significance detection
CN115375685A (en) * 2022-10-25 2022-11-22 临沂天元混凝土工程有限公司 Method for detecting sand particle size abnormity in concrete raw material
CN115375688A (en) * 2022-10-25 2022-11-22 苏州德斯米尔智能科技有限公司 Automatic detection method for belt type conveying equipment
CN115511888A (en) * 2022-11-22 2022-12-23 深圳市岑科实业有限公司 Inductance defect detection method and system based on vision
CN115797353B (en) * 2023-02-08 2023-05-09 山东乾钢金属科技有限公司 Intelligent detection system and method for quality of cold-rolled strip steel
CN115797353A (en) * 2023-02-08 2023-03-14 山东乾钢金属科技有限公司 Intelligent detection system and method for quality of cold-rolled strip steel
CN115861307A (en) * 2023-02-21 2023-03-28 深圳市百昌科技有限公司 Fascia gun power supply drive plate welding fault detection method based on artificial intelligence
CN115861307B (en) * 2023-02-21 2023-04-28 深圳市百昌科技有限公司 Fascia gun power supply driving plate welding fault detection method based on artificial intelligence
CN116152248A (en) * 2023-04-20 2023-05-23 中科慧远视觉技术(北京)有限公司 Appearance defect detection method and device, storage medium and computer equipment
CN116258713A (en) * 2023-05-11 2023-06-13 青岛穗禾信达金属制品有限公司 Welding processing detection method for metal cabinet
CN117078680A (en) * 2023-10-16 2023-11-17 张家港极客嘉智能科技研发有限公司 Abnormal detection method for pipe gallery support and hanger for inspection robot
CN117078680B (en) * 2023-10-16 2024-01-23 张家港极客嘉智能科技研发有限公司 Abnormal detection method for pipe gallery support and hanger for inspection robot
CN117474924A (en) * 2023-12-28 2024-01-30 山东鲁抗医药集团赛特有限责任公司 Label defect detection method based on machine vision
CN117474924B (en) * 2023-12-28 2024-03-15 山东鲁抗医药集团赛特有限责任公司 Label defect detection method based on machine vision

Also Published As

Publication number Publication date
CN114937039B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN114937039B (en) Intelligent detection method for steel pipe defects
CN115375676B (en) Stainless steel product quality detection method based on image recognition
CN115170576B (en) Aluminum pipe surface defect detection method based on machine vision
CN111310558B (en) Intelligent pavement disease extraction method based on deep learning and image processing method
CN109410230B (en) Improved Canny image edge detection method capable of resisting noise
CN109682839B (en) Online detection method for surface defects of metal arc-shaped workpiece
CN114998350A (en) Stone defect detection method based on image processing
CN115063423B (en) Self-adaptive identification method for cold and hot cracks of mechanical castings based on computer vision
CN115294099B (en) Method and system for detecting hairline defect in steel plate rolling process
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN115330758B (en) Welding quality detection method based on denoising treatment
CN102982545A (en) Image depth estimation method
CN116993742B (en) Nickel alloy rolling defect detection method based on machine vision
CN116188468B (en) HDMI cable transmission letter sorting intelligent control system
CN105787912B (en) Classification-based step type edge sub-pixel positioning method
CN114926387A (en) Weld defect detection method and device based on background estimation and edge gradient suppression
CN111524156A (en) Overlapped citrus segmentation method based on distance transformation and angular point detection
CN114119603A (en) Image processing-based snack box short shot defect detection method
CN110765887A (en) Automatic identification technology and detection method for tunnel lining cracks
CN116152234B (en) Template end face defect identification method based on image processing
CN115994870B (en) Image processing method for enhancing denoising
CN115330769B (en) Defect detection method for aluminum pipe surface scratching and indentation
CN114994072A (en) Magnetic bar end surface defect detection method based on machine vision
CN113516121A (en) Multi-feature fusion non-motor vehicle license plate region positioning method
CN116309609B (en) Intelligent detection method for welding corrugated plates of container door panels

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