CN116883408B - Integrating instrument shell defect detection method based on artificial intelligence - Google Patents

Integrating instrument shell defect detection method based on artificial intelligence Download PDF

Info

Publication number
CN116883408B
CN116883408B CN202311152395.2A CN202311152395A CN116883408B CN 116883408 B CN116883408 B CN 116883408B CN 202311152395 A CN202311152395 A CN 202311152395A CN 116883408 B CN116883408 B CN 116883408B
Authority
CN
China
Prior art keywords
target
area
gray
mutation
defect area
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
CN202311152395.2A
Other languages
Chinese (zh)
Other versions
CN116883408A (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.)
Weihai Kunke Flow Meter Co ltd
Original Assignee
Weihai Kunke Flow Meter 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 Weihai Kunke Flow Meter Co ltd filed Critical Weihai Kunke Flow Meter Co ltd
Priority to CN202311152395.2A priority Critical patent/CN116883408B/en
Publication of CN116883408A publication Critical patent/CN116883408A/en
Application granted granted Critical
Publication of CN116883408B publication Critical patent/CN116883408B/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/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the field of image analysis, in particular to an integrating instrument shell defect detection method based on artificial intelligence. The method comprises the following steps: acquiring a gray level image of the surface of the integrating instrument shell, performing threshold segmentation on the gray level image to acquire a suspected defect area, acquiring roughness according to texture features of the suspected defect area, and acquiring the number of edge lines in the suspected defect area; based on Hough circle detection, a concave area is obtained, abrupt change conditions of gray values of pixel points in the concave area are analyzed according to pixel columns, surface deformation degree of a target area formed by the pixel columns is obtained, ageing significant coefficients of suspected defect areas in the target area are obtained according to roughness, the number of edge lines and the surface deformation degree, and ageing defects of an integrator shell are detected according to the ageing significant coefficients. The invention can accurately identify the difference between the ageing defect and the non-ageing defect of the integrating instrument shell, and improves the accuracy of detecting the ageing defect of the integrating instrument shell.

Description

