CN116958144B - Rapid positioning method and system for surface defect area of new energy connecting line - Google Patents

Rapid positioning method and system for surface defect area of new energy connecting line Download PDF

Info

Publication number
CN116958144B
CN116958144B CN202311213046.7A CN202311213046A CN116958144B CN 116958144 B CN116958144 B CN 116958144B CN 202311213046 A CN202311213046 A CN 202311213046A CN 116958144 B CN116958144 B CN 116958144B
Authority
CN
China
Prior art keywords
curve
target
edge
coefficient
target edge
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
CN202311213046.7A
Other languages
Chinese (zh)
Other versions
CN116958144A (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.)
Dongguan Nangudi Electronics Co ltd
Original Assignee
Dongguan Nangudi Electronics 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 Dongguan Nangudi Electronics Co ltd filed Critical Dongguan Nangudi Electronics Co ltd
Priority to CN202311213046.7A priority Critical patent/CN116958144B/en
Publication of CN116958144A publication Critical patent/CN116958144A/en
Application granted granted Critical
Publication of CN116958144B publication Critical patent/CN116958144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/457Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by analysing connectivity, e.g. edge linking, connected component analysis or slices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a method and a system for rapidly positioning a flaw area on the surface of a new energy connecting wire, which comprise the following steps: acquiring a new energy connecting line surface image to obtain a trend rule degree of a curve, obtaining a fitting coefficient of the curve on the target edge according to the trend rule degree of the curve, the circularity and the straightness of the curve, obtaining a curve difference degree of the target edge, obtaining a corrosion profile coefficient of the target edge according to the curve difference degree and the fitting coefficient of the target edge, obtaining a regularity measurement coefficient, obtaining a dark area confusion index according to the corrosion profile coefficient and the regularity measurement coefficient of the target edge, and clustering according to the dark area confusion index. According to the invention, according to each region of the surface of the connecting line, the edge and the internal texture characteristics of the region are analyzed, the corrosion degree of each region is evaluated, the interference caused by factors such as illumination, fonts and the like is avoided, and the accuracy of positioning the flaw region is improved.

Description

