CN116309548B - Automatic defect detection system for valve sealing surface - Google Patents

Automatic defect detection system for valve sealing surface Download PDF

Info

Publication number
CN116309548B
CN116309548B CN202310524853.4A CN202310524853A CN116309548B CN 116309548 B CN116309548 B CN 116309548B CN 202310524853 A CN202310524853 A CN 202310524853A CN 116309548 B CN116309548 B CN 116309548B
Authority
CN
China
Prior art keywords
gradient
gradient amplitude
amplitude
region
sealing surface
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
CN202310524853.4A
Other languages
Chinese (zh)
Other versions
CN116309548A (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.)
Qingdao Elite Machinery Manufacture Co ltd
Original Assignee
Qingdao Elite Machinery Manufacture 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 Qingdao Elite Machinery Manufacture Co ltd filed Critical Qingdao Elite Machinery Manufacture Co ltd
Priority to CN202310524853.4A priority Critical patent/CN116309548B/en
Publication of CN116309548A publication Critical patent/CN116309548A/en
Application granted granted Critical
Publication of CN116309548B publication Critical patent/CN116309548B/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
    • 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/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E30/00Energy generation of nuclear origin
    • Y02E30/30Nuclear fission reactors

Abstract

The invention relates to the technical field of image processing, in particular to an automatic detection system for defects of a valve sealing surface. According to the scheme, the gradient amplitude image of the valve sealing surface is obtained, the gradient distribution probability function is obtained, and the gradient amplitude is subjected to preliminary screening according to the trend of the gradient distribution probability function to obtain the gradient set. And further obtaining a gradient connected domain index and illumination influence according to the regional distribution characteristics of the gradient amplitude and the overall size and connectivity analysis of regional distribution. And finally, obtaining an error influence index optimization canny edge detection operator by integrating the gradient probability, the gradient connected domain index and the illumination influence degree, obtaining a clearer and more accurate sealing edge, and realizing defect detection according to the shape characteristics of the sealing edge. According to the invention, through image analysis, a multi-index optimization canny edge detection operator is adopted to obtain more accurate sealing edges, so that more accurate defect detection is performed.

Description