Integrating instrument shell defect detection method based on artificial intelligence
Technical Field
The invention relates to the field of image analysis, in particular to an integrating instrument shell defect detection method based on artificial intelligence.
Background
The integrating instrument is an important secondary instrument in engineering application, and is mainly used for calculating signals sent by the primary instrument. The material of the casing of the integrating instrument is usually engineering plastic, and the engineering plastic usually has defects of scratch, aging and the like. The ageing is an unavoidable defect of engineering plastics in the long-time use process, and the appearance and durability of the integrating instrument can be affected by the defect of ageing on the shell of the integrating instrument, so that the timely and accurate detection of whether the ageing defect occurs on the shell of the integrating instrument has great significance for later maintenance.
In the prior art, the ageing defect of the surface of the object to be detected is usually detected by using a machine vision technology such as image segmentation, and as the ageing defect exists in the integrating instrument shell, other non-ageing defects such as scratches exist, when the integrating instrument shell is detected by using the existing machine vision technology, the distinction between the ageing defect and the non-ageing defect cannot be accurately identified, and the accuracy of detecting the ageing defect of the integrating instrument shell is reduced.
Disclosure of Invention
In order to solve the technical problem that when the existing machine vision technology is used for detecting the integrating instrument shell, the difference between the ageing defect and the non-ageing defect cannot be accurately identified, and the accuracy of detecting the ageing defect of the integrating instrument shell is reduced, the invention aims to provide an artificial intelligence-based integrating instrument shell defect detection method, which adopts the following technical scheme:
the invention provides an artificial intelligence-based integrating instrument shell defect detection method, which comprises the following steps:
acquiring a gray level image of the surface of the integrating instrument shell;
threshold segmentation is carried out on the gray level image to obtain a suspected defect area; obtaining roughness of the suspected defect area according to the texture characteristics of the suspected defect area; performing edge detection on the gray level image to obtain the number of edge lines in the suspected defect area;
acquiring a concave region of the gray image according to gray distribution of pixel points in the gray image; forming any column of pixel points of the concave area into a target pixel column; dividing subintervals according to gray level distribution of pixel points in each target pixel column to obtain mutation intervals and mutation interval serial numbers; taking a region which is formed by continuous target pixel columns and has mutation regions as a target region, and obtaining the surface deformation degree of the target region according to the distribution of the mutation region serial numbers of the target pixel columns in the target region and the distribution of the pixel point gray values in the mutation regions;
taking the suspected defect area in the target area as a target defect area, and obtaining an aging significant coefficient of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area;
and detecting the ageing defect of the integrating instrument shell according to the ageing significant coefficient.
Further, the threshold segmentation of the gray-scale image to obtain a suspected defect region includes:
based on an Ojin threshold segmentation algorithm, acquiring an optimal segmentation threshold according to gray values of all pixel points in a gray image, and taking the pixel points with gray values larger than the optimal segmentation threshold as suspected defect pixel points;
carrying out connected domain analysis on the suspected defective pixel points to obtain a connected region; and taking the connected region as a suspected defect region.
Further, the obtaining the roughness of the suspected defect area according to the texture feature of the suspected defect area includes:
obtaining a neighborhood gray level difference matrix of pixel points in the suspected defect area;
and performing roughness calculation on the neighborhood gray level difference matrix based on a roughness calculation formula to obtain the roughness of the suspected defect area.
Further, the obtaining the number of edge lines in the suspected defect area by performing edge detection on the gray image includes:
performing edge detection on the gray level image to obtain an edge line in the gray level image;
and counting the number of edge lines in each suspected defect area according to the edge lines in the gray level image.
Further, the acquiring the concave region of the gray image according to the gray distribution of the pixel points in the gray image includes:
carrying out Hough circle detection on the gray level image according to the gray level value of the pixel point to obtain a round edge line in the gray level image;
and taking the area surrounded by the round edge lines as a concave area in the gray level image.
Further, the dividing the subinterval according to the gray scale distribution of the pixel points in each target pixel column to obtain a mutation interval and a mutation interval sequence number includes:
constructing a coordinate system of the gray image, wherein the horizontal axis direction of the coordinate system is the horizontal direction of the gray image, the vertical axis direction of the coordinate system is the vertical direction of the coordinate system, the origin of the coordinate system is a pixel point at the upper left corner of the gray image, and a subinterval with a preset length is uniformly divided between the maximum vertical coordinate and the minimum vertical coordinate of the pixel point in the target pixel column;
numbering the divided subintervals according to the sequence of non-zero natural numbers, and obtaining the subinterval sequence number corresponding to each subinterval;
and obtaining a mutation interval and a mutation interval sequence number according to the distribution of the pixel point gray values in the subinterval.
Further, the obtaining the mutation interval and the mutation interval sequence number according to the distribution of the pixel point gray values in the subinterval includes:
taking the extreme difference of the gray value of the pixel point in each subinterval of each target pixel column as the gray extreme difference of each subinterval;
and obtaining the maximum value of the gray level range, taking the subinterval corresponding to the maximum value of the gray level range larger than a preset first threshold value as a mutation interval of the target pixel column, and taking the subinterval serial number corresponding to the subinterval as the mutation interval serial number.
Further, the obtaining the surface deformation degree of the target area according to the distribution of the mutation interval serial numbers of the target pixel columns in the target area and the distribution of the pixel point gray values in the mutation interval includes:
taking the variance of the sequence numbers of the mutation intervals of all the target pixel columns in the target area as sequence number confusion;
taking the extremely poor gray value of the pixel points in the mutation interval in each target pixel column as the mutation degree of each target pixel column; taking the average value of the mutation degrees of all the target pixel columns in the target area as the whole mutation degree;
obtaining initial deformation degree of the target area, wherein the initial deformation degree is in negative correlation with the sequence number confusion degree, the initial deformation degree is in positive correlation with the integral mutation degree, and normalizing the initial deformation degree to obtain the surface deformation degree of the target area.
Further, the obtaining the aging significant coefficient of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformability of the target area includes:
and carrying out normalization processing on the product value of the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area to obtain the aging significant coefficient of the target defect area.
Further, the detecting the ageing defect of the integrator housing according to the ageing significant coefficient includes:
and taking the target defect area with the aging significant coefficient larger than a preset significant threshold value as the aging defect area of the integrating instrument shell.
The invention has the following beneficial effects:
according to the invention, the situation that the surface color of the shell becomes light due to the aging of the shell of the integrating instrument is considered, so that the gray level image is firstly subjected to threshold segmentation, the suspected defect area is initially extracted, and the situation that the texture of the gray level image is coarser and finer cracks appear due to the aging of the shell is considered, so that whether the gray level image is an aging defect area can be further judged in the follow-up process by acquiring the roughness of the suspected defect area and the number of edge lines; considering that the surface of the shell is recessed due to aging, a possible recessed area in the gray level image is firstly obtained, and as the gray level value of the pixel points in the recessed area in the gray level image has obvious mutation compared with that in the non-recessed area, analysis is carried out according to the pixel columns, sub-interval division is carried out on the target pixel columns to obtain mutation intervals and mutation interval serial numbers of the target pixel columns, the possibility of the occurrence of the recess in the target area is further reflected through the obtained surface deformation degree, and the characteristic of the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area, which are possessed by the shell aging, are combined to obtain an aging significant coefficient, so that the possibility that the target defect area is the aging defect area can be evaluated and analyzed, and the accuracy of the subsequent detection of the aging defect of the shell of the integrator is improved.
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 flow chart of an artificial intelligence based integrator casing defect detection method according to an 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 is given below of a method for detecting defects of an integrator casing based on artificial intelligence according to the invention, and the detailed description of the specific implementation, structure, characteristics and effects thereof is given below. 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.
Integrating instrument shell defect detection method embodiment based on artificial intelligence:
the following specifically describes a specific scheme of the integrating instrument shell defect detection method based on artificial intelligence provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of an artificial intelligence based integrating instrument shell defect detection method according to an embodiment of the present invention is shown, where the method includes:
step S1: and acquiring a gray level image of the surface of the integrating instrument shell.
In the long-term use process of the integrating instrument, the shell of the integrating instrument can inevitably generate ageing phenomena, such as lightening of the shell surface or occurrence of finer cracks, pits are formed on the shell surface, and defects caused by ageing to the shell of the integrating instrument can influence the appearance and durability of the integrating instrument, so that timely and accurate detection of whether the ageing defects occur to the shell of the integrating instrument has great significance for later maintenance.
In the embodiment of the invention, firstly, a charge coupled device (Charge Coupled Device, CCD) camera is used for collecting RGB images on the surface of a casing of the integrating instrument, in order to reduce the influence caused by noise and improve the quality of the images, in one embodiment of the invention, the collected RGB images are subjected to denoising treatment through bilateral filtering, and the description is that the bilateral filtering is a technical means well known to a person skilled in the art and is not repeated here.
In order to reduce the calculation amount of the subsequent image processing and increase the processing speed, in one embodiment of the present invention, the acquired RGB image is converted into a single-channel gray image by performing gray processing, and it should be noted that the gray processing is a technical means well known to those skilled in the art, and will not be described herein.
After the gray level image of the surface of the integrating instrument shell is obtained, the gray level image can be analyzed in the follow-up process, and the aging defect in the gray level image can be detected.
Step S2: threshold segmentation is carried out on the gray level image to obtain a suspected defect area; obtaining the roughness of the suspected defect area according to the texture characteristics of the suspected defect area; and carrying out edge detection on the gray level image to obtain the number of edge lines in the suspected defect area.
The shell material of the integrating instrument is usually engineering plastic, the surface of the engineering plastic can generate an ageing defect area in the long-term use process, and the colour of the ageing partial area of the shell surface of the integrating instrument can be lightened, so that the gray value of a pixel point in the area is larger than that of a normal area, and therefore, the gray image is subjected to threshold segmentation first, and a suspected defect area formed by the ageing of the shell in the gray image is obtained initially.
Preferably, in one embodiment of the present invention, the method for acquiring the suspected defect area specifically includes:
the aging of the integrating instrument shell can lighten the color of the surface of the integrating instrument shell and increase the gray value of the pixel points, so that the optimal segmentation threshold value can be obtained according to the gray values of all the pixel points in the gray image based on an Ojin threshold segmentation algorithm, and the pixel points with the gray values larger than the optimal segmentation threshold value are used as suspected defect pixel points; in order to divide adjacent suspected defect pixel points with similar gray differences into the same region, carrying out connected region analysis on the suspected defect pixel points to obtain a connected region; the connected region is used as a suspected defect region.
It should be noted that, the oxford threshold segmentation algorithm and the connected domain analysis are all technical means well known to those skilled in the art, and are not described herein.
In order to confirm whether the suspected defect area is a defect area formed by ageing of the casing of the integrator, further analysis can be performed according to characteristics of ageing of the casing, since after ageing of the casing of the integrator, textures of the surface ageing area become coarser than those of the normal area, and more fine cracks appear in the ageing area, roughness of the suspected defect area can be obtained according to the textures of the suspected defect area, and the number of edge lines in the suspected defect area can be obtained by performing edge detection on a gray image, and in the following, the possibility that the suspected defect area is the ageing defect area can be evaluated and analyzed based on the roughness and the number of edge lines.
Preferably, in one embodiment of the present invention, the method for acquiring the roughness of the suspected defect area specifically includes:
the neighborhood gray scale difference matrix can represent the roughness of a certain area in the image, so that the neighborhood gray scale difference matrix of pixel points in the suspected defective area can be obtained first, and the roughness calculation is carried out on the neighborhood gray scale difference matrix based on a roughness calculation formula of the neighborhood gray scale difference matrix to obtain the roughness of the suspected defective area, wherein the roughness calculation formula is the inverse of the weighted average of the neighborhood gray scale difference of each gray scale in the neighborhood gray scale difference matrix and the frequency of occurrence of the gray scale. It should be noted that the field gray scale difference matrix and the corresponding roughness calculation formula are technical means well known to those skilled in the art, and are not described herein.
Preferably, in one embodiment of the present invention, the method for acquiring the number of edge lines in the suspected defect area specifically includes:
edge detection is carried out on the suspected defect area to obtain an edge line in the gray level image; and counting the number of edge lines in each suspected defect area, in order to improve the effect of edge line detection, in one embodiment of the invention, a canny edge detection operator is used to perform edge detection on the gray image, and in other embodiments of the invention, an edge detection operator such as a sobel edge detection operator or a Laplacian edge detection operator can also be used to perform edge detection, which is not limited.
The larger the roughness of the suspected defect area is, the more the number of edge lines is, the greater the possibility that the suspected defect area is a defect area caused by the ageing of the integrating instrument shell is, so that the suspected defect area can be evaluated based on the roughness and the number of the edge lines in the follow-up process, and the accuracy of identifying the ageing defect area is improved.
Step S3: acquiring a concave region of the gray image according to gray distribution of pixel points in the gray image; taking any column of pixel points in the concave area as target pixel columns, and dividing subintervals according to gray distribution of the pixel points in each target pixel column to obtain mutation intervals and mutation interval serial numbers; and taking a region which is formed by continuous target pixel columns and has mutation regions as a target region, and obtaining the surface deformation degree of the target region according to the distribution of the mutation region serial numbers of the target pixel columns in the target region and the distribution of the pixel point gray values in the mutation regions.
When the integrating instrument shell ages, the surface of the integrating instrument shell is recessed, so that pits appear on the surface of the integrating instrument shell, whether the surface of the integrating instrument shell is recessed or not can be detected, whether the shell is aged or not can be analyzed, and because the edges of pit areas are generally round and because of reflection, the gray values of pixel points in the pit areas are larger than those of pixel points in non-pit areas, the gray images on the surface of the integrating instrument shell can be subjected to Hough circle detection, and the recessed areas in the gray images can be obtained.
Preferably, the method for acquiring the concave region of the gray image in one embodiment of the present invention specifically includes:
carrying out Hough circle detection on the gray level image to obtain a round edge line in the gray level image; and taking the area surrounded by the round edge lines as a concave area in the gray level image. It should be noted that hough circle detection is a technical means well known to those skilled in the art, and will not be described herein.
Because the reflection capability of pits on the surface of the integrating instrument shell body due to aging is stronger, at the moment, the gray value of a pixel point of a concave area in a gray image of the shell body surface is larger than the gray value of a pixel point of a non-concave area, namely, the gray value of the pixel point of the concave area is suddenly changed, the gray image can be analyzed according to the pixel columns, the pixel columns are pixel points of any column in the gray image, if the gray value of the pixel point of a certain position of the pixel column suddenly changes, the fact that the concave area possibly exists on the pixel column is indicated, therefore, any pixel column where the detected concave area exists is taken as a target pixel column, each target pixel column is analyzed, whether the position in the target pixel column suddenly changes or not can be reflected through the change condition of the gray value of the pixel point in the local range of the target pixel column, therefore, the mutation interval and the mutation interval number can be obtained by dividing the longitudinal coordinates of the pixel points in each target pixel column, if the mutation interval can reflect whether the mutation phenomenon exists on the pixel point of the target pixel column, and if the mutation phenomenon exists on the target pixel column, the mutation interval can indicate that the mutation exists on the target pixel column.
Preferably, in one embodiment of the present invention, the method for acquiring mutation intervals and mutation interval sequence numbers specifically includes:
firstly, a coordinate system of a gray level image is required to be constructed, wherein the horizontal axis direction of the coordinate system is the horizontal direction of the gray level image, the vertical axis direction of the coordinate system is the vertical direction of the coordinate system, the origin of the coordinate system is a pixel point at the upper left corner of the gray level image, and a subinterval with preset length is uniformly divided between the maximum vertical coordinate and the minimum vertical coordinate of the pixel point in a target pixel column; numbering the divided subintervals according to the sequence of non-zero natural numbers to obtain the correspondence of each subintervalFor example, the preset length is set toThe region of the ordinate of the pixel point in the target pixel row can be +.>For the first subinterval, the interval +.>As a second subinterval, etc.; when the gray value of the pixel point in a certain subinterval has a sudden change phenomenon, the difference value between the maximum gray value and the minimum gray value of the pixel point in the subinterval is larger, namely the range of the gray value of the pixel point is larger, so the range of the gray value of the pixel point in each subinterval of each target pixel column is taken as the range of the gray value of each subinterval; obtaining the maximum value of the gray level range, and taking the subinterval of which the maximum value of the gray level range is larger than a preset first threshold value as a mutation interval of the target pixel column; and taking the subinterval sequence number of the corresponding subinterval as the sequence number of the mutation interval. In one embodiment of the present invention, the preset length is set to 25, the preset first threshold is set to 200, and specific values of the preset length and the preset first threshold may be set by an implementer according to a specific implementation scenario, which is not limited herein.
It should be noted that, when the length of the last divided interval is smaller than the preset length, the interval is also regarded as a complete subinterval.
After the mutation intervals of the target pixel columns are obtained, as the mutation degree of the pixel point gray values of some target pixel columns is smaller, the target pixel columns can be regarded as not having mutation intervals, so that the region which is formed by the mutation intervals and continuous pixel columns can be used as a target region, if the surface of the integrator shell is in the target region, the sequence number of the mutation interval of each target pixel column in the target region is relatively close, the difference of the pixel point gray value distribution in each mutation interval is relatively large, and the surface deformation degree of the target region can be obtained according to the distribution of the mutation interval sequence number of the target pixel columns in the target region and the distribution of the pixel point gray values in the mutation intervals, the surface deformation degree can reflect the possibility that the pit appears in the target region, and the larger the surface deformation degree is, the possibility that the pit appears in the target region on the surface of the integrator shell is indicated to be larger.
Preferably, in one embodiment of the present invention, the method for acquiring the surface deformation degree of the target area specifically includes:
taking the variance of the sequence numbers of the mutation intervals of all the target pixel columns in the target area as sequence number confusion; taking the extremely poor gray value of the pixel points in the mutation interval in each target pixel column as the mutation degree of each target pixel column; taking the average value of the mutation degrees of all the target pixel columns in the target area as the whole mutation degree; the method comprises the steps of obtaining initial deformation degree of a target area, wherein the initial deformation degree is in negative correlation with sequence number confusion degree, the initial deformation degree is in positive correlation with integral mutation degree, and normalizing the initial deformation degree to obtain surface deformation degree of the target area. The expression of the surface deformability may specifically be, for example:
wherein,indicate->Surface deformability of the individual target areas; />Indicate->Sequence number confusion of the individual target areas; />Indicate->Overall degree of mutation of the individual target regions; />Indicate->First->A mutation section number of each target pixel column; />Indicate->Average value of mutation interval serial numbers of all target pixel columns in each target region; />Represent the firstFirst->The difference of gray values of pixel points in the abrupt region of the target pixel column, namely +.>The degree of mutation of the individual target pixel columns; />Indicate->The number of target pixel columns in the target regions; />Representing a normalization function; />Represents a parameter-adjusting factor for preventing denominator from being 0, in one embodiment of the present invention +.>Setting to 1, regulating parameter factor->The specific numerical values of (2) can be set by the implementer according to the specific implementation scenario, and are not limited.
In the process of acquiring the surface deformation degree of the target area, the surface deformation degreeIndicate->Surface deformability of the respective target region, surface deformability +.>The larger the likelihood that the totalizer casing surface will have a recessed area in the target area is greater; />Indicate->First->The mutation interval serial numbers of the target pixel columns are relatively close to each other if a concave area exists in the target area, namely the mutation interval serial numbers of the target pixel columns in the target area are relatively close to each other, so that the serial number confusion is equal to the mutation interval serial numbers of the target pixel columns in the target area>Smaller, sayThe greater the likelihood that the surface of the totalizer casing has a recessed area in the target area, the surface deformability +.>The larger the size; when there is a concave region in the target region, due to light and reflection, the gray values of pixels in the concave region are suddenly changed, and the gray values of pixels in the concave region are larger than those of pixels in the non-concave region, so that the difference between the gray values of pixels in the suddenly changed region in each target pixel column is less than that of pixels in the non-concave region>Larger, so in one embodiment of the invention the average value of the extreme differences of the pixel gray values in the mutation intervals of all the target pixel columns in the target area is taken as the overall mutation degree +.>Degree of overall mutation->The larger the surface, the greater the probability that the surface of the totalizer casing has a depressed area in the target area, the surface deformability +.>The greater and +.>Normalizing to obtain corresponding surface deformation degree->Facilitating the subsequent deformation according to the surface>Further evaluation analysis was performed.
In one embodiment of the present invention, the normalization process may specifically be, for example, maximum and minimum normalization processes, and the normalization in the subsequent steps may be performed by using the maximum and minimum normalization processes, and in other embodiments of the present invention, other normalization methods may be selected according to a specific range of values, which will not be described herein.
Step S4: and taking the suspected defect area in the target area as the target defect area, and obtaining the aging significant coefficient of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area.
In the step S2, the suspected defect area is just a defect area formed by aging of the integrator housing, and since other non-aging defect areas such as scratches exist on the surface of the integrator housing, further analysis is needed for the suspected defect area, and since the target area has a greater possibility of having the feature of housing aging, namely pits, the suspected defect area in the target area can be used as the target defect area, further confirmation of the aging defect area is achieved, further an aging significant coefficient of the target defect area can be obtained according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformability of the target area, the aging significant coefficient can reflect the possibility that the target defect area is the aging defect area, and the larger the aging significant coefficient is, the more likely that the corresponding target defect area is the aging defect area formed by aging of the integrator housing is indicated, further accurate analysis can be performed for the target defect area according to the aging significant coefficient in the subsequent steps, and the accuracy of the identification of the aging defect is improved.
Preferably, in one embodiment of the present invention, the method for acquiring the aging significant coefficient of the target defect area specifically includes:
because the target defect area is a suspected defect area in the target area, according to the roughness, the number of edge lines and the surface deformation degree calculated based on a plurality of characteristics of the aging of the integrating instrument shell in the process, the possibility that the target defect area is an aging defect area is analyzed, and the product value of the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area is normalized, so that the aging significant coefficient of the target defect area is obtained. The expression of the aging significant coefficient may specifically be, for example:
wherein,indicate->First->Aging significance coefficients for the individual target defect areas; />Indicate->The +.>Surface deformability of the individual target areas; />Indicate->First->Roughness of the individual target defect areas; />Indicate->First->The number of edge lines within the individual target defect areas;representing the normalization function.
In the process of acquiring the aging significant coefficient of the target defect area, the surface deformation degree of the target area where the target defect area is locatedThe larger the probability of pit characteristics indicating the presence of aging in the target area is, the more likely the target defect area in the target area is to be an aging defect, the aging significance factor of the target defect area +.>The larger the size; since the aging of the integrator casing causes the surface thereof to become rough, the roughness of the target defective area +.>The larger the target defect area is, the more likely it is an ageing defect, the ageing significant coefficient of the target defect area +.>The larger the size; since the aging of the integrator casing also causes more fine cracks to appear on its surface, the number of edge lines in the target defect areaThe larger the target defect area is, the more likely it is an ageing defect, the ageing significant coefficient of the target defect area +.>The greater the surface deformability is, therefore, in one embodiment of the invention +.>Roughness->Number of edge linesThe result of normalization of the product value of (2) is taken as the aging significant coefficient of the target defect area +.>
After the aging significant coefficient of the target defect area is obtained, the target defect area can be evaluated and analyzed according to the aging significant coefficient in the follow-up process, and then the aging defect on the surface of the integrating instrument shell can be accurately detected.
Step S5: and detecting the ageing defect of the integrating instrument shell according to the ageing significant coefficient.
The aging significant coefficient of the target defect area on the surface of the integrator shell can reflect the possibility that the target defect area is an aging defect, namely, the larger the aging significant coefficient is, the greater the possibility that the target defect area is a defect area of the integrator shell caused by aging is, so that the target defect area can be evaluated and analyzed according to the aging significant coefficient, and the aging defect area in the gray level image on the surface of the integrator shell can be accurately detected.
Preferably, in one embodiment of the present invention, detecting the aging defect of the integrator housing according to the aging significant coefficient specifically includes:
the greater the ageing significant coefficient is, the greater the possibility that the target defect area is a defect area of the integrating instrument shell caused by ageing is, so that a preset significant threshold value can be set, and the target defect area with the ageing significant coefficient greater than the preset significant threshold value is used as the ageing defect area of the integrating instrument shell, so that the detection of the ageing defect area of the surface of the integrating instrument shell caused by ageing can be realized, the accuracy of the detection of the ageing defect of the integrating instrument shell is improved, the preset significant threshold value is set to be 0.8 in one embodiment of the invention, and the specific value of the preset significant threshold value can be set by an implementer according to specific implementation scenarios without limitation.
After the ageing defect existing on the surface of the integrating instrument shell is detected, the integrating instrument shell can be timely maintained in the later period, and the durability of integrating instrument equipment can be further improved.
In summary, in the embodiment of the invention, firstly, a gray image of the surface of the integrating instrument shell is obtained, the gray image is subjected to Ojin threshold segmentation, a suspected defect area is initially extracted, the roughness of the suspected defect area is obtained according to the texture characteristics of the suspected defect area, and the gray image is subjected to edge detection to obtain the number of edge lines in the suspected defect area; considering that the surface of the shell is concave due to ageing, firstly, hough circle detection is carried out on a gray level image to obtain a concave area of the gray level image, then the gray level image is analyzed according to pixel columns, any pixel column where the concave area is located is taken as a target pixel column, subinterval division is carried out on the ordinate of a pixel point in each target pixel column to obtain subinterval and subinterval sequence numbers corresponding to the target pixel column, the mutation interval and mutation interval sequence numbers are obtained according to the range of the gray level value of the pixel point in the subinterval, the possibility of occurrence of concave in the target area can be further reflected through the obtained surface deformation degree, the possibility that the target defect area is an ageing defect area can be evaluated and analyzed through the obtained ageing significant coefficient, and the target defect area with the ageing significant coefficient larger than a preset significant threshold is taken as the ageing defect area, so that the accuracy of ageing defect detection of the integrator shell is improved.
An embodiment of an integrating instrument shell aging defect evaluation method based on artificial intelligence comprises the following steps:
the method for evaluating the surface defects of the object in the related art is generally as follows: and carrying out self-adaptive segmentation on the gray level image of the object surface to obtain each region, obtaining the multi-order moment of the gray level histogram corresponding to each region, obtaining the evaluation value of the region according to the multi-order moment, and carrying out evaluation analysis on the defect condition in each region based on the evaluation value. However, in the long-term use process of the integrator shell, the surface of the integrator shell has ageing defects and non-ageing defects such as scratches, the ageing defects of the integrator shell cannot be accurately evaluated only according to the multi-order moments of the gray level histogram, the distinction between the ageing defects and the non-ageing defects cannot be identified in the evaluation process, and the accuracy of evaluating the ageing defects of the integrator shell is reduced.
To solve the problem, the embodiment provides an artificial intelligence based integrating instrument shell aging defect evaluation method, which comprises the following steps:
step S1: and acquiring a gray level image of the surface of the integrating instrument shell.
Step S2: threshold segmentation is carried out on the gray level image to obtain a suspected defect area; obtaining the roughness of the suspected defect area according to the texture characteristics of the suspected defect area; and carrying out edge detection on the gray level image to obtain the number of edge lines in the suspected defect area.
Step S3: acquiring a concave region of the gray image according to gray distribution of pixel points in the gray image; forming any column of pixel points of the concave area into a target pixel column; dividing subintervals according to gray level distribution of pixel points in each target pixel column to obtain mutation intervals and mutation interval serial numbers; and taking a region which is formed by continuous target pixel columns and has mutation regions as a target region, and obtaining the surface deformation degree of the target region according to the distribution of the mutation region serial numbers of the target pixel columns in the target region and the distribution of the pixel point gray values in the mutation regions.
Step S4: and taking the suspected defect area in the target area as the target defect area, and obtaining the aging significant coefficient of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area.
The steps S1 to S4 are described in detail in the embodiment of the method for detecting a defect of an integrator casing based on artificial intelligence, and are not described herein.
The embodiment of the invention has the beneficial effects that: according to the embodiment of the invention, the situation that the surface color of the shell becomes light due to the ageing of the shell of the integrating instrument is considered, so that the gray level image is firstly subjected to threshold segmentation, the suspected defect area is initially extracted, and the situation that the texture of the gray level image is coarser and finer cracks appear due to the ageing of the shell is considered, so that whether the gray level image is an ageing defect area can be further judged in the follow-up process by acquiring the roughness of the suspected defect area and the number of edge lines; considering that the surface of the shell is recessed due to aging, a possible recessed area in the gray level image is firstly obtained, and as the gray level value of the pixel points in the recessed area in the gray level image has obvious mutation compared with that in a non-recessed area, analysis is carried out according to the pixel columns, subinterval division is carried out on the target pixel columns to obtain mutation intervals and mutation interval serial numbers of the target pixel columns, the possibility of the occurrence of the recess in the target area can be further reflected through the obtained surface deformation degree, and the possibility that the target defect area is an aging defect area can be evaluated and analyzed through the obtained aging significant coefficient by combining various characteristics of the shell aging, so that the accuracy of evaluating the aging defect of the integrating instrument shell is improved.
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 (10)