Rapid positioning method and system for surface defect area of new energy connecting line
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a system for rapidly positioning a flaw area on the surface of a new energy connecting wire.
Background
The new energy connection line is an important component of the power transmission link, and if the surface is defective, the conductivity of the circuit may be affected. In order to ensure long-term stable operation of the new energy connecting wire, detection and maintenance are required to be carried out regularly, and the defects are treated timely. At present, three defects are mainly formed on the surface of a new energy connecting wire, namely oxidation, corrosion and scratch, and one of the defects with larger influence on the connecting wire is corrosion. If the surface of the new energy connecting wire is polluted by grease and corrosive substances, the surface of the new energy connecting wire is corroded under long-time contact, and the corrosion is an irreversible process, and the service performance of the new energy connecting wire is reduced. Timely and accurately detect the flaw on the surface of the connecting wire, and have important significance for ensuring normal operation of the connecting wire, prolonging the service life of the connecting wire and reducing the risk of accident occurrence.
The traditional flaw positioning mode is to test the flaw area on the surface by a K-means clustering algorithm, but the method only obtains flaw pixel points by the gray information of the pixel points, can not cluster the whole flaw area on the surface of the connecting line, and is very likely to be wrongly positioned as flaws for characters and light reflection attached to the surface of the connecting line.
Disclosure of Invention
The invention provides a method and a system for rapidly positioning a flaw area on the surface of a new energy connecting wire, which are used for solving the existing problems.
The invention discloses a rapid positioning method and a rapid positioning system for a defect area on the surface of a new energy connecting wire, and the rapid positioning method and the rapid positioning system adopt the following technical scheme:
the embodiment of the invention provides a rapid positioning method for a defect area on the surface of a new energy connecting wire, which comprises the following steps:
acquiring a new energy connecting line image, acquiring a plurality of sections of curves at the edge of each region in the new energy connecting line image, and acquiring a communicating region surrounded by a closed line of each region;
obtaining trend regularity of the curve according to the gradient difference of adjacent pixel points on the curve, marking any area edge as a target edge, obtaining straightness of each section of curve and circularity of the target edge, and obtaining fitting coefficients of the curve on the target edge according to the trend regularity of the curve on the target edge, the straightness of the curve and the circularity of the target edge;
obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge;
acquiring gradient variances of the connected domains, marking the connected domain corresponding to the target edge as a target connected domain, obtaining a regular measurement coefficient of the target connected domain according to the gradient variances of the connected domains, and obtaining a dark area confusion index of the target connected domain according to the corrosion profile coefficient of the target edge and the regular measurement coefficient of the target connected domain;
clustering is carried out according to the dark area confusion index, and the corrosion flaw area is obtained according to the clustering result.
Further, the specific acquisition method of the plurality of sections of curves of the edge of each region in the new energy connecting line image is as follows:
and extracting edges of the new energy connecting line image by using a Canny operator to obtain edges of each region in the new energy connecting line image, detecting corner points of the edges of each region by using a Harris corner point detection algorithm to obtain a plurality of corner points, taking the edges between every two adjacent corner points as a section of curve of the edges of the region, and finally obtaining a plurality of sections of curves of the edges of each region.
Further, the specific method for obtaining the connected domain surrounded by the closed line of each region is as follows:
and carrying out morphological corrosion refinement on the edge of each region to obtain a connected region surrounded by a closed line of each region.
Further, the step of obtaining the trend regularity of the curve according to the slope difference of the adjacent pixel points on the curve comprises the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Is->Section curve>Tangential slope of each pixel point, +.>Is->Section curve>Tangential slope of each pixel point, +.>Is->Total number of pixels on segment curve, < >>Is->Degree of trend regularity of section curve, +.>To take absolute value.
Further, the fitting coefficient of the curve on the target edge is obtained according to the trend regularity and the curve straightness of the curve on the target edge and the circularity of the target edge, and the method comprises the following specific steps:
in the method, in the process of the invention,for a preset threshold value, ++>For the->Segment yeastStraightness of line,/->For the circularity of the target edge,is the linear normalization post-treatment->Degree of trend regularity of section curve, +.>For the->Fitting coefficients of the segment curves.
Further, the curve difference degree of the target edge is obtained according to the fitting coefficient difference of different sections of curves on the target edge, and the method comprises the following specific steps:
in the method, in the process of the invention,for the->Fitting coefficient of segment curve, +.>For the->Fitting coefficient of segment curve, +.>For the total number of segments of the curve on the edge of the object, < +.>Is the curve difference degree of the target edge.
Further, the method for obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge comprises the following specific steps:
in the method, in the process of the invention,for the total number of segments of the curve on the edge of the object, < +.>Is->Total number of pixels on segment curve, < >>For the number of pixels of the target edge, +.>For presetting correction coefficient, ++>For the curve difference of the target edge, +.>Treatment for linear normalization is carried out on the target edge +.>Fitting coefficient of segment curve, +.>Is the erosion profile coefficient of the target edge.
Further, the obtaining the regularity metric coefficient of the target connected domain according to the gradient variance of the connected domain includes the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Gradient variance for the target connected domain, +.>For the maximum value of the gradient variance of all connected domains, +.>For the minimum value of the gradient variance of all connected domains, +.>And (5) the regular measurement coefficient of the target connected domain.
Further, the obtaining the dark area confusion index of the target connected domain according to the corrosion contour coefficient of the target edge and the regularity metric coefficient of the target connected domain comprises the following specific steps:
in the method, in the process of the invention,maximum hue value for pixel point in target connected domain +.>For the minimum hue value of the pixel point in the target connected domain,/->For the erosion profile coefficient of the target edge, +.>For the regularity metric coefficient of the target connected domain, +.>For the average brightness value of the pixel points in the target connected domain,/->And a dark area confusion index for the target connected domain.
Another embodiment of the present invention provides a system for rapidly positioning a defective area on a surface of a new energy connection line, the system comprising:
and an image acquisition module: acquiring a new energy connecting line image, acquiring a plurality of sections of curves at the edge of each region in the new energy connecting line image, and acquiring a communicating region surrounded by a closed line of each region;
and the trend rule degree calculation module is used for: obtaining the trend regularity of the curve according to the slope difference of adjacent pixel points on the curve;
and a fitting coefficient calculating module: obtaining trend regularity of the curve according to the gradient difference of adjacent pixel points on the curve, marking any area edge as a target edge, obtaining straightness of each section of curve and circularity of the target edge, and obtaining fitting coefficients of the curve on the target edge according to the trend regularity of the curve on the target edge, the straightness of the curve and the circularity of the target edge;
and a corrosion profile coefficient calculation module: obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge;
dark area confusion index calculation module: acquiring gradient variances of the connected domains, marking the connected domain corresponding to the target edge as a target connected domain, obtaining a regular measurement coefficient of the target connected domain according to the gradient variances of the connected domains, and obtaining a dark area confusion index of the target connected domain according to the corrosion profile coefficient of the target edge and the regular measurement coefficient of the target connected domain;
and a corrosion flaw area positioning module: clustering is carried out according to the dark area confusion index, and the corrosion flaw area is obtained according to the clustering result.
The technical scheme of the invention has the beneficial effects that: the traditional flaw positioning mode is to test the flaw area on the surface by a K-means clustering algorithm, but the method only obtains flaw pixel points by the gray information of the pixel points, can not cluster the whole flaw area on the surface of the connecting line, and is very likely to be wrongly positioned as flaws for characters and light reflection attached to the surface of the connecting line. According to the invention, by improving the K-means clustering algorithm, the edge and internal texture characteristics of each region are analyzed according to each region on the surface of the connecting line, the corrosion degree of each region is evaluated, the interference caused by factors such as illumination, fonts and the like is avoided, and the accuracy of positioning the flaw region is improved.
According to the method, whether the curve is likely to be a corrosion edge is reflected by analyzing the trend regularity of the curve, the fitting coefficient of the curve is obtained according to the trend regularity, whether the curve is likely to be a corrosion edge can also be reflected by the fitting coefficient of the curve, the curve difference degree of the target edge is obtained according to the fitting coefficient difference of different sections of curves on the edge, the regular characteristics of the corrosion area edge can be better reflected by the curve difference degree, the corrosion profile coefficient of the target edge is obtained according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge, the regularity measurement coefficient of the target connected domain is obtained according to the gradient variance of the connected domain, finally, the dark area chaotic index of the target connected domain is obtained according to the corrosion profile coefficient of the target edge and the regularity measurement coefficient of the target connected domain, the dark area chaotic index can reflect whether the corresponding connected domain is a corrosion area, and finally, all corrosion defect areas are obtained by clustering the dark area chaotic indexes.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for rapidly positioning a defective area on a surface of a new energy connection line according to an embodiment of the present invention.
Fig. 2 is a system frame diagram of a rapid positioning system for a defective area on a surface of a new energy connection line according to another embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the method and system for rapidly positioning the defect area on the surface of the new energy connecting line according to the invention in combination with the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the rapid positioning method for the defect area on the surface of the new energy connecting wire provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for rapidly positioning a defective area on a surface of a new energy connection line according to an embodiment of the invention is shown, and the method includes the following steps:
and S001, collecting a new energy connecting wire surface image and preprocessing.
It should be noted that, in this embodiment, the defect area on the surface of the new energy connection line is rapidly located, so that the surface image of the new energy connection line needs to be acquired first.
Specifically, the new energy connecting wire is slender, the connecting wire needs to be flatly spread, the shooting background is set to be white, the surface of the new energy connecting wire is shot by using a CMOS camera, and the surface image of the new energy connecting wire is acquired. It should be noted that the image of the surface of the new energy connection line is an RGB color image, and the flaws on the surface of the connection line are less obvious in the context of the elongated connection line, and for the convenience of subsequent analysis, a related pretreatment is performed. And carrying out image enhancement on the surface image of the new energy connecting line by adopting a retinex algorithm to obtain an enhanced image, and carrying out graying on the enhanced image to obtain a gray image.
So far, collecting and obtaining a new energy connecting wire surface image, and preprocessing the new energy connecting wire surface image to obtain a gray image.
Step S002, acquiring a new energy connecting line image, acquiring a plurality of sections of curves of the edges of each area, obtaining the trend rule degree of the curves according to the slope difference of adjacent pixel points on the curves, and obtaining the fitting coefficient of the curves on the target edges according to the trend rule degree of the curves on the target edges, the circularity and the straightness of the curves.
The background and the foreground of the surface image of the new energy connecting line have colors with larger difference, and the new energy connecting line is obvious compared with the background color.
Specifically, in the gray image obtained by graying, the gray values of the new energy connecting line area and the background area have obvious differences. And carrying out threshold segmentation on the gray level image through an Otsu threshold algorithm to obtain a new energy connecting line image, wherein a region with a gray level value of 0 in the new energy connecting line image is a connecting line region, and a region with a gray level value of 255 is a background region. The new energy connection line surface image in step S001 and the new energy connection line image here do not refer to the same image, the new energy connection line surface image is RGB, and the new energy connection line image is a binary image obtained by threshold segmentation.
Further, edge extraction is performed on the new energy connecting line image by using a Canny operator, so that edges of each area in the new energy connecting line image are obtained, each area comprises a corrosion flaw area, a character area and a light reflection area on the new energy connecting line, morphological corrosion refinement is performed on the edges of each area, and a connected area surrounded by a closed line of each area is obtained.
Further, detecting the corner points of the edges of each region by using a Harris corner point detection algorithm to obtain a plurality of corner points, taking the edges between every two adjacent corner points as a section of curve of the edges of the region, and finally obtaining a plurality of sections of curves of the edges of each region.
It should be noted that, because the corrosion flaws on the surface of the new energy connecting line are generally distributed in a spot shape and a block shape, and the edges of the area are irregularly round. If each section of curve is irregular, the slope difference between every two adjacent pixel points on the analysis curve is large, and the difference is large, the irregularity degree of the section of curve can be judged to be large, so that whether the section of curve is an edge of a corrosion area or not can be measured.
Specifically, taking a section of curve of any one region edge as an example, in order to facilitate the subsequent reference, marking any one region edge as a target edge, and obtaining the trend regularity of the curve according to the slope difference of adjacent pixel points on the curve, wherein the trend regularity is as follows:
in the method, in the process of the invention,for presetting the super-parameters, the super-parameters are preset in the embodiment>For the purposes of illustration, the objective is to prevent the denominator from being 0 +.>Is->Section curve>Tangential slope of each pixel point, +.>Is->Section curve>Tangential slope of each pixel point, +.>Is->Total number of pixels on segment curve, < >>Is->Degree of trend regularity of section curve, +.>To take absolute value. />The larger the trend representing the section of curve the more regular the less likely it is to be a eroded edge, +.>The smaller the trend of the curve is, the more irregular the trend is, the more likely the curve is a corroded edge, the trend regularity of all curves is obtained, and the linear normalization processing is carried out.
It should be noted that, since the light reflection area presents longer lines, the lines are curved relative to the corrosion area of the new energy connecting line surface, but the lines are still substantially linearly distributed; besides the light reflection area, the surface of the new energy connecting line has some self character font interference, because the character fonts are smaller, a plurality of characters can be extracted into a connected domain through a Canny operator, strokes of the character fonts are regular, horizontal and vertical, and although the characters are connected together, more straight lines can appear at the edges of the connected domain of the character identifier. For this case, a circle fitting and a straight line fitting are respectively adopted for all the section curves in each region, so that degree indexes representing the circularity of the circle and the straightness of the straight line which are fitted by the curves are respectively obtained, and a fitting coefficient is obtained by combining with the trend regularity, so as to represent whether the shape of the edge of the region is the edge of the corrosion region.
Specifically, the straightness of each section of curve is obtained, and the circularity of the area corresponding to the target edge, which is simply called the circularity of the target edge, is obtained. The calculation methods of the straightness and the circularity are well known and will not be described herein.
According to the trend regularity and the curve straightness of the curve on the target edge and the circularity of the target edge, the fitting coefficient of the curve on the target edge is obtained, and the fitting coefficient is specifically as follows:
in the method, in the process of the invention,for the preset threshold, the embodiment describes that the preset threshold is 0.5, and the +_is>For the->Straightness of the segment curve is in the range of 0-1,/L>The closer to 0 means that the section of curve is more likely to fit to a straight line, +.>For the circularity of the target edge, +.>Is the linear normalization post-treatment->Degree of trend regularity of section curve, +.>For the->Fitting coefficients of the segment curves are obtained, fitting coefficients of all curves on the target edge are obtained, and linear normalization processing is carried out. />The larger the one representing the target edge is more likely to fit into a circle, i.e. the more likely to be a eroded edge, combined with the trend regularity of the curve +.>The smaller, i.e. the more irregular the feature is for a corroded edge +.>The larger indicates that the curve is more likely to fit to the eroded edge.
Thus, the fitting coefficient of the curve is obtained.
And S003, obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion contour coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge.
It should be noted that, since the sections of the curve of the corroded edge do not have similar characteristics, and the sections of the curve of the text area and the sections of the curve of the light reflection area have similar characteristics, the curve difference degree between the different sections of the curve at the edge of each area can be calculated.
Specifically, the curve difference degree of the target edge is obtained according to the fitting coefficient difference of different sections of curves on the target edge, and the method specifically comprises the following steps:
in the method, in the process of the invention,for the->Fitting coefficient of segment curve, +.>For the->Fitting coefficient of segment curve, +.>For the total number of segments of the curve on the edge of the object, < +.>Is the curve difference degree of the target edge. If->The larger the difference between the curves on the target edge is, the more the curves on the target edge are not provided with similar characteristics, and the characteristic that the edge of the corrosion area is not regular is met.
Specifically, the corrosion profile coefficient of the target edge is obtained according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge, and specifically comprises the following steps:
in the method, in the process of the invention,for the total number of segments of the curve on the edge of the object, < +.>Is->Total number of pixels on segment curve, < >>For the number of pixels of the target edge, +.>For the preset correction factor, the embodiment is described with the preset correction factor of 0.5, ++>For the curve difference of the target edge, +.>Treatment for linear normalization is carried out on the target edge +.>Fitting coefficient of segment curve, +.>Is the erosion profile coefficient of the target edge.
By the way, byThe number of pixel points on each curve is +.>By correcting, whether the target edge is closer to the corrosion edge or not can be better reflected, and the smaller the trend regularity is, the more irregular characteristic is that the target edge is the corrosion edge, < + >>The larger the molecule is +.>The purpose of (1) is that: when->Taking values above 0.5 requires an amplifying effect on the number of curve pixels, +.>Taking values below 0.5 requires a narrowing effect on the fitting coefficients. By summing the number of corrected pixels of the n-segment curve, and comparing the number of corrected pixels with the number of pixels of the target edge, a ratio of more than 1 indicates that the target edge is closer to the corroded edge, and passing through the joint regionDomain curve difference to correct the etch profile coefficient of the region edge, +.>The larger the edge representing the region, the more likely it is for the erosion profile.
Thus, the erosion profile coefficient is obtained.
And S004, obtaining a regularity measurement coefficient of the target connected domain according to the gradient variance of the connected domain, and obtaining a dark area confusion index of the target connected domain according to the corrosion contour coefficient of the target edge and the regularity measurement coefficient of the target connected domain.
Besides the irregular circle at the edge of the corrosion area of the new energy connecting line, the inner part of the corrosion area is uneven from the original smooth surface, the color and luster are uneven, and the brightness is reduced. Therefore, for this feature, the region regularity metric coefficient of the connected domain is obtained by analyzing the gradient amplitude of the pixel point in each region.
Specifically, a Sobel operator is utilized to obtain gradient amplitude values of pixel points in each connected domain in a new energy connecting line image, gradient amplitude variance of the pixel points in each connected domain is calculated to serve as gradient variance of each connected domain, the connected domain corresponding to the target edge is marked as a target connected domain, and a normalization measurement coefficient of the target connected domain is obtained according to the gradient variance of the connected domain, specifically, the method comprises the following steps:
in the method, in the process of the invention,for presetting the super-parameters, the super-parameters are preset in the embodiment>To illustrate, the purpose is to ensure the integrity of the formula, in order to avoid the case where the denominator is 0, +.>Gradient variance for the target connected domain, +.>For the maximum value of the gradient variance of all connected domains, +.>For the minimum value of the gradient variance of all connected domains, +.>And (5) the regular measurement coefficient of the target connected domain. By making the ratio of the difference between the gradient variance of the target connected domain and the region where the maximum gradient variance is located and the difference between the maximum gradient variance and the minimum gradient variance, the smaller the gradient variance and the maximum gradient variance difference of the target connected domain is, the more intense the gradient change of the region is compared with the region of the surface of the connecting line, therefore, the more intense the gradient change of the region is>The smaller the gradient magnitude distribution inside the region representing the target connected domain is, the more irregular the region surface is, indicating that the region surface is not very flat.
Further, converting the surface image of the new energy connecting line from the RGB color space to the HSV color space, and obtaining the hue of each pixel point in the surface image of the new energy connecting lineSaturation->Lightness->Further, the hue +.>Saturation->Lightness->. The corrosion defect area has uneven color and luster and reduced brightness, and the dark area confusion index of the target connected domain is obtained according to the corrosion contour coefficient of the target edge and the regularity measurement coefficient of the target connected domain according to the characteristics, specifically as follows:
in the method, in the process of the invention,maximum hue value for pixel point in target connected domain +.>For the minimum hue value of the pixel point in the target connected domain,/->For the erosion profile coefficient of the target edge, +.>For the regularity metric coefficient of the target connected domain, +.>For the average brightness value of the pixel points in the target connected domain,/->And a dark area confusion index for the target connected domain. Obtaining the color difference of the corresponding region of the target connected domain by calculating the difference between the maximum hue and the minimum hue in the target connected domain, and combining the corrosion profile coefficient of the target connected domain, namely the molecule in the formula, as a reference difference coefficient, if the color of the corresponding region of the target connected domain has larger difference and the edge profile of the region is more irregular, if the region regularity measurement coefficient->Smaller, brightness mean +.>Smaller, i.e. dark area confusion index +.>The larger indicates that the interior of the region is less flat and darker, indicating that the region is more characterized as a corroded region.
Thus, a dark area confusion index is obtained.
And S005, clustering according to the dark area confusion index, and obtaining defective products according to the clustering result.
Specifically, the above-mentioned method is to analyze any connected domain, that is, a target connected domain, and similarly, obtain dark area confusion indexes of all connected domains, and preset cluster k=th1, in this embodiment, use th1=2 to describe, cluster dark area confusion indexes of all connected domains by using a K-means clustering algorithm, obtain two clustering results, use a clustering result with the largest dark area confusion index mean value in the clustering results as a corrosion area cluster, use a clustering result with the smallest dark area confusion index mean value in the clustering results as a non-corrosion area cluster, and mark a connected domain corresponding to the dark area confusion index in the corrosion area cluster as a corrosion flaw area.
Further, the area of the connected domain corresponding to the corrosion area cluster is marked as a first area, the area of the area with the gray value of 0 in the new energy connecting line image is marked as a second area, the ratio of the first area to the second area is used as the defect degree of the new energy connecting line to evaluate the influence degree of the corrosion defect on the connecting line, and the defect degree threshold is preset, in this embodiment, the description is made with the defect degree threshold being 0.1, and if the defect degree of the new energy connecting line is greater than the preset defect degree threshold, the new energy connecting line is considered as a defective product.
Through the steps, the rapid positioning method for the defect area on the surface of the new energy connecting wire is completed.
Another embodiment of the present invention provides a system for rapidly positioning a defective area on a surface of a new energy connection line, as shown in fig. 2, the system includes the following modules:
and an image acquisition module: acquiring a new energy connecting line image, acquiring a plurality of sections of curves at the edge of each region in the new energy connecting line image, and acquiring a communicating region surrounded by a closed line of each region;
and the trend rule degree calculation module is used for: obtaining the trend regularity of the curve according to the slope difference of adjacent pixel points on the curve;
and a fitting coefficient calculating module: obtaining trend regularity of the curve according to the gradient difference of adjacent pixel points on the curve, marking any area edge as a target edge, obtaining straightness of each section of curve and circularity of the target edge, and obtaining fitting coefficients of the curve on the target edge according to the trend regularity of the curve on the target edge, the straightness of the curve and the circularity of the target edge;
and a corrosion profile coefficient calculation module: obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge;
dark area confusion index calculation module: acquiring gradient variances of the connected domains, marking the connected domain corresponding to the target edge as a target connected domain, obtaining a regular measurement coefficient of the target connected domain according to the gradient variances of the connected domains, and obtaining a dark area confusion index of the target connected domain according to the corrosion profile coefficient of the target edge and the regular measurement coefficient of the target connected domain;
and a corrosion flaw area positioning module: clustering is carried out according to the dark area confusion index, and the corrosion flaw area is obtained according to the clustering result.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (6)