Automatic defect detection system for valve sealing surface
Technical Field
The invention relates to the technical field of image processing, in particular to an automatic detection system for defects of a valve sealing surface.
Background
The valve is used as a common and very important sealing tool, is widely applied to water conservancy and other industries, is used as a control component for fluid transportation, and can easily produce various defects due to long-time contact with various fluids, and can directly influence the sealing performance of the valve when the sealing surface has defects, so that serious potential safety hazards are brought, and the quality detection of the sealing surface of the valve is particularly important.
When the existing detection of the valve sealing surface is mainly carried out on the sealing surface through machine vision, the traditional canny edge detection algorithm cannot be adopted to screen and extract the multi-edge characteristics of the valve sealing surface, and the valve sealing edge cannot be extracted accurately and clearly due to the influence of environmental factors, so that the defect condition of the valve sealing surface cannot be judged accurately.
Disclosure of Invention
In order to solve the technical problems that in the prior art, accurate and clear valve sealing edges cannot be extracted, and further the defect condition of a valve sealing surface cannot be accurately judged, the invention aims to provide an automatic valve sealing surface defect detection system, and the adopted technical scheme is as follows:
the invention provides an automatic detection system for defects of a valve sealing surface, which comprises the following components:
the data acquisition module is used for acquiring a valve sealing surface gray level image and a corresponding gradient amplitude image; acquiring a gradient amplitude probability function according to the distribution condition of gradient amplitudes in the gradient amplitude image, acquiring a gradient set according to the variation trend of the gradient amplitude probability function, and optionally selecting one gradient amplitude in the gradient set as a reference gradient amplitude;
the gradient analysis module is used for constructing a gradient amplitude region matrix according to all gradient amplitudes in the gradient set, and obtaining a gradient connected region index by referring to the sizes of the whole connected regions of the gradient amplitudes in the gradient amplitude region matrix; obtaining illumination influence according to the airtight connection condition of the connected areas in the gradient amplitude area matrix of the reference gradient amplitude;
the optimization detection module is used for obtaining error influence indexes according to the gradient amplitude probability, the gradient connected domain indexes and the illumination influence degree corresponding to the reference gradient amplitude in the gradient amplitude probability function, obtaining an optimization canny edge detection operator according to the error influence indexes corresponding to all gradient amplitudes in the gradient set, obtaining a sealing edge in the gray level image of the valve sealing surface by adopting the optimization canny edge detection operator, and obtaining a defect sealing surface according to the shape characteristics of the sealing edge.
Further, the method for acquiring the gradient amplitude probability function comprises the following steps:
and constructing adjacent gray level differential matrixes according to all gradient amplitude values in the gradient amplitude image, and obtaining a gradient amplitude probability function by adopting nonlinear least square fitting according to gradient amplitude probability corresponding to each gradient amplitude value in the adjacent gray level differential matrixes.
Further, the gradient set acquisition method comprises the following steps:
in the gradient amplitude probability function, screening out the corresponding gradient amplitude of the minimum value of the gradient amplitude probability to obtain an initial gradient set; and obtaining a gradient threshold value in the initial gradient set by adopting a maximum inter-class variance method, and forming the gradient set by using the gradient amplitude value larger than the gradient threshold value.
Further, the method for acquiring the gradient amplitude region matrix comprises the following steps:
taking the gradient amplitude values in the gradient set as rows, the region sizes as columns, and the number of regions corresponding to the gradient amplitude values and the region sizes as elements to form a gradient amplitude region matrix; the size of the regions is the size of the region corresponding to the gradient amplitude, and the number of the regions is the number of the regions corresponding to the size of each region.
Further, the method for acquiring the gradient connected domain index comprises the following steps:
in the gradient amplitude region matrix, adding the number of each region corresponding to the reference gradient amplitude with a preset adjustment coefficient to obtain a region communication coefficient;
multiplying the size of each region corresponding to the reference gradient amplitude by the region communicating coefficient to obtain a region communicating region size index, and adding the size indexes of all the region communicating regions corresponding to the reference gradient amplitude to obtain a gradient communicating region index.
Further, the method for obtaining the illumination influence degree comprises the following steps:
in the gradient amplitude region matrix, the number of regions with the size larger than a preset region threshold value corresponding to the reference gradient amplitude is used as the number of target regions; and taking the difference value between the number of all target areas and the coefficient of the preset range as an illumination coefficient, and adding all the illumination coefficients to obtain the illumination influence degree of the reference gradient amplitude.
Further, the method for acquiring the error impact index comprises the following steps:
and calculating the product of the probability of the gradient amplitude corresponding to the reference gradient amplitude, the gradient connected domain index and the illumination influence degree, and obtaining an error influence index.
Further, the method for obtaining the optimized canny edge detection operator comprises the following steps:
taking the gradient amplitude corresponding to the minimum value in all error influence indexes as a target gradient amplitude; and taking the minimum gradient amplitude value in the gradient set as a low threshold value of the optimized canny edge detection operator, and taking the maximum gradient amplitude value smaller than the target gradient amplitude value in the gradient set as a high threshold value of the optimized canny edge detection operator.
Further, the obtaining the defect sealing surface according to the shape characteristic of the sealing edge comprises:
and acquiring the circularity of the sealing edge as a shape index, and recording the sealing edge corresponding to the valve sealing surface as a defect sealing surface when the shape index is smaller than a preset shape threshold.
The invention has the following beneficial effects:
according to the invention, the gradient amplitude image of the valve sealing surface is obtained, the gradient distribution probability function is obtained, the gradient amplitude is subjected to preliminary screening according to the trend of the gradient distribution probability function to obtain the gradient set, and screening is firstly carried out according to the gradient amplitude distribution and the size characteristics of the sealing edge, so that subsequent analysis and calculation are quicker and more accurate, and the range of the edge gradient amplitude is reduced. According to the regional distribution characteristics of the gradient amplitude values, the gradient connected domain indexes and the illumination influence degree are obtained according to the overall size and connectivity analysis of regional distribution, and various indexes are obtained by analyzing the connectivity condition of the gradient amplitude values and combining the position and the illumination influence, so that the subsequent gradient amplitude values are screened more accurately. Finally, the gradient probability, the gradient connected domain index and the illumination influence degree are integrated to obtain an error influence index optimization canny edge detection operator, a clearer and more accurate sealing edge is obtained, the defect condition detection of the sealing surface is carried out, the detection result is enabled to exclude the interference of multiple edge lines, a clearer and more accurate strong edge line is obtained, and the defect detection reliability is higher.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of an automatic detection system for defects of a sealing surface of a valve according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a valve sealing surface in a cross-sectional orientation according to one 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 detailed description refers to specific implementation, structure, characteristics and effects of an automatic detection system for valve sealing surface defects according to the invention, which is provided by the invention, with reference to the accompanying drawings and preferred embodiments. 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 automatic detection system for the defects of the sealing surface of the valve provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a structural diagram of an automatic detection system for defects of a valve sealing surface according to an embodiment of the present invention is shown, where the automatic detection system for defects of a valve sealing surface includes: the data acquisition module 101, the gradient analysis module 102 and the optimization detection module 103.
The data acquisition module 101 is used for acquiring a valve sealing surface gray level image and a corresponding gradient amplitude image; obtaining a gradient amplitude probability function according to the distribution condition of gradient amplitude in the gradient amplitude image, obtaining a gradient set according to the change trend of the gradient amplitude probability function, and optionally selecting one gradient amplitude in the gradient set as a reference gradient amplitude.
The valve sealing surface is a connecting surface positioned at the junction of the valve clack and the valve seat, the corrosion defect condition of the sealing edge can be seen through analyzing the valve sealing surface in the cross section direction, and the quality of the sealing surface is judged. However, there are many other edges in the sealing surface of the valve, so that the obtaining of the sealing edge is difficult, the obtained result is inaccurate, and the tightness of the sealing surface is difficult to accurately judge. According to the invention, through analyzing the sealing surface of each valve, the accurate acquisition of the sealing edge is realized by adaptively optimizing the double threshold values of the canny operator, so that the defect can be conveniently identified.
Image acquisition of cross-sectional orientation of valve sealing surfaces referring to fig. 2, a schematic diagram of a cross-sectional orientation of a valve sealing surface according to an embodiment of the present invention is shown. In the embodiment of the invention, a CCD camera is adopted to shoot and acquire the valve sealing surface image in the cross section direction in a overlooking mode, the valve sealing surface image at the moment is an RGB image, and the valve sealing surface image is preprocessed and grayed to obtain the valve sealing surface gray image. It should be noted that, the method of shooting with a CCD camera, preprocessing an image, and graying is a technical means well known to those skilled in the art, and will not be described herein.
When gradient information of pixel points in an image needs to be acquired, in the embodiment of the invention, a Sobel operator is selected and an upward rounding mode is adopted to obtain the gradient amplitude of each pixel point in the image, then non-maximum suppression is carried out, a gradient amplitude image corresponding to a valve sealing surface gray level image is constructed according to the suppressed gradient amplitude of the reserved pixel point, and it is noted that the non-maximum suppression method and the Sobel operator are both step methods in canny edge detection, and the step methods and the upward rounding method are all technical means well known to those skilled in the art and are not repeated herein.
The gradient change of the edge pixel points in the image can be further reflected through the gradient amplitude image, the edge information can be conveniently extracted, and the edge detection operator is optimized through gradient amplitude analysis. The invention discloses a method for acquiring a gradient amplitude probability function, which comprises the following steps of:
preferably, an adjacent gray scale differential matrix is constructed according to all gradient amplitudes in the gradient amplitude image, in the adjacent gray scale differential matrix, a first column of the matrix represents the gradient amplitude, a second column represents the frequency of occurrence of the corresponding gradient amplitude in the gradient amplitude image, a third column represents the probability of occurrence of the corresponding gradient amplitude in the gradient amplitude image, and a fourth column represents an accumulated value of average difference of the corresponding gradient amplitude in the gradient amplitude image from the gradient amplitude in the eight neighborhood range. It should be noted that, the composition of the adjacent gray differential matrix is a technical means well known to those skilled in the art, and will not be described herein.
According to the gradient magnitude probability method, the probability problem of gradient magnitude is mainly considered through the adjacent gray level differential matrix, so that according to the gradient magnitude probability corresponding to each gradient magnitude in the adjacent gray level differential matrix, in order to more clearly combine the gradient probability with the gradient magnitude, more accordant edge gradient magnitudes are screened out, a nonlinear least square fitting method is adopted to obtain a gradient magnitude probability function, the correlation between the gradient magnitude and the gradient probability in a gradient magnitude image can be reflected through the gradient magnitude probability function, and the gradient set is obtained by screening in advance according to the characteristic of smaller gradient probability. It should be noted that the nonlinear least square fitting is a technical means well known to those skilled in the art, and will not be described herein.
Preferably, in the gradient magnitude function, the corresponding gradient magnitude of the gradient magnitude probability minimum value is screened out to obtain an initial gradient set, and the gradient magnitude meeting the edge characteristic, namely, the gradient magnitude corresponding to the gradient magnitude probability smaller is obtained through the initial gradient set, and is screened out in advance, wherein the edge represented by the gradient magnitude in the initial gradient set is more likely to be an internal edge.
Further, a gradient threshold value in the initial gradient set is obtained by adopting a maximum inter-class variance method, gradient amplitude values larger than the gradient threshold value form the gradient set, a clearer edge can be corresponding to the gradient amplitude value, namely the larger gradient amplitude value, through screening the gradient amplitude value in the initial gradient set, the gradient amplitude value in the obtained gradient set is more likely to be corresponding to a clear inner edge, and is more likely to be a sealing edge.
The gradient set can be further analyzed according to the condition of the connected areas of the gradient set, so that the gradient amplitude after each preliminary screening is conveniently analyzed, one gradient amplitude in the gradient set is selected as a reference gradient amplitude, and the subsequent analysis and description are convenient.
The gradient analysis module 102 is configured to construct a gradient amplitude region matrix according to all gradient amplitudes in the gradient set, and obtain a gradient connected domain index by referring to the sizes of the whole connected domains of the gradient amplitudes in the gradient amplitude region matrix; and obtaining illumination influence according to the airtight connection condition of the connected areas in the gradient amplitude area matrix of the reference gradient amplitude.
Because the sealing edge in the sealing surface belongs to the innermost edge, the gradient amplitude of the sealing edge relative to other edges is smaller than that of the communicating region, and because in an actual scene, the sealing edge of the sealing surface belongs to the sealing joint part of the valve clack and the valve seat and belongs to the inner concave region, the influence of illumination is smaller in theory, and the communicating condition of the communicating region is more airtight and complete. Therefore, the invention adopts the condition of the connected areas of the gradient amplitude values for analysis, firstly constructs a gradient amplitude value area matrix, and can better reflect the condition of the connected areas of the gradient amplitude values according to the gradient amplitude value area matrix, and the construction of the specific gradient amplitude value area matrix is as follows:
taking gradient amplitude values in a gradient set as rows, taking the area size as columns, taking the number of areas corresponding to the gradient amplitude values and the area size as elements to form a gradient amplitude value area matrix, wherein in the embodiment of the invention, the specific expression of the gradient amplitude value area matrix is as follows;
where A is represented as a gradient magnitude region matrix, t is represented as a gradient magnitude, s is represented as a region size,expressed as the number of regions corresponding to the size of the s-th region at the t-th gradient magnitude, +.>Expressed as the number of regions corresponding to the first region size at the first gradient magnitude, +.>Expressed as the number of regions corresponding to the region size s at the first gradient magnitude, +.>Expressed as the number of regions corresponding to the first region size at the gradient magnitude t. It should be noted that, the method for constructing the matrix of the gradient amplitude region matrix is a technical method well known to those skilled in the art, and will not be described herein.
The reference gradient amplitude is in the gradient amplitude area matrix, namely, the gradient amplitude corresponding to one row in the optional gradient amplitude area matrix is used as the reference gradient amplitude, the possibility that the edge corresponding to the reference gradient amplitude is a sealing edge can be judged through the reference gradient amplitude, the gradient connected domain index is firstly obtained according to the whole connected domain size of the reference gradient amplitude in the gradient amplitude area matrix, the possibility that the reference gradient amplitude is the corresponding sealing edge is reflected through the connected domain index, and the specific gradient connected domain obtaining method comprises the following steps:
in the gradient amplitude region matrix, the number of the reference gradient amplitude corresponding to each region is added with a preset adjustment coefficient to obtain a region communication coefficient, the region communication coefficient can reflect certain position characteristics of the reference gradient amplitude from the number of the regions, and when the number of the regions is smaller, the better the connectivity of the corresponding gradient amplitude is, and the corresponding edge is the edge which is closer to the inner ring.
Further multiplying the size of each region corresponding to the reference gradient amplitude by the region communication coefficient to obtain a region communication region size index, wherein the connectivity condition corresponding to each region size can be reflected through the region communication region size index, and the smaller the region communication region size index, the better the communication condition corresponding to the single region size is, and the more likely the corresponding sealing edge is. And adding the size indexes of the connected domains of all the areas corresponding to the reference gradient amplitude to obtain gradient connected domain indexes, reflecting the connectivity condition of the whole area corresponding to the reference gradient amplitude through the gradient connected domain indexes, and indicating that the edge position corresponding to the reference gradient amplitude is closer to the inner edge when the whole connectivity is smaller, namely the gradient connected domain indexes are smaller. In the embodiment of the invention, for convenience of subsequent calculation, the specific expression of the gradient connected domain index is as follows:
wherein, C (v) is represented as a gradient connected domain index of a reference gradient amplitude v, l is represented as a region size, D (v, l) is represented as the number of regions corresponding to the region size l under the reference gradient amplitude v, s is represented as the total number of the region sizes, epsilon is represented as a preset adjustment coefficient, and is set to 1 in the embodiment of the invention.
Wherein D (v, l) +ε is expressed as a region-connectivity coefficient,the size index of the region connected domain is expressed, when the size of the corresponding region is smaller, the number of the regions is smaller, and the connectivity of the edges corresponding to the reference gradient amplitude is better, the gradient connected domain index is smaller.
Further, considering the characteristic that the position of the sealing edge is slightly influenced by the illumination degree, the illumination influence degree is obtained by analyzing the communication condition of the larger area in the area size, and the specific acquisition method of the illumination influence degree comprises the following steps:
and in the gradient amplitude region matrix, taking the number of regions with the size larger than a preset region threshold value corresponding to the reference gradient amplitude as the number of target regions, and forming a target region set. In the embodiment of the invention, the preset region threshold is 5, that is, the number of regions corresponding to the region size larger than 5 is used as the number of target regions, at this time, the number of target regions reflects the communication condition of illumination influence, and when the edge is greatly influenced by illumination, the region size of the edge corresponding to the gradient amplitude is further divided, and the number of target regions is increased.
Taking the difference value between the number of each target region in the target region set and the coefficient of the preset range as an illumination coefficient, and adding all the illumination coefficients to obtain the illumination influence degree of the reference gradient amplitude. In the embodiment of the invention, the specific expression of the illumination influence degree is given by considering the accuracy of subsequent calculation:
where X (v) is expressed as the illumination influence of the reference gradient amplitude v, l is expressed as the number of the first target region in the set of target regions,the number of areas denoted as the first number of target areas, m denotes the total number of target areas in the set of target areas, β denotes a preset range coefficient, and in the embodiment of the present invention, is set to 0.5, and the specific numerical value implementation can be adjusted according to the specific implementation.
Wherein the method comprises the steps ofThe illumination coefficient is expressed, when the illumination coefficient is larger, the fact that the corresponding edge of the reference gradient amplitude is influenced by illumination is larger, and various connection conditions can occur, so that the more unlikely the corresponding edge is a sealing edge, the greater the illumination influence is. When the degree of influence of the light is smaller,the less the corresponding edge of the reference gradient magnitude is affected by the light, the more likely the corresponding edge is a sealed edge at this time.
So far, through analyzing the connectivity condition of the region corresponding to the gradient amplitude, the gradient connectivity region index and the illumination influence degree are obtained through the position of the gradient amplitude and the influence of the illumination on the connectivity.
The optimization detection module 103 is configured to obtain an error influence index according to the gradient amplitude probability, the gradient connected domain index and the illumination influence degree corresponding to the reference gradient amplitude in the gradient amplitude probability function, obtain an optimized canny edge detection operator according to the error influence indexes corresponding to all gradient amplitudes in the gradient set, obtain a sealing edge in the gray level image of the valve sealing surface by adopting the optimized canny edge detection operator, and obtain the defect sealing surface according to the shape characteristics of the sealing edge.
According to the characteristics of the gradient amplitude, the data acquisition module 101 and the gradient analysis module 102 can fully analyze the edge condition in the sealing surface, and the characteristics of larger gradient amplitude and less distribution of the sealing edge, the position of the sealing edge and the illumination influence various analysis results are synthesized to obtain an error influence index.
The condition of the edge corresponding to the gradient amplitude can be reflected through the error influence index, and the gradient amplitude closest to the sealing edge is screened out, so that the error influence index is obtained by the following steps: firstly, gradient amplitude probability corresponding to a reference amplitude is obtained according to a gradient amplitude probability function obtained in the data obtaining module 101, the distribution condition of the gradient amplitude is intuitively reflected through the gradient amplitude probability, and the product of the gradient amplitude probability corresponding to the reference gradient amplitude, the gradient connected domain index and the illumination influence degree is calculated to obtain an error influence index. In the embodiment of the invention, the specific expression of the error influence index is as follows:
wherein U (v) is expressed as an error influence index of the reference gradient amplitude v, X (v) is expressed as illumination influence degree of the reference gradient amplitude v, C (v) is expressed as a gradient connected domain index of the reference gradient amplitude v, and P (v) is expressed as gradient amplitude probability of the reference gradient amplitude v.
And (3) performing comprehensive analysis in a multiplication mode, when the illumination influence degree, the gradient connected domain index and the gradient amplitude probability of the reference gradient amplitude are smaller, the distribution condition of the gradient amplitude accords with the sealing edge, the illumination influence condition is smaller, the connectivity is smaller, the corresponding position accords with the sealing edge, and therefore the error influence index is smaller, and the corresponding edge of the reference gradient amplitude is more likely to be the sealing edge.
According to the method for obtaining the error influence indexes by the reference gradient amplitude values, the error influence indexes of all gradient amplitude values in the gradient set are obtained, the gradient amplitude value corresponding to the minimum value in all the error influence indexes is taken as the target gradient amplitude value, and the edge corresponding to the target gradient amplitude value is the gradient amplitude value which is the most in line with the sealing edge at the moment, so that the threshold value of the canny edge detection operator can be determined according to the target gradient amplitude value, and the sealing edge strong edge capable of being analyzed is obtained.
In the embodiment of the invention, the minimum gradient amplitude in the gradient set is used as the low threshold of the canny edge detection operator, because the gradient set is the gradient amplitude after preliminary screening, the minimum gradient amplitude at this time is ensured to obtain the complete strong edge as far as possible. The maximum gradient amplitude value in the gradient set, which is smaller than the target gradient amplitude value, is used as the high threshold value of the canny edge detection operator, and the target gradient amplitude value at the moment is the gradient amplitude value closest to the sealing edge, because the gradient amplitude value which is closest to the target gradient amplitude value and smaller than the target gradient amplitude value is selected as the high threshold value in order to ensure that the sealing edge can be screened out, and the optimized canny edge detection operator can be obtained through the self-adaptive setting of double threshold values. It should be noted that the canny edge detection operator is a technical means well known to those skilled in the art, and specific step methods are not described herein.
The sealing edge in the gray level image of the sealing surface of the valve can be obtained by adopting an optimized canny edge operator, at the moment, the edge obtained according to the optimized edge detection operator is a clear and accurate sealing edge, and the edge image obtained by adjusting the double threshold is an edge image which only comprises the sealing edge and is extracted, so that the defect condition can be further obtained according to the shape characteristics of the sealing edge.
In the embodiment of the invention, the degree of circularity of the sealing edge is obtained as the shape index, the regular condition of the sealing edge can be reflected by the degree of circularity, the normal sealing edge is regular circular, and when corrosion deformation and the like occur on the sealing edge, the degree of circularity is poor, so that the defect condition is judged by the shape index and the degree of circularity. When the shape index is smaller than the preset shape threshold, the deformation degree of the sealing edge is larger, the corresponding sealing surface cannot meet the sealing requirement, and the sealing edge corresponding to the valve sealing surface is marked as a defect sealing surface. In the embodiment of the invention, the preset shape threshold is 0.95, and the practitioner can adjust according to specific implementation conditions.
In summary, the gradient amplitude image of the valve sealing surface is obtained, the gradient distribution probability function is obtained, the gradient amplitude is primarily screened through the trend of the gradient distribution probability function to obtain the gradient set, and firstly, screening is carried out according to the gradient amplitude distribution and the size characteristics of the sealing edge, so that subsequent analysis and calculation are quicker and more accurate, and the range of the edge gradient amplitude is reduced. According to the regional distribution characteristics of the gradient amplitude values, the gradient connected domain indexes and the illumination influence degree are obtained according to the overall size and connectivity analysis of regional distribution, and various indexes are obtained by analyzing the connectivity condition of the gradient amplitude values and combining the position and the illumination influence, so that the subsequent gradient amplitude values are screened more accurately. Finally, the gradient probability, the gradient connected domain index and the illumination influence degree are integrated to obtain an error influence index optimization canny edge detection operator, a clearer and more accurate sealing edge is obtained, the defect condition detection of the sealing surface is carried out, the detection result is enabled to exclude the interference of multiple edge lines, a clearer and more accurate strong edge line is obtained, and the defect detection reliability is higher. According to the invention, through image analysis, a multi-index optimization canny edge detection operator is adopted to obtain more accurate sealing edges, so that more accurate defect detection is performed.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (9)