1. An integrating instrument shell defect detection method based on artificial intelligence, which is characterized by comprising the following steps:
acquiring a gray level image of the surface of the integrating instrument shell;
threshold segmentation is carried out on the gray level image to obtain a suspected defect area; obtaining roughness of the suspected defect area according to the texture characteristics of the suspected defect area; performing edge detection on the gray level image to obtain the number of edge lines in the suspected defect area;
acquiring a concave region of the gray image according to gray distribution of pixel points in the gray image; forming any column of pixel points of the concave area into a target pixel column; dividing subintervals according to gray level distribution of pixel points in each target pixel column to obtain mutation intervals and mutation interval serial numbers; taking a region which is formed by continuous target pixel columns and has mutation regions as a target region, and obtaining the surface deformation degree of the target region according to the distribution of the mutation region serial numbers of the target pixel columns in the target region and the distribution of the pixel point gray values in the mutation regions;
taking the suspected defect area in the target area as a target defect area, and obtaining an aging significant coefficient of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area;
and detecting the ageing defect of the integrating instrument shell according to the ageing significant coefficient.
2. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the thresholding the gray scale image to obtain suspected defect areas comprises:
based on an Ojin threshold segmentation algorithm, acquiring an optimal segmentation threshold according to gray values of all pixel points in a gray image, and taking the pixel points with gray values larger than the optimal segmentation threshold as suspected defect pixel points;
carrying out connected domain analysis on the suspected defective pixel points to obtain a connected region; and taking the connected region as a suspected defect region.
3. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the obtaining roughness of the suspected defective area according to texture features of the suspected defective area comprises:
obtaining a neighborhood gray level difference matrix of pixel points in the suspected defect area;
and performing roughness calculation on the neighborhood gray level difference matrix based on a roughness calculation formula to obtain the roughness of the suspected defect area.
4. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the step of performing edge detection on the gray scale image to obtain the number of edge lines in the suspected defect area comprises:
performing edge detection on the gray level image to obtain an edge line in the gray level image;
and counting the number of edge lines in each suspected defect area according to the edge lines in the gray level image.
5. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the step of obtaining a concave region of a gray scale image according to gray scale distribution of pixels in the gray scale image comprises:
carrying out Hough circle detection on the gray level image according to the gray level value of the pixel point to obtain a round edge line in the gray level image;
and taking the area surrounded by the round edge lines as a concave area in the gray level image.
6. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the performing sub-interval division according to gray scale distribution of pixel points in each of the target pixel columns to obtain mutation intervals and mutation interval sequence numbers includes:
constructing a coordinate system of the gray image, wherein the horizontal axis direction of the coordinate system is the horizontal direction of the gray image, the vertical axis direction of the coordinate system is the vertical direction of the coordinate system, the origin of the coordinate system is a pixel point at the upper left corner of the gray image, and a subinterval with a preset length is uniformly divided between the maximum vertical coordinate and the minimum vertical coordinate of the pixel point in the target pixel column;
numbering the divided subintervals according to the sequence of non-zero natural numbers, and obtaining the subinterval sequence number corresponding to each subinterval;
and obtaining a mutation interval and a mutation interval sequence number according to the distribution of the pixel point gray values in the subinterval.
7. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 6, wherein the obtaining the mutation area and the mutation area sequence number according to the distribution of the gray values of the pixels in the subinterval comprises:
taking the extreme difference of the gray value of the pixel point in each subinterval of each target pixel column as the gray extreme difference of each subinterval;
and obtaining the maximum value of the gray level range, taking the subinterval corresponding to the maximum value of the gray level range larger than a preset first threshold value as a mutation interval of the target pixel column, and taking the subinterval serial number corresponding to the subinterval as the mutation interval serial number.
8. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the obtaining the surface deformability of the target area according to the distribution of the sequence numbers of the mutation areas of the target pixel columns in the target area and the distribution of the gray values of the pixel points in the mutation areas comprises:
taking the variance of the sequence numbers of the mutation intervals of all the target pixel columns in the target area as sequence number confusion;
taking the extremely poor gray value of the pixel points in the mutation interval in each target pixel column as the mutation degree of each target pixel column; taking the average value of the mutation degrees of all the target pixel columns in the target area as the whole mutation degree;
obtaining initial deformation degree of the target area, wherein the initial deformation degree is in negative correlation with the sequence number confusion degree, the initial deformation degree is in positive correlation with the integral mutation degree, and normalizing the initial deformation degree to obtain the surface deformation degree of the target area.
9. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the obtaining the aging significance factor of the target defect area according to the roughness of the target defect area, the number of edge lines in the target defect area, and the surface deformability of the target area comprises:
and carrying out normalization processing on the product value of the roughness of the target defect area, the number of edge lines in the target defect area and the surface deformation degree of the target area to obtain the aging significant coefficient of the target defect area.
10. The method for detecting defects of an integrator casing based on artificial intelligence according to claim 1, wherein the detecting the aging defects of the integrator casing based on the aging significant coefficients comprises:
and taking the target defect area with the aging significant coefficient larger than a preset significant threshold value as the aging defect area of the integrating instrument shell.
CN202311152395.2A 2023-09-08 2023-09-08 Integrating instrument shell defect detection method based on artificial intelligence Active CN116883408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311152395.2A CN116883408B (en) 2023-09-08 2023-09-08 Integrating instrument shell defect detection method based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311152395.2A CN116883408B (en) 2023-09-08 2023-09-08 Integrating instrument shell defect detection method based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN116883408A CN116883408A (en) 2023-10-13
CN116883408B true CN116883408B (en) 2023-11-07

