CN115311304A - Iron plate corrosion defect detection method - Google Patents

Iron plate corrosion defect detection method Download PDF

Info

Publication number
CN115311304A
CN115311304A CN202211248930.XA CN202211248930A CN115311304A CN 115311304 A CN115311304 A CN 115311304A CN 202211248930 A CN202211248930 A CN 202211248930A CN 115311304 A CN115311304 A CN 115311304A
Authority
CN
China
Prior art keywords
abnormal
connected domain
area
iron plate
obtaining
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
CN202211248930.XA
Other languages
Chinese (zh)
Other versions
CN115311304B (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.)
Jiangsu Mingfeng Food Co ltd
Original Assignee
Jiangsu Mingfeng Food 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 Jiangsu Mingfeng Food Co ltd filed Critical Jiangsu Mingfeng Food Co ltd
Priority to CN202211248930.XA priority Critical patent/CN115311304B/en
Publication of CN115311304A publication Critical patent/CN115311304A/en
Application granted granted Critical
Publication of CN115311304B publication Critical patent/CN115311304B/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/0006Industrial image inspection using a design-rule based approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention belongs to the technical field of iron plate corrosion defect detection, and particularly relates to an iron plate corrosion defect detection method. The method comprises the following steps: obtaining an iron plate corrosion region growth segmentation image corresponding to the iron plate corrosion gray level image and each connected domain on the iron plate corrosion region growth segmentation image based on a region growth algorithm; obtaining different abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; finally, obtaining an abnormal communication domain of the vacuum hole according to the area difference rate and the average distance; and repairing the abnormal communication region which is the vacuum hole to obtain an iron plate corrosion region. The invention can accurately determine the rust area of the iron plate.

Description