1. An automatic valve seal face defect detection system, the system comprising:
the data acquisition module is used for acquiring a valve sealing surface gray level image and a corresponding gradient amplitude image; acquiring a gradient amplitude probability function according to the distribution condition of gradient amplitudes in the gradient amplitude image, acquiring a gradient set according to the variation trend of the gradient amplitude probability function, and optionally selecting one gradient amplitude in the gradient set as a reference gradient amplitude;
the gradient analysis module is used for constructing a gradient amplitude region matrix according to all gradient amplitudes in the gradient set, and obtaining a gradient connected region index by referring to the sizes of the whole connected regions of the gradient amplitudes in the gradient amplitude region matrix; obtaining illumination influence according to the airtight connection condition of the connected areas in the gradient amplitude area matrix of the reference gradient amplitude;
the optimization detection module is used for obtaining error influence indexes according to the gradient amplitude probability, the gradient connected domain indexes and the illumination influence degree corresponding to the reference gradient amplitude in the gradient amplitude probability function, obtaining an optimization canny edge detection operator according to the error influence indexes corresponding to all gradient amplitudes in the gradient set, obtaining a sealing edge in the gray level image of the valve sealing surface by adopting the optimization canny edge detection operator, and obtaining a defect sealing surface according to the shape characteristics of the sealing edge.
2. The automatic detection system for defects of a valve sealing surface according to claim 1, wherein the method for obtaining the gradient amplitude probability function comprises the steps of:
and constructing adjacent gray level differential matrixes according to all gradient amplitude values in the gradient amplitude image, and obtaining a gradient amplitude probability function by adopting nonlinear least square fitting according to gradient amplitude probability corresponding to each gradient amplitude value in the adjacent gray level differential matrixes.
3. The automatic detection system for defects of a sealing surface of a valve according to claim 1, wherein the method for acquiring the gradient set comprises:
in the gradient amplitude probability function, screening out the corresponding gradient amplitude of the minimum value of the gradient amplitude probability to obtain an initial gradient set; and obtaining a gradient threshold value in the initial gradient set by adopting a maximum inter-class variance method, and forming the gradient set by using the gradient amplitude value larger than the gradient threshold value.
4. The automatic detection system for defects of a valve sealing surface according to claim 1, wherein the method for acquiring the gradient amplitude area matrix comprises the following steps:
taking the gradient amplitude values in the gradient set as rows, the region sizes as columns, and the number of regions corresponding to the gradient amplitude values and the region sizes as elements to form a gradient amplitude region matrix; the size of the regions is the size of the region corresponding to the gradient amplitude, and the number of the regions is the number of the regions corresponding to the size of each region.
5. The automatic detection system for defects of a valve sealing surface according to claim 4, wherein the method for acquiring the gradient connected domain index comprises the following steps:
in the gradient amplitude region matrix, adding the number of each region corresponding to the reference gradient amplitude with a preset adjustment coefficient to obtain a region communication coefficient;
multiplying the size of each region corresponding to the reference gradient amplitude by the region communicating coefficient to obtain a region communicating region size index, and adding the size indexes of all the region communicating regions corresponding to the reference gradient amplitude to obtain a gradient communicating region index.
6. The automatic detection system for defects of a sealing surface of a valve according to claim 4, wherein the method for obtaining the illumination influence comprises:
in the gradient amplitude region matrix, the number of regions with the size larger than a preset region threshold value corresponding to the reference gradient amplitude is used as the number of target regions; and taking the difference value between the number of all target areas and the coefficient of the preset range as an illumination coefficient, and adding all the illumination coefficients to obtain the illumination influence degree of the reference gradient amplitude.
7. The automatic valve sealing surface defect detection system according to claim 1, wherein the error impact index obtaining method comprises:
and calculating the product of the probability of the gradient amplitude corresponding to the reference gradient amplitude, the gradient connected domain index and the illumination influence degree, and obtaining an error influence index.
8. The automatic detection system for defects of a sealing surface of a valve according to claim 1, wherein the method for obtaining the optimized canny edge detection operator comprises the following steps:
taking the gradient amplitude corresponding to the minimum value in all error influence indexes as a target gradient amplitude; and taking the minimum gradient amplitude value in the gradient set as a low threshold value of the optimized canny edge detection operator, and taking the maximum gradient amplitude value smaller than the target gradient amplitude value in the gradient set as a high threshold value of the optimized canny edge detection operator.
9. An automatic valve seal face defect detection system according to claim 1, wherein said obtaining a defective seal face based on shape characteristics of a seal edge comprises:
and acquiring the circularity of the sealing edge as a shape index, and recording the sealing edge corresponding to the valve sealing surface as a defect sealing surface when the shape index is smaller than a preset shape threshold.
CN202310524853.4A 2023-05-11 2023-05-11 Automatic defect detection system for valve sealing surface Active CN116309548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310524853.4A CN116309548B (en) 2023-05-11 2023-05-11 Automatic defect detection system for valve sealing surface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310524853.4A CN116309548B (en) 2023-05-11 2023-05-11 Automatic defect detection system for valve sealing surface