Family

ID=88259115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311152395.2A Active CN116883408B (en) 2023-09-08 2023-09-08 Integrating instrument shell defect detection method based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN116883408B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117115146B (en) * 2023-10-19 2024-03-19 深圳宝铭微电子有限公司 Method for detecting quality of coating film on surface of silicon carbide semiconductor
CN117764990A (en) * 2024-02-22 2024-03-26 苏州悦昇精密机械制造有限公司 method for detecting stamping quality of chassis

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113108879A (en) * 2021-04-29 2021-07-13 青岛市计量技术研究院 Gas flowmeter for measuring remote calibration of circular-section pipeline and calibration method
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision
WO2023077404A1 (en) * 2021-11-05 2023-05-11 宁德时代新能源科技股份有限公司 Defect detection method, apparatus and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113108879A (en) * 2021-04-29 2021-07-13 青岛市计量技术研究院 Gas flowmeter for measuring remote calibration of circular-section pipeline and calibration method
WO2023077404A1 (en) * 2021-11-05 2023-05-11 宁德时代新能源科技股份有限公司 Defect detection method, apparatus and system
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于机器视觉的金属表面缺陷检测方法研究;翟伟良;李有煊;黄浩湄;黄茂发;陈俊杰;莫锦超;;科技传播(09);全文 *