Iron plate corrosion defect detection method
Technical Field
The invention relates to the technical field of iron plate corrosion defect detection, in particular to an iron plate corrosion defect detection method.
Background
In industrial production and manufacturing, the iron plate is rusted to reduce the mechanical properties of the iron plate, such as strength, plasticity, toughness and the like, and the geometric shape of the iron plate is damaged to shorten the service life of the iron plate; at present, the most common mode for rusting the iron door in the industry is to carry out rust removal and paint repair operation on a rust area, the operation is often an area needing to obtain rusting, and the traditional threshold segmentation cannot play a good role in segmenting the rust, namely the condition that the color changes along with different rusting degrees, because a single threshold cannot be used.
Therefore, the identification and detection of the iron plate surface corrosion defects usually utilizes a region growing algorithm to divide and extract the defects, the algorithm is suitable for the scene with uncertain threshold values, and more accurate corrosion edges can be obtained; however, due to the limitation of the algorithm and the influence of noise, a phenomenon of missing void regions or overgrowth of the edges of the void regions may occur, and this phenomenon may result in low detection or identification accuracy of the iron plate corrosion defect regions.
Disclosure of Invention
The invention provides an iron plate corrosion defect detection method, which is used for solving the problem of lower precision when the existing method is used for detecting an iron plate corrosion defect area, and adopts the following technical scheme:
the embodiment of the invention provides a method for detecting iron plate corrosion defects, which comprises the following steps:
acquiring a gray image of iron plate corrosion; obtaining an iron plate corrosion area growth segmentation image corresponding to the iron plate corrosion gray image and each communication domain on the iron plate corrosion area growth segmentation image based on a region growth algorithm; the number of the pixel points in the connected domain is more than or equal to 1;
acquiring the area and color characteristic index of each connected domain; obtaining different abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; obtaining an abnormal connected domain which is a vacuum hole according to the area difference rate and the average distance;
and repairing the abnormal communication region which is the vacuum hole to obtain an iron plate corrosion region.
Preferably, the method for obtaining the area and color feature index of each connected domain includes:
acquiring the area of each connected domain; the area of each connected domain is measured by the number of pixel points in the connected domain;
and acquiring the mean value of the gray values of the pixels in each connected domain, and recording the mean value of the gray values of the pixels in each connected domain as the color characteristic index of each connected domain.
Preferably, the method for obtaining the different connected domains comprises:
recording a connected domain with the area smaller than a preset area threshold value and the color characteristic index of the corresponding connected domain between [220 and 255] as an abnormal connected domain; and marking the pixel points in the abnormal connected domain as abnormal points.
Preferably, the method of area difference ratio to each of the abnormally connected domains comprises:
acquiring the area of a standard noise connected domain; the number of the pixel points in the standard noise connected domain is
Figure 322935DEST_PATH_IMAGE001
(ii) a The area of the standard noise connected component is recorded as
Figure 56536DEST_PATH_IMAGE001
Obtaining the area difference rate of each abnormal connected domain according to the area of the standard noise connected domain and the area of each abnormal connected domain;
for any abnormal connected domain, calculating the area difference rate of the abnormal connected domain according to the following formula:
Figure 419515DEST_PATH_IMAGE002
wherein,
Figure 238567DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected region,
Figure 673090DEST_PATH_IMAGE004
the area of the abnormal connected region is defined as,
Figure 261198DEST_PATH_IMAGE001
is the area of the standard noise connected domain,
Figure 654133DEST_PATH_IMAGE005
and n is the number of the abnormal connected domains.
Preferably, the method for obtaining the neighborhood pixel point set of each abnormal connected domain includes:
for any abnormal connected domain:
constructing and obtaining a target circle corresponding to the abnormal connected domain by taking the abnormal connected domain as a circle center;
recording other abnormal points except the abnormal point in the abnormal connected domain in a target circle corresponding to the abnormal connected domain as neighborhood pixel points of the abnormal connected domain;
and constructing and obtaining a neighborhood pixel point set of the abnormal connected domain according to each neighborhood pixel point of the abnormal connected domain.
Preferably, the method for obtaining the average distance corresponding to each abnormal connected domain includes:
for any abnormal connected domain:
calculating the distance from each pixel point in the neighborhood pixel point set corresponding to the abnormal connected domain;
sorting according to the distance from small to large to obtain a corresponding distance sequence;
obtaining the average distance corresponding to the abnormal connected domain according to the distance sequence corresponding to the abnormal connected domain;
calculating the average distance corresponding to the abnormal connected domain according to the following formula:
Figure 978058DEST_PATH_IMAGE006
wherein,
Figure 216273DEST_PATH_IMAGE007
the average distance corresponding to the abnormal connected component is,
Figure 190045DEST_PATH_IMAGE008
the number of pixels in the neighborhood pixel set corresponding to the abnormal connected domain,
Figure 488302DEST_PATH_IMAGE009
the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 281946DEST_PATH_IMAGE010
the weight of the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 323851DEST_PATH_IMAGE011
the sum of the other parameter values except the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 886551DEST_PATH_IMAGE012
is composed of
Figure 621289DEST_PATH_IMAGE011
The weight of (c).
Preferably, for any abnormal connected domain, the probability index of the abnormal connected domain being a vacuum hole is calculated according to the following formula:
Figure 636649DEST_PATH_IMAGE013
wherein,
Figure 216666DEST_PATH_IMAGE014
the abnormal connected region is an index of the possibility of vacuum holes,
Figure 633872DEST_PATH_IMAGE007
the average distance corresponding to the abnormal connected domain is,
Figure 539511DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected component,
Figure 301888DEST_PATH_IMAGE015
is composed of
Figure 420017DEST_PATH_IMAGE003
The weight of (a) is determined,
Figure 957308DEST_PATH_IMAGE016
is composed of
Figure 768269DEST_PATH_IMAGE007
The weight of (c).
Firstly, acquiring an iron plate corrosion gray image; obtaining an iron plate corrosion area growth segmentation image corresponding to the iron plate corrosion gray image and each communication area on the iron plate corrosion area growth segmentation image based on an area growth algorithm; the number of the pixel points in the connected domain is more than or equal to 1; then obtaining the area and color characteristic index of each connected domain; obtaining various abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; finally, obtaining an abnormal connected domain of the vacuum hole according to the area difference rate and the average distance; and repairing the abnormal communication region which is the vacuum hole to obtain the iron plate corrosion region. The invention can accurately determine the rust area of the iron plate.
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 embodiments or the description of 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 a method for detecting iron plate corrosion defects according to the present invention;
FIG. 2 is a schematic diagram of an anomalous connected domain and neighborhood outliers of the anomalous connected domain of the present invention;
FIG. 3 is a schematic diagram of the distribution of edge pixel blocks according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying 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, rather than all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present invention belong to the protection scope of the embodiments of the present invention.
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 embodiment provides a method for detecting iron plate corrosion defects, which is explained in detail as follows:
as shown in fig. 1, the method for detecting iron plate corrosion defects comprises the following steps:
s001, acquiring a gray image of iron plate corrosion; obtaining an iron plate corrosion area growth segmentation image corresponding to the iron plate corrosion gray image and each communication domain on the iron plate corrosion area growth segmentation image based on a region growth algorithm; and the number of the pixel points in the connected domain is more than or equal to 1.
Since the area growth algorithm for extracting the defect area in the prior art is limited and also influenced by noise, a phenomenon that a missing cavity area or an area edge overgrows may be generated, and the existence of the phenomenon can cause low detection or identification precision of the iron plate corrosion defect area, so that cavities without seed points put in and overgrowth parts need to be found and repaired, but in the searching process, the interference of signals can be generated when an image is collected to generate salt and pepper noise, the noise is also expressed as cavities in the image, the misjudgment of results is often generated, the interference is caused when the cavities (subsequently called as 'vacuum cavities') which are not put in seeds are searched, and the cavity information is lost in a traditional denoising mode.
The method comprises the steps of firstly, acquiring an iron plate image with a corrosion defect on the surface by using an image acquisition system, and recording the image as the iron plate corrosion image; graying the iron plate corrosion image to obtain an iron plate corrosion gray image; selecting a region with small gray value (with dark color) for casting seed points on the image after the graying treatment, and defining the gray value difference to be at a threshold value
Figure 23801DEST_PATH_IMAGE017
Judging and combining the pixels in eight neighborhoods of the current seed pixel within the range belonging to the same kind of seed points; performing a region growing algorithm to obtain an effect image after the region growing and dividing and each region on the effect image after the region growing and dividing, recording the effect image after the region growing and dividing as an iron plate corrosion region growing and dividing image corresponding to the iron plate corrosion gray image, recording each region on the effect image after the region growing and dividing as each communicating region on the iron plate corrosion region growing and dividing image, wherein the number of pixel points in each communicating region is more than or equal to 1; the threshold value
Figure 211200DEST_PATH_IMAGE017
The setting is required according to actual conditions.
S002, obtaining the area and color characteristic indexes of each connected domain; obtaining different abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; and obtaining an abnormal connected domain which is the vacuum hole according to the area difference rate and the average distance.
Next, in this embodiment, each obtained connected domain needs to be analyzed to obtain an abnormal point or area on the image, which is usually white, and then, further analysis is performed based on the size appearance of the abnormal area and the distribution in the image to eliminate the influence of noise, and a real cavity area is found out to be corrected, and then, abnormal point detection is performed on the edge of the obtained area to obtain a more accurate corrosion area.
For an iron plate corrosion area growth segmentation image obtained by using an area growth algorithm, adjacent pixel points with similar gray values on the image form the same communicated area, but because the area growth algorithm can only grow in continuous areas and uncertainty exists in selection of seed pixel points, the number of input seed pixel points and the number of input seed pixel points, missing holes can possibly occur due to the fact that partial areas do not grow, and the areas are not endowed with correspondingly classified pixel values after segmentation, so that the color presented in the image is white; the areas of the regions which are not grown by the seed points are generally small, the probability of being grown is very high as the areas are larger, and only small regions have small putting probability, so that the phenomenon of omission occurs; therefore, the present embodiment uses the above features as a basis for determining to find abnormal points or regions in the iron plate rust region growth segmentation image and make a unified mark; firstly, the embodiment acquires the area of each connected domain; the calculation of the connected component area is well known and will not be described in detail; then obtaining the mean value of the gray values of the pixel points in each connected domain, recording the mean value of the gray values of the pixel points in each connected domain as the color characteristic index of each connected domain, wherein the larger the mean value is, the closer the color of the connected domain is to white; in the embodiment, a connected domain with the area smaller than a preset area threshold value and the color characteristic index of the corresponding connected domain between [220 and 255] is marked as an abnormal connected domain; the preset area threshold needs to be set according to actual conditions, but the value of the preset area threshold needs to be greater than or equal to 1, and pixel points in an abnormal connected domain are marked as abnormal points.
Thus, abnormal connected domains on the growth segmentation image of the iron plate corrosion region are obtained.
Then, analyzing the abnormal connected domain to obtain a real cavity and eliminate noise interference; the areas of the cavity regions are different in size, so that the shapes of the cavity regions are irregular; in contrast, the appearance of salt and pepper noise is similar and is often represented as isolated pixel points on the image, so that the total area of the pixel points is smaller than that of the vacuum hole; and because the abnormal points in the abnormal area of the rusty part in the segmentation image are always noise (if the abnormal points are missed holes, the abnormal points are included by a normal growth mode and are not in accordance with logic), the abnormal point characteristics in the rusty part can be used as a reference template to be distinguished by comparing the external size characteristics of the abnormal points in other areas.
Firstly, analyzing the area of an abnormal connected domain, wherein the area of the connected domain is measured by the number of pixel points; because the abnormal points are abrupt, the gray difference of the abnormal points relative to surrounding pixel points is large, and the abnormal points are similar to an abrupt state; therefore, abnormal points in the rust can be acquired according to the gradient value; therefore, in this embodiment, the area of the standard noise connected domain is obtained first, and the number of the pixel points in the standard noise connected domain is
Figure 868578DEST_PATH_IMAGE001
Then the area of the standard noise connected domain is recorded as
Figure 850440DEST_PATH_IMAGE001
(ii) a When judging abnormal points in other areas, if the area is larger than
Figure 858847DEST_PATH_IMAGE001
Then the region is likely to be a vacuum hole region, where the difference between the area of the current anomaly point and the reference template area can be made, the larger the value obtained, the more likely it is to be a vacuum hole, according to the standardObtaining the area difference rate of each abnormal connected domain by the area of the noise connected domain and the area of each abnormal connected domain; for any abnormal connected domain, calculating the area difference rate of the abnormal connected domain according to the following formula:
Figure 584358DEST_PATH_IMAGE002
wherein,
Figure 96242DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected component,
Figure 249006DEST_PATH_IMAGE004
the area of the abnormal connected region is defined as,
Figure 479130DEST_PATH_IMAGE001
is the area of the standard noise connected domain,
Figure 736893DEST_PATH_IMAGE005
the average value of the areas of the abnormal connected domains, wherein n is the number of the abnormal connected domains; when in use
Figure 103283DEST_PATH_IMAGE018
When the abnormal connected domain is noise, the probability of the abnormal connected domain being noise is higher
Figure 692527DEST_PATH_IMAGE003
If the value is more than 1, the probability that the abnormal connected domain is a vacuum hole is higher.
And then calculating the distance distribution condition of each abnormal connected domain from the nearest abnormal point around the abnormal connected domain in the image to obtain the discrete condition of each abnormal connected domain, and judging whether the point is a vacuum hole according to the discrete distribution condition, wherein the specific logic is as follows: because the distribution of noise is relatively common in the whole image, the whole image is filled with the noise, and the number of noise points is far larger than that of vacuum holes, the nearest point from the current point to the periphery can be calculated in the judgment of the discrete distribution degree of the abnormal connected domain
Figure 144368DEST_PATH_IMAGE008
The mean value of the distances of the abnormal points represents the discrete condition of the abnormal points; then the point at which the discrete value is more abnormal (most recent)
Figure 211682DEST_PATH_IMAGE008
Small distance mean) can be determined as a point with a high likelihood of a vacuum hole.
The basis for judging whether the abnormal communication area is a vacuum hole is as follows: the salt and pepper noise is distributed relatively evenly in the local space and relatively regular, so that the distance between the noise point and the noise point is relatively even; if the abnormal point is a vacuum hole, the distance between the abnormal point and the surrounding pixel points is closer, namely the density is higher than that of other points in the field.
The discrete degree of each abnormal connected domain in the space is reflected by the judgment of the distance between each abnormal connected domain and the surrounding abnormal points; for any anomalous connected domain: using the abnormal connected domain as the center of a circle and the abnormal points in any direction around the abnormal connected domain as the search target range to find out the point nearest to the current center of the circle
Figure 698158DEST_PATH_IMAGE008
The distance of each abnormal point is stored in the set
Figure 458303DEST_PATH_IMAGE019
Recording the abnormal connected domain as a neighborhood pixel point set of the abnormal connected domain, namely constructing and obtaining a target circle corresponding to the abnormal connected domain by taking the abnormal connected domain as a circle center, wherein the radius of the target circle needs to be determined according to actual conditions, and recording other abnormal points except the abnormal point in the abnormal connected domain in the target circle corresponding to the abnormal connected domain as neighborhood pixel points of the abnormal connected domain; if the current connected domain is a vacuum hole, the distribution of the connected domain in the image can disturb salt and pepper noise which is regularly distributed in the image originally, and because the noise point and the cavity point in the space can be sequentially used as central points to be judged according to the mode, the distance between the noise point and the cavity point and the first abnormal point closest to the noise point and the cavity point can be influenced by the vacuum hole; such asAs shown in FIG. 2, assume that
Figure 397440DEST_PATH_IMAGE020
Is a hollow hole, the rest
Figure 2865DEST_PATH_IMAGE020
Some small points around the image are the salt and pepper noise in the original image, and the noise is passed through
Figure 609427DEST_PATH_IMAGE020
Will be subjected to surrounding abnormal points
Figure 274895DEST_PATH_IMAGE021
The influence of (since the appearance of the vacuum hole can cause the distance between the adjacent abnormal point and the vacuum hole to be the nearest distance, these points are abnormal points), the abnormal point around the abnormal point which is the nearest to itself is the cavity, i.e. the nearest distance is the distance from itself to the cavity; and the rest noise points are nearest to the noise points except the affected noise points
Figure 701328DEST_PATH_IMAGE008
The distance mean value difference of the abnormal points is not large; in order to be unaffected by the distance of the nearest outlier, appropriate weights need to be assigned.
For any abnormal connected domain: calculating the distance from each pixel point in the neighborhood pixel point set corresponding to the abnormal connected domain; sorting according to the distance from small to large to obtain a corresponding distance sequence; obtaining the average distance corresponding to the abnormal connected domain according to the distance sequence corresponding to the abnormal connected domain; calculating the average distance corresponding to the abnormal connected domain according to the following formula:
Figure 376023DEST_PATH_IMAGE006
wherein,
Figure 837091DEST_PATH_IMAGE007
is the average corresponding to the abnormal connected domainThe average distance is equal to the sum of the distances,
Figure 198759DEST_PATH_IMAGE008
the number of pixels in the neighborhood set of pixels corresponding to the abnormal connected domain,
Figure 378068DEST_PATH_IMAGE009
the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 325295DEST_PATH_IMAGE010
the weight of the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 640870DEST_PATH_IMAGE011
the sum of the other parameter values except the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 913720DEST_PATH_IMAGE012
is composed of
Figure 314745DEST_PATH_IMAGE011
The weight of (c). The distance data interference brought by the first abnormal point is prevented
Figure 331243DEST_PATH_IMAGE009
Assign less weight and thus set
Figure 766903DEST_PATH_IMAGE022
Figure 210654DEST_PATH_IMAGE023
Calculating the average of each abnormal connected domain in the space according to the formula
Figure 98976DEST_PATH_IMAGE008
A distance; the smaller the value, the more dense the current abnormal connected domain is proved to be, i.e. the more probable the vacuum hole is. Thus when
Figure 919164DEST_PATH_IMAGE003
Greater than 1 and larger values are more likely to be vacuum holes, and smaller average distances are more likely to be vacuum holes.
For any abnormal connected domain, calculating the possibility index of the abnormal connected domain as the vacuum hole according to the following formula:
Figure 943752DEST_PATH_IMAGE024
wherein,
Figure 558404DEST_PATH_IMAGE014
the abnormal connected region is an index of the possibility of vacuum holes,
Figure 668443DEST_PATH_IMAGE007
the average distance corresponding to the abnormal connected domain is,
Figure 44321DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected region,
Figure 454574DEST_PATH_IMAGE015
is composed of
Figure 240127DEST_PATH_IMAGE003
The weight of (a) is determined,
Figure 837462DEST_PATH_IMAGE016
is composed of
Figure 999453DEST_PATH_IMAGE007
The weight of (c);
Figure 733053DEST_PATH_IMAGE015
and
Figure 689508DEST_PATH_IMAGE016
representing a weight, wherein an appropriate weight is given to the judged influence according to the difference rate and the discrete degree; due to flat distance versus densityIs more objective than the calculation of the difference rate of the former and is set accordingly
Figure 39718DEST_PATH_IMAGE025
0.4,
Figure 739821DEST_PATH_IMAGE026
(ii) a Due to the fact that
Figure 593507DEST_PATH_IMAGE003
And holes of suspected vacuum
Figure 720863DEST_PATH_IMAGE014
Is proportional to the value of (c) in the sample,
Figure 292790DEST_PATH_IMAGE007
and holes of suspected vacuum
Figure 796584DEST_PATH_IMAGE014
Is inversely proportional to the value of (a); the hyperbolic tangent function and the exponential function in the above equation are chosen to normalize the results.
Figure 770356DEST_PATH_IMAGE014
The closer to 1, the higher the probability that the abnormal connected region is a vacuum hole, and the probability threshold is set to
Figure 62754DEST_PATH_IMAGE027
(ii) a And when the calculated value of the abnormal communication domain is greater than the possibility threshold value, the vacuum cavity is judged, and when the value of the abnormal communication domain is less than the possibility threshold value, the noise is judged.
And S003, repairing the abnormal communication region which is the vacuum hole to obtain an iron plate corrosion region.
In the embodiment, the abnormal communication region which is the vacuum hole is corrected to be the color of the rusty region, so as to obtain specific rusty region data; the steps are comprehensively analyzed and judged from two aspects to obtain the part belonging to the vacuum hole in the abnormal point region in the image, and the vacuum hole part is repaired to obtain a specific corrosion region; at this time, abnormal point detection needs to be performed on the edge of the segmented image, because some errors may exist in the effect of the combination processing of the algorithm and the actual scene in the segmentation process, which causes abnormal burrs or small protruding pixel points on the edge, and this step is used to specifically solve the edge defect. The information characteristics of a certain pixel point on the edge relative to the front and rear edge points under the normal condition are known to be coherent, if the point is an abnormal point, the point has some salience for the front and rear edge points, the abnormal change condition of the edge curve can be analyzed through chain code operation, and the abnormal point can be found according to the mutation of numerical values. Selecting 8 connected chain codes, comparing with the actual situation that 4 connected chain codes are more consistent with pixel point distribution, describing that the obtained adjacent pixel point information is more accurate, firstly randomly finding a starting point on the edge, starting traversing the edge point information in the clockwise direction, and expressing the information by using a numerical value in the 8 connected domain chain codes according to the position of the next pixel point relative to the current pixel point; the edge pixel point distribution as in fig. 3 can be represented by 8 connected domain chain codes as: 1110070; searching pixel points in the image corresponding to the mutation data by analyzing the obtained coded data information to obtain abnormal points in the edge points, and then repairing the points; and finally, a more accurate rusted area is obtained.
Through the steps, a more accurate rust area can be obtained, the rust degree of the iron plate is judged according to the obtained segmentation image, the influence degree of rust and the difficulty degree of rust removal are evaluated, and classification processing is performed in a targeted manner.
In the embodiment, firstly, an iron plate corrosion gray image is obtained; obtaining an iron plate corrosion area growth segmentation image corresponding to the iron plate corrosion gray level image and each connected domain on the iron plate corrosion area growth segmentation image based on a region growth algorithm; the number of the pixel points in the connected domain is more than or equal to 1; then obtaining the area and color characteristic index of each connected domain; obtaining various abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; finally, obtaining an abnormal connected domain of the vacuum hole according to the area difference rate and the average distance; and repairing the abnormal communication region which is the vacuum hole to obtain the iron plate corrosion region. The embodiment can accurately determine the rust area of the iron plate.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; the modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application, and are included in the protection scope of the present application.