1. The rapid positioning method for the defect area on the surface of the new energy connecting wire is characterized by comprising the following steps of:
acquiring a new energy connecting line image, acquiring a plurality of sections of curves at the edge of each region in the new energy connecting line image, and acquiring a communicating region surrounded by a closed line of each region;
obtaining trend regularity of the curve according to the gradient difference of adjacent pixel points on the curve, marking any area edge as a target edge, obtaining straightness of each section of curve and circularity of the target edge, and obtaining fitting coefficients of the curve on the target edge according to the trend regularity of the curve on the target edge, the straightness of the curve and the circularity of the target edge;
obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge;
acquiring gradient variances of the connected domains, marking the connected domain corresponding to the target edge as a target connected domain, obtaining a regular measurement coefficient of the target connected domain according to the gradient variances of the connected domains, and obtaining a dark area confusion index of the target connected domain according to the corrosion profile coefficient of the target edge and the regular measurement coefficient of the target connected domain;
clustering is carried out according to the dark area confusion index, and a corrosion flaw area is obtained according to a clustering result;
the trend regularity of the curve is obtained according to the slope difference of adjacent pixel points on the curve, and the method comprises the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Is->On a section curveFirst->Tangential slope of each pixel point, +.>Is->Section curve>Tangential slope of each pixel point, +.>Is->Total number of pixels on segment curve, < >>Is->Degree of trend regularity of section curve, +.>Taking an absolute value;
the corrosion profile coefficient of the target edge is obtained according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge, and the method comprises the following specific steps:
in the method, in the process of the invention,for the total number of segments of the curve on the edge of the object, < +.>Is->Total number of pixels on segment curve, < >>For the number of pixels of the target edge, +.>For presetting correction coefficient, ++>For the curve difference of the target edge, +.>Treatment for linear normalization is carried out on the target edge +.>Fitting coefficient of segment curve, +.>The corrosion profile coefficient of the edge of the target;
the method for obtaining the regularity metric coefficient of the target connected domain according to the gradient variance of the connected domain comprises the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Gradient variance for the target connected domain, +.>For the maximum value of the gradient variance of all connected domains, +.>For the minimum value of the gradient variance of all connected domains, +.>The method comprises the steps of (1) taking a regular measurement coefficient of a target connected domain as a rule;
obtaining a dark area confusion index of the target connected domain according to the corrosion contour coefficient of the target edge and the regularity measurement coefficient of the target connected domain, wherein the method comprises the following specific steps:
in the method, in the process of the invention,maximum hue value for pixel point in target connected domain +.>For the minimum hue value of the pixel point in the target connected domain,/->For the erosion profile coefficient of the target edge, +.>For the regularity metric coefficient of the target connected domain, +.>For the average brightness value of the pixel points in the target connected domain,/->And a dark area confusion index for the target connected domain.
2. The method for rapidly positioning a defective area on a surface of a new energy connecting line according to claim 1, wherein the specific method for acquiring a plurality of curves of the edge of each area in the new energy connecting line image is as follows:
and extracting edges of the new energy connecting line image by using a Canny operator to obtain edges of each region in the new energy connecting line image, detecting corner points of the edges of each region by using a Harris corner point detection algorithm to obtain a plurality of corner points, taking the edges between every two adjacent corner points as a section of curve of the edges of the region, and finally obtaining a plurality of sections of curves of the edges of each region.
3. The method for rapidly positioning the surface defect area of the new energy connecting line according to claim 1, wherein the specific acquisition method of the connected domain surrounded by the closed line of each area is as follows:
and carrying out morphological corrosion refinement on the edge of each region to obtain a connected region surrounded by a closed line of each region.
4. The method for rapidly positioning the surface defect area of the new energy connecting line according to claim 1, wherein the obtaining the fitting coefficient of the curve on the target edge according to the trend regularity and the curve straightness of the curve on the target edge and the circularity of the target edge comprises the following specific steps:
in the method, in the process of the invention,for a preset threshold value, ++>For the->Straightness of section curve->For the circularity of the target edge,is the linear normalization post-treatment->Degree of trend regularity of section curve, +.>For the->Fitting coefficients of the segment curves.
5. The method for rapidly positioning the surface defect area of the new energy connecting line according to claim 1, wherein the curve difference degree of the target edge is obtained according to the fitting coefficient difference of different sections of curves on the target edge, comprising the following specific steps:
in the method, in the process of the invention,for the->Fitting coefficient of segment curve, +.>For the->The fitting coefficients of the segment of the curve,for the total number of segments of the curve on the edge of the object, < +.>Is the curve difference degree of the target edge.
6. The rapid positioning system for the defect area on the surface of the new energy connecting wire is characterized by comprising the following modules:
and an image acquisition module: acquiring a new energy connecting line image, acquiring a plurality of sections of curves at the edge of each region in the new energy connecting line image, and acquiring a communicating region surrounded by a closed line of each region;
and the trend rule degree calculation module is used for: obtaining the trend regularity of the curve according to the slope difference of adjacent pixel points on the curve;
and a fitting coefficient calculating module: marking any one area edge as a target edge, obtaining straightness of each section of curve and circularity of the target edge, and obtaining fitting coefficients of the curve on the target edge according to the trend regularity and the curve straightness of the curve on the target edge and the circularity of the target edge;
and a corrosion profile coefficient calculation module: obtaining the curve difference degree of the target edge according to the fitting coefficient difference of different sections of curves on the target edge, and obtaining the corrosion profile coefficient of the target edge according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge;
dark area confusion index calculation module: obtaining gradient variances of the connected domains, obtaining a regularity measurement coefficient of the target connected domain according to the gradient variances of the connected domains, and obtaining a dark area confusion index of the target connected domain according to the corrosion contour coefficient of the target edge and the regularity measurement coefficient of the target connected domain;
and a corrosion flaw area positioning module: clustering is carried out according to the dark area confusion index, and a corrosion flaw area is obtained according to a clustering result;
the trend regularity of the curve is obtained according to the slope difference of adjacent pixel points on the curve, and the method comprises the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Is->Section curve>Tangential slope of each pixel point, +.>Is->Section curve>Tangential slope of each pixel point, +.>Is->Total number of pixels on segment curve, < >>Is->Degree of trend regularity of section curve, +.>Taking an absolute value;
the corrosion profile coefficient of the target edge is obtained according to the curve difference degree of the target edge and the fitting coefficient of the curve on the target edge, and the method comprises the following specific steps:
in the method, in the process of the invention,for the total number of segments of the curve on the edge of the object, < +.>Is->Total number of pixels on segment curve, < >>For the number of pixels of the target edge, +.>For presetting correction coefficient, ++>For the curve difference of the target edge, +.>Treatment for linear normalization is carried out on the target edge +.>Fitting coefficient of segment curve, +.>The corrosion profile coefficient of the edge of the target;
the method for obtaining the regularity metric coefficient of the target connected domain according to the gradient variance of the connected domain comprises the following specific steps:
in the method, in the process of the invention,for presetting super parameter->Gradient variance for the target connected domain, +.>For the maximum value of the gradient variance of all connected domains, +.>For the minimum value of the gradient variance of all connected domains, +.>The method comprises the steps of (1) taking a regular measurement coefficient of a target connected domain as a rule;
obtaining a dark area confusion index of the target connected domain according to the corrosion contour coefficient of the target edge and the regularity measurement coefficient of the target connected domain, wherein the method comprises the following specific steps:
in the method, in the process of the invention,maximum hue value for pixel point in target connected domain +.>For the minimum hue value of the pixel point in the target connected domain,/->For the erosion profile coefficient of the target edge, +.>For the regularity metric coefficient of the target connected domain, +.>For the average brightness value of the pixel points in the target connected domain,/->And a dark area confusion index for the target connected domain.
CN202311213046.7A 2023-09-20 2023-09-20 Rapid positioning method and system for surface defect area of new energy connecting line Active CN116958144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311213046.7A CN116958144B (en) 2023-09-20 2023-09-20 Rapid positioning method and system for surface defect area of new energy connecting line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311213046.7A CN116958144B (en) 2023-09-20 2023-09-20 Rapid positioning method and system for surface defect area of new energy connecting line