Also Published As

Publication number Publication date
CN116883408A (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN115375676B (en) Stainless steel product quality detection method based on image recognition
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN116168026B (en) Water quality detection method and system based on computer vision
CN116758061B (en) Casting surface defect detection method based on computer vision
CN115345885A (en) Method for detecting appearance quality of metal fitness equipment
CN114219805B (en) Intelligent detection method for glass defects
CN116309600B (en) Environment-friendly textile quality detection method based on image processing
CN116777916B (en) Defect detection method based on metal shell of pump machine
CN116740070B (en) Plastic pipeline appearance defect detection method based on machine vision
CN116030060B (en) Plastic particle quality detection method
CN111652213A (en) Ship water gauge reading identification method based on deep learning
CN115063430B (en) Electric pipeline crack detection method based on image processing
CN114820625B (en) Automobile top block defect detection method
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN115063407B (en) Scratch and crack identification method for annular copper gasket
CN117058147B (en) Environment-friendly plastic product defect detection method based on computer vision
CN115797473B (en) Concrete forming evaluation method for civil engineering
CN111709964B (en) PCBA target edge detection method
CN114549441A (en) Sucker defect detection method based on image processing
CN116542972A (en) Wall plate surface defect rapid detection method based on artificial intelligence
CN115953409A (en) Injection molding surface defect detection method based on image processing
CN116934761A (en) Self-adaptive detection method for defects of latex gloves
CN115222735B (en) Metal mold quality detection method based on pockmark defects
CN113643290B (en) Straw counting method and device based on image processing and storage medium

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