Claims (7)

1. A method for detecting iron plate corrosion defects is characterized by comprising the following steps:
acquiring a gray image of iron plate corrosion; obtaining an iron plate corrosion region growth segmentation image corresponding to the iron plate corrosion gray level image and each connected domain on the iron plate corrosion region growth segmentation image based on a region growth algorithm; the number of the pixel points in the connected domain is more than or equal to 1;
acquiring the area and color characteristic index of each connected domain; obtaining various abnormal connected domains according to the area and color characteristic indexes; obtaining the area difference rate of each abnormal connected domain according to the area of each abnormal connected domain; acquiring a neighborhood pixel point set of each abnormal connected domain; obtaining the average distance corresponding to each abnormal connected domain according to the distance from each pixel point in the neighborhood pixel point set corresponding to each abnormal connected domain to the corresponding abnormal connected domain; obtaining an abnormal communication domain of the vacuum hole according to the area difference rate and the average distance;
and repairing the abnormal communication region which is the vacuum hole to obtain an iron plate corrosion region.
2. The iron plate corrosion defect detection method of claim 1, wherein the method for obtaining the area and color characteristic indexes of each connected domain comprises the following steps:
acquiring the area of each connected domain; the area of each connected domain is measured by the number of pixel points in the connected domain;
and acquiring the mean value of the gray values of the pixels in each connected domain, and recording the mean value of the gray values of the pixels in each connected domain as the color characteristic index of each connected domain.
3. The iron plate corrosion defect detection method of claim 1, wherein the method for obtaining each abnormal connected domain comprises:
recording connected domains with the areas smaller than a preset area threshold value and corresponding color characteristic indexes of the connected domains between [220 and 255] as abnormal connected domains; and marking the pixel points in the abnormal connected domain as abnormal points.
4. The iron plate corrosion defect detection method of claim 1, wherein the method for obtaining the area difference rate of each abnormal connected domain comprises:
acquiring the area of a standard noise connected domain; the number of the pixel points in the standard noise connected domain is
Figure 634611DEST_PATH_IMAGE001
(ii) a The area of the standard noise connected component is recorded as
Figure 942096DEST_PATH_IMAGE001
Obtaining the area difference rate of each abnormal connected domain according to the area of the standard noise connected domain and the area of each abnormal connected domain;
for any abnormal connected domain, calculating the area difference rate of the abnormal connected domain according to the following formula:
Figure 770374DEST_PATH_IMAGE002
wherein,
Figure 505112DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected region,
Figure 51631DEST_PATH_IMAGE004
the area of the abnormal connected region is defined as,
Figure 897227DEST_PATH_IMAGE001
is the area of the standard noise connected component,
Figure 111171DEST_PATH_IMAGE005
and the average value of the areas of the abnormal connected domains, wherein n is the number of the abnormal connected domains.
5. The iron plate rust defect detection method of claim 3, wherein the method for obtaining the neighborhood pixel point set of each abnormal connected domain comprises the following steps:
for any anomalous connected domain:
constructing and obtaining a target circle corresponding to the abnormal communication domain by taking the abnormal communication domain as a circle center;
recording other abnormal points except the abnormal point in the abnormal connected domain in a target circle corresponding to the abnormal connected domain as neighborhood pixel points of the abnormal connected domain;
and constructing and obtaining a neighborhood pixel point set of the abnormal connected domain according to each neighborhood pixel point of the abnormal connected domain.
6. The iron plate corrosion defect detection method of claim 5, wherein the method for obtaining the average distance corresponding to each abnormal connected domain comprises:
for any abnormal connected domain:
calculating the distance from each pixel point in the neighborhood pixel point set corresponding to the abnormal connected domain;
sorting according to the distance from small to large to obtain a corresponding distance sequence;
obtaining the average distance corresponding to the abnormal connected domain according to the distance sequence corresponding to the abnormal connected domain;
calculating the average distance corresponding to the abnormal connected domain according to the following formula:
Figure 16810DEST_PATH_IMAGE006
wherein,
Figure 785046DEST_PATH_IMAGE007
the average distance corresponding to the abnormal connected domain is,
Figure 434333DEST_PATH_IMAGE008
the number of pixels in the neighborhood pixel set corresponding to the abnormal connected domain,
Figure 965765DEST_PATH_IMAGE009
the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 42306DEST_PATH_IMAGE010
the weight of the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 563417DEST_PATH_IMAGE011
the sum of the other parameter values except the first parameter value in the distance sequence corresponding to the abnormal connected component,
Figure 16395DEST_PATH_IMAGE012
is composed of
Figure 939352DEST_PATH_IMAGE011
The weight of (c).
7. The method for detecting the rust defect of the iron plate as claimed in claim 6, wherein for any abnormal connected domain, the probability index that the abnormal connected domain is a vacuum hole is calculated according to the following formula:
Figure 186793DEST_PATH_IMAGE013
wherein,
Figure 460780DEST_PATH_IMAGE014
the abnormal connected region is an index of possibility of vacuum hole,
Figure 186291DEST_PATH_IMAGE007
the average distance corresponding to the abnormal connected domain is,
Figure 229333DEST_PATH_IMAGE003
as the area difference rate of the abnormal connected region,
Figure 647676DEST_PATH_IMAGE015
is composed of
Figure 877800DEST_PATH_IMAGE003
The weight of (a) is calculated,
Figure 407001DEST_PATH_IMAGE016
is composed of
Figure 38971DEST_PATH_IMAGE007
The weight of (c).
CN202211248930.XA 2022-10-12 2022-10-12 Iron plate corrosion defect detection method Active CN115311304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211248930.XA CN115311304B (en) 2022-10-12 2022-10-12 Iron plate corrosion defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211248930.XA CN115311304B (en) 2022-10-12 2022-10-12 Iron plate corrosion defect detection method

