CN117974657B - Cable surface defect detection method based on computer vision - Google Patents

Cable surface defect detection method based on computer vision Download PDF

Info

Publication number
CN117974657B
CN117974657B CN202410372530.2A CN202410372530A CN117974657B CN 117974657 B CN117974657 B CN 117974657B CN 202410372530 A CN202410372530 A CN 202410372530A CN 117974657 B CN117974657 B CN 117974657B
Authority
CN
China
Prior art keywords
local area
point
source
source point
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410372530.2A
Other languages
Chinese (zh)
Other versions
CN117974657A (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.)
Zhejiang Gaosheng Power Transmission And Transformation Equipment Co ltd
Original Assignee
Zhejiang Gaosheng Power Transmission And Transformation Equipment 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 Zhejiang Gaosheng Power Transmission And Transformation Equipment Co ltd filed Critical Zhejiang Gaosheng Power Transmission And Transformation Equipment Co ltd
Priority to CN202410372530.2A priority Critical patent/CN117974657B/en
Publication of CN117974657A publication Critical patent/CN117974657A/en
Application granted granted Critical
Publication of CN117974657B publication Critical patent/CN117974657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a cable surface defect detection method based on computer vision, which comprises the following steps: acquiring a gray level image of the cable surface; obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface; obtaining the representation degree of the defect center of the local area of each pixel point according to the gray level distribution and the gradient distribution of the pixel points in the local area; obtaining a source point of each local area according to the representation degree of the defect center of the local area of each pixel point; according to the source points in each local area, a plurality of source point combinations of the local areas are obtained, and the combination degree of each source point combination is calculated to obtain the optimal source point combination of each local area; obtaining a plurality of defect areas according to the optimal source point combination of each local area; and carrying out cable surface defect detection according to the defect area. The invention improves the accuracy of defect detection by processing the cable surface image.

Description