Publications (2)

Publication Number Publication Date
CN116309548A CN116309548A (en) 2023-06-23
CN116309548B true CN116309548B (en) 2023-08-04

Family

ID=86792825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310524853.4A Active CN116309548B (en) 2023-05-11 2023-05-11 Automatic defect detection system for valve sealing surface

Country Status (1)

Country Link
CN (1) CN116309548B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117218122B (en) * 2023-11-09 2024-03-29 深圳市金三维实业有限公司 Watch shell quality detection method based on image data
CN117291907B (en) * 2023-11-22 2024-01-30 百强阀门集团有限公司 Valve sealing surface detection method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000088765A (en) * 1998-09-08 2000-03-31 Daihatsu Motor Co Ltd Inspection apparatus for flaw on plane
CN111044522A (en) * 2019-12-14 2020-04-21 中国科学院深圳先进技术研究院 Defect detection method and device and terminal equipment
CN211262637U (en) * 2020-03-07 2020-08-14 青岛诺安机电科技有限公司 Test system for detection equipment in pipeline
CN114841997A (en) * 2022-06-30 2022-08-02 启东市群鹤机械设备有限公司 Method for detecting surface defects of sealing surface of valve base
CN116030034A (en) * 2023-02-21 2023-04-28 青岛精锐机械制造有限公司 Visual identification method for valve surface defects

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000088765A (en) * 1998-09-08 2000-03-31 Daihatsu Motor Co Ltd Inspection apparatus for flaw on plane
CN111044522A (en) * 2019-12-14 2020-04-21 中国科学院深圳先进技术研究院 Defect detection method and device and terminal equipment
CN211262637U (en) * 2020-03-07 2020-08-14 青岛诺安机电科技有限公司 Test system for detection equipment in pipeline
CN114841997A (en) * 2022-06-30 2022-08-02 启东市群鹤机械设备有限公司 Method for detecting surface defects of sealing surface of valve base
CN116030034A (en) * 2023-02-21 2023-04-28 青岛精锐机械制造有限公司 Visual identification method for valve surface defects

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自适应多窗口梯度幅值边缘检测算法;刘勇;姚刚;肖人彬;雷帮军;;华中科技大学学报(自然科学版)(01);全文 *