Publications (2)

Publication Number Publication Date
CN115311304A true CN115311304A (en) 2022-11-08
CN115311304B CN115311304B (en) 2023-04-14

Family

ID=83868325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211248930.XA Active CN115311304B (en) 2022-10-12 2022-10-12 Iron plate corrosion defect detection method

Country Status (1)

Country Link
CN (1) CN115311304B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363126A (en) * 2023-05-30 2023-06-30 东莞市立时电子有限公司 Welding quality detection method for data line USB plug
CN116485797A (en) * 2023-06-25 2023-07-25 潍坊亚贝涂料有限公司 Artificial intelligence-based paint color difference rapid detection method
CN117197127A (en) * 2023-11-02 2023-12-08 广东乾威精密连接器有限公司 Automobile terminal detection method based on machine vision
CN117649412A (en) * 2024-01-30 2024-03-05 山东海天七彩建材有限公司 Aluminum material surface quality detection method
CN118196025A (en) * 2024-03-13 2024-06-14 深圳个元科技有限公司 Visual detection method and system for gear appearance defects

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140270377A1 (en) * 2011-11-30 2014-09-18 Olympus Corporation Image processing apparatus, image processing method, and computer-readable recording device
CN115049649A (en) * 2022-08-12 2022-09-13 山东振鹏建筑钢品科技有限公司 Reinforcing steel bar polishing and rust removing control method based on corrosion degree
CN115100203A (en) * 2022-08-25 2022-09-23 山东振鹏建筑钢品科技有限公司 Steel bar polishing and rust removing quality detection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140270377A1 (en) * 2011-11-30 2014-09-18 Olympus Corporation Image processing apparatus, image processing method, and computer-readable recording device
CN115049649A (en) * 2022-08-12 2022-09-13 山东振鹏建筑钢品科技有限公司 Reinforcing steel bar polishing and rust removing control method based on corrosion degree
CN115100203A (en) * 2022-08-25 2022-09-23 山东振鹏建筑钢品科技有限公司 Steel bar polishing and rust removing quality detection method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363126A (en) * 2023-05-30 2023-06-30 东莞市立时电子有限公司 Welding quality detection method for data line USB plug
CN116363126B (en) * 2023-05-30 2023-08-22 东莞市立时电子有限公司 Welding quality detection method for data line USB plug
CN116485797A (en) * 2023-06-25 2023-07-25 潍坊亚贝涂料有限公司 Artificial intelligence-based paint color difference rapid detection method
CN116485797B (en) * 2023-06-25 2023-08-29 潍坊亚贝涂料有限公司 Artificial intelligence-based paint color difference rapid detection method
CN117197127A (en) * 2023-11-02 2023-12-08 广东乾威精密连接器有限公司 Automobile terminal detection method based on machine vision
CN117649412A (en) * 2024-01-30 2024-03-05 山东海天七彩建材有限公司 Aluminum material surface quality detection method
CN117649412B (en) * 2024-01-30 2024-04-09 山东海天七彩建材有限公司 Aluminum material surface quality detection method
CN118196025A (en) * 2024-03-13 2024-06-14 深圳个元科技有限公司 Visual detection method and system for gear appearance defects