Publications (2)

Publication Number Publication Date
CN116958144A CN116958144A (en) 2023-10-27
CN116958144B true CN116958144B (en) 2024-01-12

Family

ID=88449605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311213046.7A Active CN116958144B (en) 2023-09-20 2023-09-20 Rapid positioning method and system for surface defect area of new energy connecting line

Country Status (1)

Country Link
CN (1) CN116958144B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541583B (en) * 2024-01-09 2024-04-09 陕西东泽瑞科技开发有限公司 Drill rod corrosion monitoring method and system for explosion-proof monitoring system
CN117557460B (en) * 2024-01-12 2024-03-29 济南科汛智能科技有限公司 Angiography image enhancement method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115100210A (en) * 2022-08-29 2022-09-23 山东艾克赛尔机械制造有限公司 Anti-counterfeiting identification method based on automobile parts
CN115115612A (en) * 2022-07-26 2022-09-27 山东安德机械科技有限公司 Surface defect detection method and system for mechanical parts
CN115330783A (en) * 2022-10-13 2022-11-11 启东谷诚不锈钢制品有限公司 Steel wire rope defect detection method
CN115984284A (en) * 2023-03-21 2023-04-18 黄海造船有限公司 X-ray hull weld image detection method for ship maintenance
CN116385445A (en) * 2023-06-06 2023-07-04 东莞市希锐自动化科技股份有限公司 Visual technology-based electroplated hardware flaw detection method
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN116486061A (en) * 2023-06-20 2023-07-25 苏州德斯米尔智能科技有限公司 Sewage treatment effect detection method based on machine vision

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115115612A (en) * 2022-07-26 2022-09-27 山东安德机械科技有限公司 Surface defect detection method and system for mechanical parts
CN115100210A (en) * 2022-08-29 2022-09-23 山东艾克赛尔机械制造有限公司 Anti-counterfeiting identification method based on automobile parts
CN115330783A (en) * 2022-10-13 2022-11-11 启东谷诚不锈钢制品有限公司 Steel wire rope defect detection method
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN115984284A (en) * 2023-03-21 2023-04-18 黄海造船有限公司 X-ray hull weld image detection method for ship maintenance
CN116385445A (en) * 2023-06-06 2023-07-04 东莞市希锐自动化科技股份有限公司 Visual technology-based electroplated hardware flaw detection method
CN116486061A (en) * 2023-06-20 2023-07-25 苏州德斯米尔智能科技有限公司 Sewage treatment effect detection method based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于机器视觉的多孔材料缺陷检测";金顺楠等;《计算机系统应用》;第30卷(第1期);第270-276页 *

