Nothing Special   »   [go: up one dir, main page]

CN115311304B - Iron plate corrosion defect detection method - Google Patents

Iron plate corrosion defect detection method Download PDF

Info

Publication number
CN115311304B
CN115311304B CN202211248930.XA CN202211248930A CN115311304B CN 115311304 B CN115311304 B CN 115311304B CN 202211248930 A CN202211248930 A CN 202211248930A CN 115311304 B CN115311304 B CN 115311304B
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.)
Active
Application number
CN202211248930.XA
Other languages
Chinese (zh)
Other versions
CN115311304A (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 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; 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 the 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 also to damage the geometric shape of the iron plate and shorten the service life of the iron plate; at present, the most common mode for rusting of iron doors 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 condition that the color of the rust changes along with different rusting degrees due to a single threshold.
Therefore, the defects are generally segmented and extracted by using a region growing algorithm aiming at the identification and detection of the rust defects on the surface of the iron plate, the algorithm is suitable for the scene with uncertain threshold values, and more accurate rust 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 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 indexes 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 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,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 Recording the area of a Standard noise connected Domain 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
is the area difference ratio of the abnormal connected domain>
Figure 673090DEST_PATH_IMAGE004
Is the area of the abnormally connected field>
Figure 261198DEST_PATH_IMAGE001
Is the area of the standard noise connected field>
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 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.
Preferably, the method for obtaining the average distance corresponding to each abnormal connected domain includes:
for any anomalous 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
is the average distance corresponding to the abnormally connected field, <' >>
Figure 190045DEST_PATH_IMAGE008
The number of the pixel points in the neighborhood pixel point set corresponding to the abnormal connected domain is determined, and then>
Figure 488302DEST_PATH_IMAGE009
For the first parameter value in the distance sequence corresponding to the abnormally connected field, <>
Figure 281946DEST_PATH_IMAGE010
Is the weight of the first parameter value in the distance sequence corresponding to the abnormal connected component field, and->
Figure 323851DEST_PATH_IMAGE011
For the sum of the remaining parameter values in the distance sequence corresponding to the abnormal connected field except the first parameter value>
Figure 886551DEST_PATH_IMAGE012
Is->
Figure 621289DEST_PATH_IMAGE011
The weight of (c).
Preferably, 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 636649DEST_PATH_IMAGE013
wherein,
Figure 216666DEST_PATH_IMAGE014
the abnormally connected area is a likelihood indicator of a vacuum hole, based on>
Figure 633872DEST_PATH_IMAGE007
For the average distance corresponding to the abnormal connected field>
Figure 539511DEST_PATH_IMAGE003
Is the area difference ratio of the abnormal connected domain>
Figure 301888DEST_PATH_IMAGE015
Is->
Figure 420017DEST_PATH_IMAGE003
Based on the weight of->
Figure 957308DEST_PATH_IMAGE016
Is->
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 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 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 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 flowchart of a method for detecting iron plate rust 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; carrying out graying treatment on the iron plate corrosion image to obtain an iron plate corrosion gray image; selecting a region with small gray value (darker color) for the image after the graying treatment, putting the seed points, and definingDifference of gray level at threshold
Figure 23801DEST_PATH_IMAGE017
The same type of seed points in the range is judged and combined for the pixels in eight neighborhoods of the current seed pixel 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 communication domain on the iron plate corrosion region growing and dividing image, wherein the number of pixel points in each communication domain is more than or equal to 1; said threshold value->
Figure 211200DEST_PATH_IMAGE017
The setting is required according to actual conditions.
S002, obtaining 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; 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 and distribution of the abnormal area in the image to eliminate the influence of noise, so as to find out a real cavity area for correction, 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 mode of the connected domain area is a known technology and therefore is not 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 this embodiment, a connected domain having an area smaller than a preset area threshold and corresponding to the connected domain with a color characteristic index of [220,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 hollow areas are different, so that the shapes of the hollow areas 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 very abrupt, the gray difference of the adjacent pixel points is very large, and the abnormal points are similar to the 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 more than->
Figure 858847DEST_PATH_IMAGE001
The area is possibly a vacuum hole area, the difference value can be made between the area of the current abnormal point and the area of the reference template, the larger the obtained value is, the more possible the area is the vacuum hole, and the area difference rate of each abnormal connected domain is obtained 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 584358DEST_PATH_IMAGE002
wherein,
Figure 96242DEST_PATH_IMAGE003
is the area difference ratio of the abnormal connected domain>
Figure 249006DEST_PATH_IMAGE004
Is the area of the abnormally connected field>
Figure 479130DEST_PATH_IMAGE001
Is the area of the standard noise connected field>
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/is>
Figure 103283DEST_PATH_IMAGE018
When it is determined that the abnormal connected component is noisy, the probability that the abnormal connected component is noisy is greater when->
Figure 692527DEST_PATH_IMAGE003
If the value is more than 1, the probability that the abnormal connected domain is a vacuum hole is higher.
Then, the discrete situation of each abnormal connected domain is obtained by calculating the distance distribution situation of each abnormal connected domain from the nearest abnormal point around the abnormal connected domain in the image, and the specific logic for judging whether the point is a vacuum hole or not according to the discrete distribution situation 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 recently @)>
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 outlier is a vacuum hole, it is closer to the surrounding pixels, i.e., the density is greater than the density 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 abnormal 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 the singular points, stored in the collection +>
Figure 458303DEST_PATH_IMAGE019
Recording 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 the salt and pepper noise which is originally regularly distributed in the image, and because the noise point and the cavity point in the space can be sequentially used as the central points to be judged according to the mode, the distance from the noise point to the first abnormal point closest to the noise point and the cavity point can be influenced by the vacuum hole; assume that ^ is greater than or equal to, as shown in FIG. 2>
Figure 397440DEST_PATH_IMAGE020
Is a hole, the rest->
Figure 2865DEST_PATH_IMAGE020
Some smaller dots around the original image are the salt and pepper noise present in the original image, and the passing->
Figure 609427DEST_PATH_IMAGE020
Will be subjected to surrounding abnormal points>
Figure 274895DEST_PATH_IMAGE021
Due to the presence of a vacuum hole, the nearest distance between the adjacent abnormal point and the vacuum holeFrom, these points are outliers), the outliers around them that are closest to themselves are the holes, i.e., the closest distance is the distance from itself to the hole; and the remaining noise points, with the exception of the affected noise points, which are closest to themselves +>
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 distance corresponding to the abnormally connected field, <' >>
Figure 198759DEST_PATH_IMAGE008
The number of the pixel points in the neighborhood pixel point set corresponding to the abnormal connected domain is judged>
Figure 378068DEST_PATH_IMAGE009
For the first parameter value in the distance sequence corresponding to the abnormally connected field, based on the absolute value of the parameter value in the distance sequence, and>
Figure 325295DEST_PATH_IMAGE010
is the weight of the first parameter value in the distance sequence corresponding to the abnormal connected domain, and>
Figure 640870DEST_PATH_IMAGE011
for the sum of the other parameter values in the distance sequence corresponding to the abnormal connected field except the first parameter value>
Figure 913720DEST_PATH_IMAGE012
Is->
Figure 314745DEST_PATH_IMAGE011
The weight of (c). Need to be given to a &'s device to prevent interference with distance data by the first outlier>
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 is, the denser the current abnormal connected domain is proved to be, namely the possibility of vacuum holes is higher. 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 probability index of the abnormal connected domain as a vacuum hole according to the following formula:
Figure 943752DEST_PATH_IMAGE024
wherein,
Figure 558404DEST_PATH_IMAGE014
the abnormal connected domain is trueLikelihood indicator for a cavity>
Figure 668443DEST_PATH_IMAGE007
For the average distance corresponding to the abnormal connected field>
Figure 44321DEST_PATH_IMAGE003
Is the area difference ratio of the abnormal connected domain>
Figure 454574DEST_PATH_IMAGE015
Is->
Figure 240127DEST_PATH_IMAGE003
Based on the weight of->
Figure 837462DEST_PATH_IMAGE016
Is->
Figure 999453DEST_PATH_IMAGE007
The weight of (c);
Figure 733053DEST_PATH_IMAGE015
And &>
Figure 689508DEST_PATH_IMAGE016
Representing a weight, wherein a proper weight is given to the judged influence magnitude according to the difference rate and the dispersion degree; since the evaluation of the degree of difference between the mean distance and the density is more objective than the evaluation of the former is set->
Figure 39718DEST_PATH_IMAGE025
0.4,
Figure 739821DEST_PATH_IMAGE026
(ii) a Due to>
Figure 593507DEST_PATH_IMAGE003
And a suspected vacuum hole>
Figure 720863DEST_PATH_IMAGE014
Is proportional to the value of (c) in the sample,
Figure 292790DEST_PATH_IMAGE007
and a suspected vacuum hole>
Figure 796584DEST_PATH_IMAGE014
Is inversely proportional to the value of (d); the hyperbolic tangent function and the exponential function in the above equation are chosen to normalize the results.
Figure 770356DEST_PATH_IMAGE014
The closer the value of (1) is, the higher the probability that the abnormal connected domain is a vacuum hole degree is, and the probability threshold is set to be ^ based>
Figure 62754DEST_PATH_IMAGE027
(ii) a And when the calculated value of the abnormal connected domain is larger than the possibility threshold value, judging the abnormal connected domain is a vacuum hole, and when the value of the abnormal connected domain is smaller than the possibility threshold value, judging the abnormal connected domain is noise.
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 in the segmentation process, some errors may exist in the effect of the combination processing of the algorithm and the actual scene, which causes abnormal burrs or small protruding pixel points to exist on the edge, and this step is used to specifically solve this edge defect. The information characteristics of a certain pixel point on the edge are known to be coherent relative to the front and rear edge points under normal conditions, 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 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 rust removal difficulty degree 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 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 embodiment can accurately determine the rust area of the iron plate.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit 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 (4)

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 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 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;
repairing the abnormal communication region which is the vacuum hole to obtain an iron plate corrosion region;
a method of obtaining distinct connected domains, comprising:
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,255] as an abnormal connected domain; recording the pixel points in the abnormal connected domain as abnormal points;
the method for acquiring 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;
constructing a neighborhood pixel point set of the abnormal connected domain according to each neighborhood pixel point of the abnormal connected domain;
the method for obtaining the average distance corresponding to each abnormal connected domain comprises the following steps:
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 93579DEST_PATH_IMAGE002
wherein,
Figure DEST_PATH_IMAGE003
is the average distance corresponding to the abnormally connected field, <' >>
Figure 948402DEST_PATH_IMAGE004
The number of the pixel points in the neighborhood pixel point set corresponding to the abnormal connected domain is judged>
Figure DEST_PATH_IMAGE005
For the first parameter value in the distance sequence corresponding to the abnormally connected field, <>
Figure 915090DEST_PATH_IMAGE006
Is the weight of the first parameter value in the distance sequence corresponding to the abnormal connected component field, and->
Figure DEST_PATH_IMAGE007
Is the exception ofThe sum of the remaining parameter values in the distance sequence corresponding to the pass field, excluding the first parameter value, is->
Figure 247982DEST_PATH_IMAGE008
Is->
Figure 327934DEST_PATH_IMAGE007
The weight of (c).
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 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 DEST_PATH_IMAGE009
(ii) a Recording the area of the Standard noise connected Domain as `>
Figure 337347DEST_PATH_IMAGE009
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 DEST_PATH_IMAGE011
wherein,
Figure 276484DEST_PATH_IMAGE012
is the area difference ratio of the abnormal connected domain>
Figure DEST_PATH_IMAGE013
Is the area of the abnormally connected field>
Figure 676983DEST_PATH_IMAGE009
Is the area of a standard noise connected field>
Figure 752387DEST_PATH_IMAGE014
And the average value of the areas of the abnormal connected domains, wherein n is the number of the abnormal connected domains.
4. The method for detecting the rust defect of the iron plate as claimed in claim 1, 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 276909DEST_PATH_IMAGE016
wherein,
Figure DEST_PATH_IMAGE017
the abnormally connected area is a likelihood indicator of a vacuum hole, based on>
Figure 952610DEST_PATH_IMAGE003
Is the average distance corresponding to the abnormally connected field, <' >>
Figure 220780DEST_PATH_IMAGE012
Is the area difference ratio of the abnormal connected domain>
Figure 150690DEST_PATH_IMAGE018
Is->
Figure 846114DEST_PATH_IMAGE012
In based on the weight of (c), in>
Figure DEST_PATH_IMAGE019
Is->
Figure 274690DEST_PATH_IMAGE003
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 CN115311304A (en) 2022-11-08
CN115311304B true 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)

Families Citing this family (5)

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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5926937B2 (en) * 2011-11-30 2016-05-25 オリンパス株式会社 Image processing apparatus, image processing method, and image processing program
CN115049649B (en) * 2022-08-12 2022-11-11 山东振鹏建筑钢品科技有限公司 Reinforcing steel bar polishing and rust removing control method based on corrosion degree
CN115100203B (en) * 2022-08-25 2022-11-18 山东振鹏建筑钢品科技有限公司 Method for detecting quality of steel bar polishing and rust removal

Also Published As

Publication number Publication date
CN115311304A (en) 2022-11-08

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
CN115330783A (en) Steel wire rope defect detection method
CN115294120B (en) Valve surface quality detection method based on image recognition
CN114419025A (en) Fiberboard quality evaluation method based on image processing
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
CN116309537A (en) Defect detection method for oil stain on surface of tab die
CN115115638B (en) Oil leakage detection and judgment method for hydraulic system
CN113838054A (en) Mechanical part surface damage detection method based on artificial intelligence
CN106780347B (en) Early loquat bruise identification method based on OCT image processing
CN117058147B (en) Environment-friendly plastic product defect detection method based on computer vision
CN115841491B (en) Quality detection method for porous metal material
CN115578389A (en) Defect detection method of groove MOS device
CN115861320A (en) Intelligent detection method for automobile part machining information
CN116304963B (en) Data processing system suitable for geological disaster early warning
CN115222735B (en) Metal mold quality detection method based on pockmark defects
CN115115603A (en) Automobile accessory flywheel surface detection method based on artificial intelligence
CN117152119A (en) Profile flaw visual detection method based on image processing
CN116503394A (en) Printed product surface roughness detection method based on image
CN118037730B (en) Crack length detection system based on computer image processing
CN115880280A (en) Detection method for quality of steel structure weld joint
CN117705815B (en) Printing defect detection method based on machine vision

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