Also Published As

Publication number Publication date
CN115311304B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN115311304B (en) Iron plate corrosion defect detection method
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN117173184B (en) Road construction quality detection method and system based on artificial intelligence
CN115457041B (en) Road quality identification and detection method
CN115330783A (en) Steel wire rope defect detection method
CN115294120B (en) Valve surface quality detection method based on image recognition
CN116703251B (en) Rubber ring production quality detection method based on artificial intelligence
CN109685760B (en) MATLAB-based SLM powder bed powder laying image convex hull depression defect detection method
CN115294159B (en) Method for dividing corroded area of metal fastener
CN115115638B (en) Oil leakage detection and judgment method for hydraulic system
CN116309537A (en) Defect detection method for oil stain on surface of tab die
CN115690108A (en) Aluminum alloy rod production quality evaluation method based on image processing
CN106780347B (en) Early loquat bruise identification method based on OCT image processing
CN116468728B (en) Production quality detection method for hardware stamping part die
CN113838054A (en) Mechanical part surface damage detection method based on artificial intelligence
CN117611563B (en) Plastic mold production defect detection method based on image processing
CN116304963B (en) Data processing system suitable for geological disaster early warning
CN115841491B (en) Quality detection method for porous metal material
CN117911408B (en) Road pavement construction quality detection method and system
CN115511907B (en) Scratch detection method for LED screen
CN115115603A (en) Automobile accessory flywheel surface detection method based on artificial intelligence
CN117705815B (en) Printing defect detection method based on machine vision
CN115222735A (en) Metal mold quality detection method based on pockmark defects
CN117078688B (en) Surface defect identification method for strong-magnetic neodymium-iron-boron magnet
CN115063603B (en) Wood annual ring line accurate extraction and restoration method based on edge information

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