Also Published As

Publication number Publication date
CN116958144A (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN116958144B (en) Rapid positioning method and system for surface defect area of new energy connecting line
CN109141232B (en) Online detection method for disc castings based on machine vision
Yiyang The design of glass crack detection system based on image preprocessing technology
CN116758061B (en) Casting surface defect detection method based on computer vision
CN116721106A (en) Profile flaw visual detection method based on image processing
CN108876768B (en) Shadow defect detection method for light guide plate
CN109682839B (en) Online detection method for surface defects of metal arc-shaped workpiece
CN115345885A (en) Method for detecting appearance quality of metal fitness equipment
CN116758077B (en) Online detection method and system for surface flatness of surfboard
CN103543394A (en) Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment
CN117237368B (en) Bridge crack detection method and system
CN113592861A (en) Bridge crack detection method based on dynamic threshold
CN112686264B (en) Digital meter reading method, device, computer equipment and storage medium
CN109658391B (en) Circle radius measuring method based on contour merging and convex hull fitting
CN116977358B (en) Visual auxiliary detection method for corrugated paper production quality
CN113793337B (en) Locomotive accessory surface abnormal degree evaluation method based on artificial intelligence
CN117095004A (en) Excavator walking frame main body welding deformation detection method based on computer vision
CN116309599A (en) Water quality visual monitoring method based on sewage pretreatment
CN114881960A (en) Feature enhancement-based cloth linear defect detection method and system
CN115330646A (en) Metal component inspection method for fitness equipment paint spraying process
CN116777911A (en) Double-substrate radiator surface defect detection system based on image recognition
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN117011291B (en) Watch shell quality visual detection method
CN111192261A (en) Method for identifying lens defect types
CN114463258B (en) Rolling stock brake pad abrasion detection method based on deep learning technology

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