Cable surface defect detection method based on computer vision
Technical Field
The invention relates to the technical field of image data processing, in particular to a cable surface defect detection method based on computer vision.
Background
Traditional cable surface quality inspection generally relies on manual visual inspection, is time-consuming and labor-consuming, is easily affected by subjective factors, and is more automatic and intelligent due to the application of computer vision technology to cable manufacturing and production lines.
For the identification detection of cable surface defects, the acquired cable images cannot better reflect defect information due to the influence of factors such as the non-planar structure of the cable when the images are shot, so that the images can be enhanced through histogram equalization, the contrast is improved, but the enhancement of the whole contrast is more focused on the processing of the images through the traditional histogram equalization, the excessive enhancement in a local area can be caused, the loss of detail information is caused, and the accuracy of defect detection is reduced.
Disclosure of Invention
The invention provides a cable surface defect detection method based on computer vision, which aims to solve the existing problems.
The invention discloses a cable surface defect detection method based on computer vision, which adopts the following technical scheme:
one embodiment of the invention provides a cable surface defect detection method based on computer vision, which comprises the following steps:
Acquiring a gray level image of the cable surface;
obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface; obtaining the representation degree of the defect center of the local area of each pixel point according to the gray level distribution and the gradient distribution of the pixel points in the local area;
Obtaining a source point of each local area according to the representation degree of the defect center of the local area of each pixel point; according to the source points in each local area, a plurality of source point combinations of the local areas are obtained, and the combination degree of each source point combination is calculated to obtain the optimal source point combination of each local area;
Obtaining a plurality of defect areas according to the optimal source point combination of each local area;
and carrying out cable surface defect detection according to the defect area.
Further, the obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface comprises the following specific steps:
Utilization of gray scale images on cable surfaces And (3) carrying out bidirectional edge detection by the operator, dividing the gray level image of the cable surface into a plurality of areas by the edge line according to the edge detection result, and marking the areas as a plurality of local areas.
Further, the method for obtaining the representation of the defect center of the local area of each pixel point according to the gray level distribution and the gradient distribution of the pixel points in the local area comprises the following specific formulas:
Will be the first First/>, within a local regionThe pixel points are marked as target pixel points, and the calculation formula of the representation degree of the defect center of the local area of the target pixel points is as follows:
Wherein, Representing the representation of the defect center of the local area of the target pixel point,/>Representing the eight neighborhood direction quantity of the target pixel point,/>Representing the number of pixels present in each direction of the target pixel in the local region,/>First/>, representing target pixelFirst/>, in the individual directionsGradient value of each pixel point,/>First/>, representing target pixelFirst/>, in the individual directionsGray value of each pixel/(First/>, representing target pixelFirst/>, in the individual directionsGray value of individual dot,/>Indicating the existence/>, of the target pixel pointFour collinear directions exist in the eight neighborhood directions, each collinear direction comprising two directions in the eight neighborhood and being noted as two secondary directions for each collinear direction,/>Two secondary directions respectively representing collinear directions; /(I)Representing the number of pixels present in each of the collinear directions of the target pixel,/>, in each of the directionsRepresents the/>First/>, in collinear directionGradient value of each pixel point,/>Represents the/>First/>, in collinear directionGray value of each pixel/(Represents the/>First/>, in collinear directionGray value of each pixel/(Representing absolute value functions,/>For calculating standard deviation for results obtained in eight neighborhood directions,/>For maximizing the results obtained for four collinear directions,/>Representing the normalization function.
Further, the obtaining the source point of each local area according to the representation of the defect center of the local area of each pixel point comprises the following specific steps:
And marking pixel points with the defect center expressive degree of all the local areas being larger than or equal to a preset judging threshold value, and marking the pixel points as source points of each local area.
Further, the obtaining a plurality of source point combinations of the local area according to the source points in each local area comprises the following specific steps:
and combining a plurality of source points in any local area in pairs to obtain a plurality of source point combinations of the local area.
Further, the calculating the combination degree of each source point combination to obtain the optimal source point combination of each local area includes the following specific steps:
acquiring the combination degree of each source point combination according to the distribution of the source points in the local area; will be the first Combining source points corresponding to the maximum combination degree in the local areas as a first/>Optimal source point combinations for the individual local regions.
Further, according to the distribution of the source points in the local area, the combination degree of each source point combination is obtained, and the specific formula is as follows:
Wherein, Represents the/>First/>, of local areaDegree of combination of individual source point combinations,/>Represents the/>Number of source points of each local region,/>Represents the/>Distance between 1 st source point and 2 nd source point in source point combination,/>Representing the number of source points to be compared between two source points in the current source point combination,/>Represent the firstThe 1 st source point in the source point combination and the nearest source point/source pointDistance between source points,/>Represents the/>The 2 nd source point in the source point combination and the nearest source point from the 2 nd source pointDistance between source points.
Further, the obtaining a plurality of defect areas according to the optimal source point combination of each local area comprises the following specific steps:
according to each local area and the optimal source point combination, obtaining a core source point and a cross area of each local area;
And for any local area, excluding the intersection area in the local area, respectively taking source points in the optimal source point combination as initial seed points, carrying out area growth to obtain defect areas corresponding to the two source points, and attributing the intersection area to the defect area determined by the core source points.
Further, the method for obtaining the core source point of each local area according to each local area and the optimal source point combination comprises the following specific steps:
carrying out Canny operator edge detection on each local area to obtain a plurality of edge points of each local area; for any edge point in any local area, a local range of the edge point is built by using the edge point as a center and a window with a size of 5*5, and the ratio of the number of the edge points in the local range to the total number of the pixel points is used as the density degree of the edge point; acquiring the degree of density of each edge point in the local area, and taking the edge point with the highest degree of density as a core point of the intersection area in the local area;
Expanding from a 1*1 crossing area by taking a core point as a center, and calculating the intensity of the crossing area, wherein the intensity of the crossing area is the same as the intensity calculated by the edge point based on the local range; and continuing to expand the neighborhood range of 2x2, and so on and expanding the crossing area until the crossing area is traversed to the maximum value of the intensity degree of the crossing area;
When each traversal expansion is performed on the intersection area, calculating the average Euclidean distance between the newly added edge point and each of the two source points in the optimal source point combination, accumulating the average Euclidean distance between the newly added edge point and each source point in the optimal source point combination during each traversal expansion, and marking the source point with the smallest accumulated value of the average Euclidean distance as the core source point of the optimal source point combination.
Further, the cable surface defect detection according to the defect area comprises the following specific steps:
Respectively carrying out histogram equalization on each defect area, and marking the cable surface gray level image processed by all the defect areas as a cable surface enhanced image; and performing defect detection on the surface of the cable through the cable surface enhanced image.
The technical scheme of the invention has the beneficial effects that: obtaining each local area in the image through edge detection, analyzing the expressive degree of each point serving as the defect center of the local area aiming at each local area, and screening the expressive degree; and analyzing the optimal source point combination in the local area by taking the selected points as source points, analyzing the attribution right of the intersection area between the source points, and further acquiring the defect areas with different degrees in the final local areas. Thus, each defective area is subjected to self-adaptive histogram equalization, and the enhanced image is subjected to defect detection. The method can strengthen the defect areas with different degrees, avoids the problems of excessive strengthening, detail loss and the like when the traditional histogram equalization is used for integrally strengthening the image, improves the contrast ratio by strengthening the defect areas, better displays defect details and improves the accuracy of defect detection.
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 steps of a method for detecting a defect on a cable surface based on computer vision according to 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 detailed description refers to specific implementation, structure, characteristics and effects of a cable surface defect detection method based on computer vision according to the invention, which are provided by combining 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 cable surface defect detection method based on computer vision.
Referring to fig. 1, a flowchart of a method for detecting a defect on a cable surface based on computer vision according to an embodiment of the invention is shown, the method includes the following steps:
step S001: and acquiring a gray level image of the cable surface.
The main purpose of this embodiment is to detect cable surface defects, and thus it is necessary to obtain cable surface images.
Specifically, a fixed high-definition camera is installed on a cable production line, a cable surface image is obtained through shooting, and gray scale processing is carried out on the cable surface image to obtain a cable surface gray scale image.
Thus, a gray scale image of the cable surface is obtained.
Step S002: obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface; and obtaining the representation degree of the defect center of the local area of each pixel point according to the gray level distribution and the gradient distribution of the pixel points in the local area.
It should be noted that, the cable involves a plurality of mechanical operations in the manufacturing process, such as extrusion, drawing, cutting and other mechanical operations, scratch defects can be generated in the cable in the mechanical operation process, and the surface image of the cable is affected by the non-planar structure of the cable itself, the illumination angle and the like, so that different levels of defect expression can be presented in different areas of the image, the image is enhanced through histogram equalization, and defects can be better presented, but if the traditional histogram equalization is directly enhanced, conditions such as excessive enhancement, loss of detail information and the like can be caused in partial areas, which is unfavorable for the subsequent detection of defects. In this embodiment, the defect performance consistency in the overall direction and the collinear direction of each point is used to determine the performance of each point as the defect center of the local area.
In particular, the gray scale image of the cable surface is utilizedThe operator carries out bidirectional edge detection, and according to an edge detection result, an edge line divides a cable surface gray level image into a plurality of areas which are marked as a plurality of local areas; for each local area, calculating the expressive degree of each pixel point in each local area as the defect center of the local area, and calculating the/>First/>, within a local regionThe pixel points are marked as target pixel points, and the calculation formula of the representation degree of the defect center of the local area of the target pixel points is as follows:
Wherein, Representing the representation of the defect center of the local area of the target pixel point,/>Representing the eight neighborhood direction quantity of the target pixel point,/>Representing the number of pixels present in each direction of the target pixel in the local region,/>First/>, representing target pixelFirst/>, in the individual directionsGradient value of each pixel point,/>First/>, representing target pixelFirst/>, in the individual directionsGray value of each pixel/(First/>, representing target pixelFirst/>, in the individual directionsGray value of individual dot,/>Indicating the existence/>, of the target pixel pointFour collinear directions exist in the eight neighborhood directions, each collinear direction comprising two directions in the eight neighborhood and denoted as two secondary directions for each collinear direction,/>Two secondary directions respectively representing collinear directions; /(I)The number of pixels existing in each sub-direction in each collinear direction of the target pixel is represented, and it is to be noted that if the number of pixels existing in the two sub-directions is different, the minimum number of pixels is calculated; Represents the/> First/>, in collinear directionGradient value of each pixel point,/>Represents the/>First/>, in collinear directionGray value of each pixel/(Represents the/>First/>, in collinear directionGray value of each pixel/(Representing absolute value functions,/>For calculating standard deviation of results obtained for eight neighborhood directions, i.e. for eight neighborhood directionsCalculating a standard deviation; /(I)For maximizing the result obtained for four collinear directions, i.e. for four collinear directionsObtaining the maximum value; /(I)Representing a normalization function, and adopting a linear normalization method to normalize all pixel points in all local areas to obtain a normalization object
It is to be noted that,Representing the degree of representation of the defect center of the local area as the current point as a whole determined by the defect consistency representation in all directions of the eight neighborhoods, wherein/>The defect expression degree in each direction is analyzed firstly, the scratch defect is expressed as that the gray value is lower than that of the normal region, and the gradient value is far greater than that of the normal region, so that the defect is expressed as/>To embody; and the scratch area has certain continuity, so that the smaller the difference is, the larger the probability of scratch defects is, the passing/>, through the gray level difference between adjacent points isEmbodied,/>Smaller,/>The larger the fit the overall inverse-positive relationship. /(I)The larger the defect in the current direction, the greater the defect expression degree. Finally, by/>The consistency of the overall direction defect performance is embodied by the standard deviation of the defect performance degree of each direction, and the smaller the standard deviation is, the greater the consistency of the overall direction defect performance is.
It should be noted that the number of the substrates,Representing the degree of representation of the defect uniformity in two secondary directions in the collinear direction to determine the current point as the center of the defect in the local area; since the appearance of the scratch defect may be difficult to embody in the overall direction due to the limitation of the actual width of the scratch, the present embodiment further analyzes the uniformity of the defect between the secondary directions in the collinear direction by analyzing the uniformity of the defect; the method is characterized by comparing two secondary directions in the collinear direction, and the maximum defect consistency degree in each collinear direction is screened out through max () to be used as the defect consistency degree in the collinear direction.
It should be further noted that, compared with the correspondence defect consistency of the local direction and the overall direction,The larger the value, the larger the expressive degree of the defect center of the local area of the target pixel point is.
According to the above manner, the manifestation of the local area defect center of each pixel point is obtained.
So far, the expressive degree of the defect center of the local area of each pixel point is obtained.
Step S003: obtaining a source point of each local area according to the representation degree of the defect center of the local area of each pixel point; and according to the source points in each local area, a plurality of source point combinations of the local areas are obtained, and the combination degree of each source point combination is calculated to obtain the optimal source point combination of each local area.
The method is characterized in that the source points are obtained based on the representation degree of the defect center of the local area, the analysis is performed, the local areas are divided into two defect areas with different degrees, and the defects with different degrees in the local areas are finely subdivided, so that the optimal distribution areas in the areas formed by the two sources in the combination can be screened out through the combination of the source points in the local areas, however, the areas formed by the two source points are inevitably intersected, namely, intersection areas exist, and the intersection areas are distributed.
Specifically, a judgment threshold value is setScreening the manifestation degree of the defect center of the local area of each pixel point in each local area, and enabling the manifestation degree of the defect center of the local area to be larger than or equal to a judging threshold value/>The pixel points of the image are marked and marked as source points.
It should be noted that, for the source points of each local area, the source combinations are to be determined according to the distances between the source points, and the optimal source point combination should be that the distance between two source points is far and the distance between the two source points and the source points in the respective areas is near, so as to satisfy the distribution conditions of defects of two different degrees.
Specifically, combining a plurality of source points in any local area in pairs to obtain a plurality of source point combinations of the local area; then the firstFirst/>, of local areaThe calculation formula of the combination degree of the source point combinations is as follows:
Wherein, Represents the/>First/>, of local areaDegree of combination of individual source point combinations,/>Represents the/>Number of source points of each local region,/>Represents the/>Distance between 1 st source point and 2 nd source point in source point combination,/>Representing the number of source points to be compared between two source points in the current source point combination,/>Represent the firstThe 1 st source point in the source point combination and the nearest source point/source pointDistance between source points,/>Represents the/>The 2 nd source point in the source point combination and the nearest source point from the 2 nd source pointThe distance between the source points, i.e. by the/>Two source points in the source point combination are respectively taken as centers, and the nearest/>, which are respectively acquiredThe source points are analyzed and the distances are described by Euclidean distances.
It is to be noted that,Representing the distance between two source points in the current source point combination, wherein the larger the distance between the two source points is, the larger the difference between two defect areas with different degrees corresponding to the current source point combination is,And if the source point in the current source point combination is used as the main source point of the two defect areas with different degrees, analyzing the distance difference between the main source point and the corresponding source point, and indicating that the source point in the current source point combination is more likely to be the main source point of the defect area with different degrees if the distance difference is smaller.
Further, according to the above mode, the firstThe degree of combination of each source point combination of the local areas; combining source points corresponding to the maximum combination degree as the first/>Optimal source point combinations for the individual local regions.
So far, the optimal source point combination of each local area is obtained.
Step S004: and obtaining a plurality of defect areas according to the optimal source point combination of each local area.
In each local area, two defect areas with different degrees corresponding to the optimal source point combination exist in the actual image, so that the defect area needs to be determined by combining edge detection.
Specifically, canny operator edge detection is performed on each local area to obtain a plurality of edge points of each local area, wherein the Canny operator edge detection algorithm is the prior art and is not described herein again; for any edge point in any local area, a local range of the edge point is built by using the edge point as a center and a window with a size of 5*5, and the ratio of the number of the edge points in the local range to the total number of the pixel points is used as the density degree of the edge point; and acquiring the density degree of each edge point in the local area, and taking the edge point with the highest density degree as a core point of the intersection area in the local area.
Further, for the core points of the intersection areas in each local area, the embodiment performs traversal expansion, firstly expands from the intersection area of 1*1 by taking the core point as the center, and calculates the intensity of the intersection area, wherein the intensity of the intersection area is the same as the intensity calculated by the edge points based on the local range; and continuing to expand the neighborhood range of 2x 2, and so on and expanding the crossing area until the crossing area is traversed to the maximum value of the crossing area density, namely, in the traversing process, when the crossing area density is smaller than the crossing area density of the previous traversing, taking the crossing area of the previous traversing as the final crossing area.
It should be noted that, to obtain the intersection region in each local region, consideration needs to be given to which source point in the optimal source point combination in the local region corresponds to the defect region to which the intersection region belongs.
Specifically, when each traversal is extended to the intersection area, the average Euclidean distance between the newly added edge point and each of the two source points in the optimal source point combination is calculated, the average Euclidean distance between the newly added edge point and each source point in the optimal source point combination during each traversal extension is accumulated, the smallest distance indicates that the intersection area is more prone to the defect area corresponding to the source point in the determination process of the intersection area, and the source point with the smallest average Euclidean distance accumulated value is marked as the core source point of the optimal source point combination.
Further, for any local area, excluding the intersection area in the local area, taking the source points in the optimal source point combination as initial seed points respectively, and performing area growth to obtain defect areas corresponding to the two source points respectively, wherein an area growth algorithm is the prior art, and is not described in detail herein, the intersection area is attributed to the defect area determined by the core source point, so that two defect areas are obtained for the local area, and two defect areas are obtained for each local area.
So far, for each local area, two defect areas with different defect degrees are obtained, and then a plurality of defect areas with different degrees are obtained as a whole.
Step S005: and carrying out cable surface defect detection according to the defect area.
Specifically, histogram equalization is performed on each defect area, and is known in the art, which is not described in detail in this embodiment, and the cable surface gray level image processed by all defect areas is recorded as the cable surface enhanced image; the defect detection of the cable surface is performed through the cable surface enhanced image, the detection method is the existing method, and the embodiment is not repeated.
This embodiment is completed.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (4)

1. The cable surface defect detection method based on computer vision is characterized by comprising the following steps of:
Acquiring a gray level image of the cable surface;
obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface; obtaining the representation degree of the defect center of the local area of each pixel point according to the gray level distribution and the gradient distribution of the pixel points in the local area;
Obtaining a source point of each local area according to the representation degree of the defect center of the local area of each pixel point; according to the source points in each local area, a plurality of source point combinations of the local areas are obtained, and the combination degree of each source point combination is calculated to obtain the optimal source point combination of each local area;
Obtaining a plurality of defect areas according to the optimal source point combination of each local area;
carrying out cable surface defect detection according to the defect area;
According to the gray level distribution and gradient distribution of the pixel points in the local area, the expressive degree of the defect center of the local area of each pixel point is obtained, and the specific formula is as follows:
Will be the first First/>, within a local regionThe pixel points are marked as target pixel points, and the calculation formula of the representation degree of the defect center of the local area of the target pixel points is as follows:
Wherein, Representing the representation of the defect center of the local area of the target pixel point,/>Representing the eight neighborhood direction quantity of the target pixel point,/>Representing the number of pixels present in each direction of the target pixel in the local region,/>First/>, representing target pixelFirst/>, in the individual directionsGradient value of each pixel point,/>First/>, representing target pixelFirst/>, in the individual directionsGray value of each pixel/(First/>, representing target pixelFirst/>, in the individual directionsGray value of individual dot,/>Indicating the existence/>, of the target pixel pointFour collinear directions exist in the eight neighborhood directions, each collinear direction comprising two directions in the eight neighborhood and being noted as two secondary directions for each collinear direction,/>Two secondary directions respectively representing collinear directions; /(I)Representing the number of pixels present in each of the collinear directions of the target pixel,/>, in each of the directionsRepresents the/>First/>, in collinear directionGradient value of each pixel point,/>Represents the/>First/>, in collinear directionGray value of each pixel/(Represents the/>First/>, in collinear directionGray value of each pixel/(Representing absolute value functions,/>For calculating standard deviation for results obtained in eight neighborhood directions,/>For maximizing the results obtained for four collinear directions,/>Representing a normalization function;
the method for obtaining the source point of each local area according to the representation degree of the defect center of the local area of each pixel point comprises the following specific steps:
Marking pixel points with the defect center expressive degree of all the local areas being larger than or equal to a preset judging threshold value, and marking the pixel points as source points of each local area;
Calculating the combination degree of each source point combination to obtain the optimal source point combination of each local area, wherein the method comprises the following specific steps:
acquiring the combination degree of each source point combination according to the distribution of the source points in the local area; will be the first Combining source points corresponding to the maximum combination degree in the local areas as a first/>Optimal source point combination of the local areas;
According to the distribution of source points in the local area, the combination degree of each source point combination is obtained, and the specific formulas are as follows:
Wherein, Represents the/>First/>, of local areaDegree of combination of individual source point combinations,/>Represents the/>Number of source points of each local region,/>Represents the/>Distance between 1 st source point and 2 nd source point in source point combination,/>Representing the number of source points to be compared between two source points in the current source point combination,/>Represents the/>The 1 st source point in the source point combination and the nearest source point/source pointDistance between source points,/>Represents the/>The 2 nd source point in the source point combination and the nearest source point from the 2 nd source pointThe distance between the source points;
according to the optimal source point combination of each local area, a plurality of defect areas are obtained, and the method comprises the following specific steps:
according to each local area and the optimal source point combination, obtaining a core source point and a cross area of each local area;
For any local area, excluding the intersection area in the local area, taking source points in the optimal source point combination as initial seed points respectively, carrying out area growth to obtain defect areas corresponding to the two source points respectively, and attributing the intersection area to the defect area determined by the core source points;
The core source point of each local area is obtained according to each local area and the optimal source point combination, and the method comprises the following specific steps:
carrying out Canny operator edge detection on each local area to obtain a plurality of edge points of each local area; for any edge point in any local area, a local range of the edge point is built by using the edge point as a center and a window with a size of 5*5, and the ratio of the number of the edge points in the local range to the total number of the pixel points is used as the density degree of the edge point; acquiring the degree of density of each edge point in the local area, and taking the edge point with the highest degree of density as a core point of the intersection area in the local area;
Expanding from a 1*1 crossing area by taking a core point as a center, and calculating the intensity of the crossing area, wherein the intensity of the crossing area is the same as the intensity calculated by the edge point based on the local range; and continuing to expand the neighborhood range of 2x2, and so on and expanding the crossing area until the crossing area is traversed to the maximum value of the intensity degree of the crossing area;
When each traversal expansion is performed on the intersection area, calculating the average Euclidean distance between the newly added edge point and each of the two source points in the optimal source point combination, accumulating the average Euclidean distance between the newly added edge point and each source point in the optimal source point combination during each traversal expansion, and marking the source point with the smallest accumulated value of the average Euclidean distance as the core source point of the optimal source point combination.
2. The method for detecting the surface defects of the cable based on computer vision according to claim 1, wherein the step of obtaining a plurality of local areas according to the edge detection result of the gray level image of the cable surface comprises the following specific steps:
Utilization of gray scale images on cable surfaces And (3) carrying out bidirectional edge detection by the operator, dividing the gray level image of the cable surface into a plurality of areas by the edge line according to the edge detection result, and marking the areas as a plurality of local areas.
3. The method for detecting surface defects of cables based on computer vision according to claim 1, wherein the obtaining a plurality of source point combinations of the local areas according to the source points in each local area comprises the following specific steps:
and combining a plurality of source points in any local area in pairs to obtain a plurality of source point combinations of the local area.
4. The method for detecting the surface defects of the cable based on the computer vision according to claim 1, wherein the step of detecting the surface defects of the cable according to the defect area comprises the following specific steps:
Respectively carrying out histogram equalization on each defect area, and marking the cable surface gray level image processed by all the defect areas as a cable surface enhanced image; and performing defect detection on the surface of the cable through the cable surface enhanced image.
CN202410372530.2A 2024-03-29 2024-03-29 Cable surface defect detection method based on computer vision Active CN117974657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410372530.2A CN117974657B (en) 2024-03-29 2024-03-29 Cable surface defect detection method based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410372530.2A CN117974657B (en) 2024-03-29 2024-03-29 Cable surface defect detection method based on computer vision

Publications (2)

Publication Number Publication Date
CN117974657A CN117974657A (en) 2024-05-03
CN117974657B true CN117974657B (en) 2024-06-14

Family

ID=90859815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410372530.2A Active CN117974657B (en) 2024-03-29 2024-03-29 Cable surface defect detection method based on computer vision

Country Status (1)

Country Link
CN (1) CN117974657B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444921A (en) * 2020-03-25 2020-07-24 浙江华睿科技有限公司 Scratch defect detection method and device, computing equipment and storage medium
CN116012357A (en) * 2023-02-09 2023-04-25 河南职业技术学院 Automobile circular trailer hole air line defect detection method based on machine vision

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003062809A1 (en) * 2002-01-23 2003-07-31 Marena Systems Corporation Infrared thermography for defect detection and analysis
CN109584239B (en) * 2018-12-13 2024-02-06 华南理工大学 High-light object surface defect detection system and method based on reflected light
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision
CN114842017B (en) * 2022-07-06 2022-09-27 济宁市海富电子科技有限公司 HDMI cable surface quality detection method and system
CN116385448B (en) * 2023-06-07 2023-08-25 深圳市华伟精密陶瓷有限公司 Alumina ceramic surface machining defect detection method based on machine vision
CN116503403B (en) * 2023-06-27 2023-09-01 无锡斯达新能源科技股份有限公司 Defect detection method of metal cutting tool bit based on image processing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444921A (en) * 2020-03-25 2020-07-24 浙江华睿科技有限公司 Scratch defect detection method and device, computing equipment and storage medium
CN116012357A (en) * 2023-02-09 2023-04-25 河南职业技术学院 Automobile circular trailer hole air line defect detection method based on machine vision

Also Published As

Publication number Publication date
CN117974657A (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN114862862B (en) Pump body cold shut defect identification method and system based on image processing
CN114049489B (en) Early warning method for breakage of optical fiber cable sheath
CN116740070B (en) Plastic pipeline appearance defect detection method based on machine vision
CN115345885A (en) Method for detecting appearance quality of metal fitness equipment
CN115311277B (en) Pit defect identification method for stainless steel product
CN116758061A (en) Casting surface defect detection method based on computer vision
CN117314912B (en) Visual detection method and system for welding defects on surface of welded pipe
CN117764986B (en) Titanium plate surface defect detection method based on image processing
CN115689948B (en) Image enhancement method for detecting cracks of building water supply pipeline
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN115631116B (en) Aircraft power inspection system based on binocular vision
CN116188468A (en) HDMI cable transmission letter sorting intelligent control system
CN117745715B (en) Large-caliber telescope lens defect detection method based on artificial intelligence
CN117745724B (en) Stone polishing processing defect region segmentation method based on visual analysis
CN117541582B (en) IGBT insulation quality detection method for high-frequency converter
CN104268845A (en) Self-adaptive double local reinforcement method of extreme-value temperature difference short wave infrared image
CN116664567B (en) Solid insulation switch cabinet quality assessment method and system
CN114298985A (en) Defect detection method, device, equipment and storage medium
CN117974657B (en) Cable surface defect detection method based on computer vision
CN111126371B (en) Coarse pointer dial reading method based on image processing
CN114998346A (en) Waterproof cloth quality data processing and identifying method
CN117173168B (en) OLED display screen quality detection method based on artificial intelligence
CN117952960B (en) Electric power iron tower part defect detection method based on artificial intelligence
CN117689637B (en) Visual detection method for processing quality of new energy battery hardware
CN117934456B (en) Packaging box printing quality detection method based on image processing

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