Also Published As

Publication number Publication date
CN116309548A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN116309548B (en) Automatic defect detection system for valve sealing surface
CN102436652B (en) Automatic registering method of multisource remote sensing images
US8391585B2 (en) Defect detecting device, defect detecting method, image sensor device, image sensor module, defect detecting program, and computer-readable recording medium
CN111080582B (en) Method for detecting defects of inner and outer surfaces of workpiece
CN116703910B (en) Intelligent detection method for quality of concrete prefabricated bottom plate
CN115619793B (en) Power adapter appearance quality detection method based on computer vision
CN102279973A (en) Sea-sky-line detection method based on high gradient key points
CN116309559B (en) Intelligent identification method for production flaws of medium borosilicate glass
CN105095896A (en) Image distortion correction method based on look-up table
CN112465743B (en) Periodic structure quality detection method
CN110130987B (en) Tunnel convergence deformation monitoring method based on image analysis
CN113514054A (en) Star sensor star point image spot detection method and system
CN105787950A (en) Infrared image sea-sky-line detection algorithm based on line gradient accumulation
CN114549441A (en) Sucker defect detection method based on image processing
CN113538378A (en) Bearing size online detection system based on deep learning
CN109949725A (en) A kind of AOI system image grayscale standardized method and system
CN114708226A (en) Copper pipe inner wall crack detection method based on illumination influence
CN117314912A (en) Visual detection method and system for welding defects on surface of welded pipe
CN109410259B (en) Structured binocular depth map up-sampling method based on confidence
CN110740314A (en) Method and system for correcting defective pixel of color line array camera
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN117011291B (en) Watch shell quality visual detection method
CN116958514B (en) Sub-pixel positioning method for shock wave position of optical image
CN1323545C (en) Method for determining automatic detection threshold of bad pixel of medical image
CN110084786B (en) Automatic defect identification method for digital X-ray image with gradually-changed background

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